summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/dev/file_chooser_dev.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-20 04:53:22 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-20 04:53:22 +0000
commitbab65ef72eb97612599d97a35c6da6f460b0cacc (patch)
treec3a3d01bf47a3c7f8e0a7969e5f59ff509963484 /ppapi/cpp/dev/file_chooser_dev.cc
parent84a7f535761e3bceeac188cd8cd499e2f8016661 (diff)
downloadchromium_src-bab65ef72eb97612599d97a35c6da6f460b0cacc.zip
chromium_src-bab65ef72eb97612599d97a35c6da6f460b0cacc.tar.gz
chromium_src-bab65ef72eb97612599d97a35c6da6f460b0cacc.tar.bz2
Cleanup in the file chooser API.
This revs the file chooser interface to no longer pass a separate options structure. This structure was weird because it only had two members, and didn't have ownership of the string which is potentially dangerous. The new interface is a bit easier to call. I changed the string to take a Var, and the C++ layer now takes an Instance* rather than an Instance& which is consistent with the other interfaces. I updated the example. TEST=manual BUG= Review URL: http://codereview.chromium.org/7660017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/dev/file_chooser_dev.cc')
-rw-r--r--ppapi/cpp/dev/file_chooser_dev.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ppapi/cpp/dev/file_chooser_dev.cc b/ppapi/cpp/dev/file_chooser_dev.cc
index aa6535b..ef52b5b0 100644
--- a/ppapi/cpp/dev/file_chooser_dev.cc
+++ b/ppapi/cpp/dev/file_chooser_dev.cc
@@ -22,12 +22,13 @@ template <> const char* interface_name<PPB_FileChooser_Dev>() {
} // namespace
-FileChooser_Dev::FileChooser_Dev(const Instance& instance,
- const PP_FileChooserOptions_Dev& options) {
+FileChooser_Dev::FileChooser_Dev(const Instance* instance,
+ PP_FileChooserMode_Dev mode,
+ const Var& accept_mime_types) {
if (!has_interface<PPB_FileChooser_Dev>())
return;
PassRefFromConstructor(get_interface<PPB_FileChooser_Dev>()->Create(
- instance.pp_instance(), &options));
+ instance->pp_instance(), mode, accept_mime_types.pp_var()));
}
FileChooser_Dev::FileChooser_Dev(const FileChooser_Dev& other)