OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "third_party/ppapi/c/ppb_file_chooser.h" |
| 11 #include "webkit/glue/plugins/pepper_resource.h" |
| 12 |
| 13 namespace pepper { |
| 14 |
| 15 class PluginInstance; |
| 16 |
| 17 class FileChooser : public Resource { |
| 18 public: |
| 19 FileChooser(PluginInstance* instance, const PP_FileChooserOptions* options); |
| 20 virtual ~FileChooser(); |
| 21 |
| 22 // Returns a pointer to the interface implementing PPB_FileChooser that is |
| 23 // exposed to the plugin. |
| 24 static const PPB_FileChooser* GetInterface(); |
| 25 |
| 26 // Resource overrides. |
| 27 FileChooser* AsFileChooser() { return this; } |
| 28 |
| 29 // PPB_FileChooser implementation. |
| 30 int32_t Show(PP_CompletionCallback callback); |
| 31 scoped_refptr<FileRef> GetNextChosenFile(); |
| 32 |
| 33 private: |
| 34 PP_FileChooserMode mode_; |
| 35 std::string accept_mime_types_; |
| 36 }; |
| 37 |
| 38 } // namespace pepper |
| 39 |
| 40 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ |
OLD | NEW |