| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 FileChooser(PluginInstance* instance, | 23 FileChooser(PluginInstance* instance, |
| 24 const PP_FileChooserOptions_Dev* options); | 24 const PP_FileChooserOptions_Dev* options); |
| 25 virtual ~FileChooser(); | 25 virtual ~FileChooser(); |
| 26 | 26 |
| 27 // Returns a pointer to the interface implementing PPB_FileChooser that is | 27 // Returns a pointer to the interface implementing PPB_FileChooser that is |
| 28 // exposed to the plugin. | 28 // exposed to the plugin. |
| 29 static const PPB_FileChooser_Dev* GetInterface(); | 29 static const PPB_FileChooser_Dev* GetInterface(); |
| 30 | 30 |
| 31 // Resource overrides. | 31 // Resource overrides. |
| 32 FileChooser* AsFileChooser() { return this; } | 32 virtual FileChooser* AsFileChooser(); |
| 33 | 33 |
| 34 // Stores the list of selected files. | 34 // Stores the list of selected files. |
| 35 void StoreChosenFiles(const std::vector<std::string>& files); | 35 void StoreChosenFiles(const std::vector<std::string>& files); |
| 36 | 36 |
| 37 // PPB_FileChooser implementation. | 37 // PPB_FileChooser implementation. |
| 38 int32_t Show(PP_CompletionCallback callback); | 38 int32_t Show(PP_CompletionCallback callback); |
| 39 scoped_refptr<FileRef> GetNextChosenFile(); | 39 scoped_refptr<FileRef> GetNextChosenFile(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 PluginDelegate* delegate_; | 42 PluginDelegate* delegate_; |
| 43 PP_FileChooserMode_Dev mode_; | 43 PP_FileChooserMode_Dev mode_; |
| 44 std::string accept_mime_types_; | 44 std::string accept_mime_types_; |
| 45 PP_CompletionCallback completion_callback_; | 45 PP_CompletionCallback completion_callback_; |
| 46 std::vector< scoped_refptr<FileRef> > chosen_files_; | 46 std::vector< scoped_refptr<FileRef> > chosen_files_; |
| 47 size_t next_chosen_file_index_; | 47 size_t next_chosen_file_index_; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace pepper | 50 } // namespace pepper |
| 51 | 51 |
| 52 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ | 52 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ |
| OLD | NEW |