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

Side by Side Diff: webkit/glue/plugins/pepper_file_chooser.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
(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 #include <vector>
10
11 #include "base/scoped_ptr.h"
12 #include "ppapi/c/dev/ppb_file_chooser_dev.h"
13 #include "ppapi/c/pp_completion_callback.h"
14 #include "webkit/glue/plugins/pepper_resource.h"
15
16 namespace pepper {
17
18 class PluginDelegate;
19 class PluginInstance;
20
21 class FileChooser : public Resource {
22 public:
23 FileChooser(PluginInstance* instance,
24 const PP_FileChooserOptions_Dev* options);
25 virtual ~FileChooser();
26
27 // Returns a pointer to the interface implementing PPB_FileChooser that is
28 // exposed to the plugin.
29 static const PPB_FileChooser_Dev* GetInterface();
30
31 // Resource overrides.
32 virtual FileChooser* AsFileChooser();
33
34 // Stores the list of selected files.
35 void StoreChosenFiles(const std::vector<std::string>& files);
36
37 // PPB_FileChooser implementation.
38 int32_t Show(PP_CompletionCallback callback);
39 scoped_refptr<FileRef> GetNextChosenFile();
40
41 private:
42 PluginDelegate* delegate_;
43 PP_FileChooserMode_Dev mode_;
44 std::string accept_mime_types_;
45 PP_CompletionCallback completion_callback_;
46 std::vector< scoped_refptr<FileRef> > chosen_files_;
47 size_t next_chosen_file_index_;
48 };
49
50 } // namespace pepper
51
52 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_CHOOSER_H_
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_file_callbacks.cc ('k') | webkit/glue/plugins/pepper_file_chooser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698