Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: webkit/plugins/ppapi/ppb_file_chooser_impl.h

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "ppapi/c/dev/ppb_file_chooser_dev.h" 12 #include "ppapi/c/dev/ppb_file_chooser_dev.h"
13 #include "ppapi/c/pp_completion_callback.h" 13 #include "ppapi/c/pp_completion_callback.h"
14 #include "webkit/glue/plugins/pepper_resource.h" 14 #include "webkit/plugins/ppapi/resource.h"
15 15
16 namespace pepper { 16 namespace webkit {
17 namespace plugins {
18 namespace ppapi {
17 19
18 class PluginDelegate; 20 class PluginDelegate;
19 class PluginInstance; 21 class PluginInstance;
22 class PPB_FileRef_Impl;
20 23
21 class FileChooser : public Resource { 24 class PPB_FileChooser_Impl : public Resource {
22 public: 25 public:
23 FileChooser(PluginInstance* instance, 26 PPB_FileChooser_Impl(PluginInstance* instance,
24 const PP_FileChooserOptions_Dev* options); 27 const PP_FileChooserOptions_Dev* options);
25 virtual ~FileChooser(); 28 virtual ~PPB_FileChooser_Impl();
26 29
27 // Returns a pointer to the interface implementing PPB_FileChooser that is 30 // Returns a pointer to the interface implementing PPB_FileChooser that is
28 // exposed to the plugin. 31 // exposed to the plugin.
29 static const PPB_FileChooser_Dev* GetInterface(); 32 static const PPB_FileChooser_Dev* GetInterface();
30 33
31 // Resource overrides. 34 // Resource overrides.
32 virtual FileChooser* AsFileChooser(); 35 virtual PPB_FileChooser_Impl* AsFileChooser();
33 36
34 // Stores the list of selected files. 37 // Stores the list of selected files.
35 void StoreChosenFiles(const std::vector<std::string>& files); 38 void StoreChosenFiles(const std::vector<std::string>& files);
36 39
37 // PPB_FileChooser implementation. 40 // PPB_FileChooser implementation.
38 int32_t Show(PP_CompletionCallback callback); 41 int32_t Show(PP_CompletionCallback callback);
39 scoped_refptr<FileRef> GetNextChosenFile(); 42 scoped_refptr<PPB_FileRef_Impl> GetNextChosenFile();
40 43
41 private: 44 private:
42 PluginDelegate* delegate_; 45 PluginDelegate* delegate_;
43 PP_FileChooserMode_Dev mode_; 46 PP_FileChooserMode_Dev mode_;
44 std::string accept_mime_types_; 47 std::string accept_mime_types_;
45 PP_CompletionCallback completion_callback_; 48 PP_CompletionCallback completion_callback_;
46 std::vector< scoped_refptr<FileRef> > chosen_files_; 49 std::vector< scoped_refptr<PPB_FileRef_Impl> > chosen_files_;
47 size_t next_chosen_file_index_; 50 size_t next_chosen_file_index_;
48 }; 51 };
49 52
50 } // namespace pepper 53 } // namespace ppapi
54 } // namespace plugins
55 } // namespace webkit
51 56
52 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_ 57 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698