summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-13 02:45:22 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-13 02:45:22 +0000
commitffdfdaf7ff2d6e8d4826ad30ffe70f33068b1b92 (patch)
treee5b1d008380dd484c65b2179bdec88c35bb0350b
parent7cf23ce6e4afb63a05aa68042e84cbdc7d0be165 (diff)
downloadchromium_src-ffdfdaf7ff2d6e8d4826ad30ffe70f33068b1b92.zip
chromium_src-ffdfdaf7ff2d6e8d4826ad30ffe70f33068b1b92.tar.gz
chromium_src-ffdfdaf7ff2d6e8d4826ad30ffe70f33068b1b92.tar.bz2
PPAPI: Implement operator= for FileChooser_Trusted.
TBR=dmichael Review URL: http://codereview.chromium.org/9187070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117587 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/cpp/trusted/file_chooser_trusted.cc10
-rw-r--r--ppapi/cpp/trusted/file_chooser_trusted.h8
2 files changed, 14 insertions, 4 deletions
diff --git a/ppapi/cpp/trusted/file_chooser_trusted.cc b/ppapi/cpp/trusted/file_chooser_trusted.cc
index d0c6c50..aa05798 100644
--- a/ppapi/cpp/trusted/file_chooser_trusted.cc
+++ b/ppapi/cpp/trusted/file_chooser_trusted.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -40,6 +40,14 @@ FileChooser_Trusted::FileChooser_Trusted(const FileChooser_Trusted& other)
suggested_file_name_(other.suggested_file_name_) {
}
+FileChooser_Trusted& FileChooser_Trusted::operator=(
+ const FileChooser_Trusted& other) {
+ FileChooser_Dev::operator=(other);
+ save_as_ = other.save_as_;
+ suggested_file_name_ = other.suggested_file_name_;
+ return *this;
+}
+
int32_t FileChooser_Trusted::Show(const CompletionCallback& cc) {
if (!has_interface<PPB_FileChooserTrusted>())
return cc.MayForce(PP_ERROR_NOINTERFACE);
diff --git a/ppapi/cpp/trusted/file_chooser_trusted.h b/ppapi/cpp/trusted/file_chooser_trusted.h
index a0227ef..d6a2491 100644
--- a/ppapi/cpp/trusted/file_chooser_trusted.h
+++ b/ppapi/cpp/trusted/file_chooser_trusted.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -24,13 +24,15 @@ class FileChooser_Trusted : public FileChooser_Dev {
FileChooser_Trusted(const FileChooser_Trusted& other);
+ FileChooser_Trusted& operator=(const FileChooser_Trusted& other);
+
// Overrides of method in superclass. This shows without requiring a user
// gesture (and can also show save dialogs).
virtual int32_t Show(const CompletionCallback& cc);
private:
- const bool save_as_;
- const std::string suggested_file_name_;
+ bool save_as_;
+ std::string suggested_file_name_;
};
} // namespace pp