OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_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 |
(...skipping 17 matching lines...) Expand all Loading... |
28 PPB_FileChooser_Impl(PluginInstance* instance, | 28 PPB_FileChooser_Impl(PluginInstance* instance, |
29 const PP_FileChooserOptions_Dev* options); | 29 const PP_FileChooserOptions_Dev* options); |
30 virtual ~PPB_FileChooser_Impl(); | 30 virtual ~PPB_FileChooser_Impl(); |
31 | 31 |
32 static PP_Resource Create(PluginInstance* instance, | 32 static PP_Resource Create(PluginInstance* instance, |
33 const PP_FileChooserOptions_Dev* options); | 33 const PP_FileChooserOptions_Dev* options); |
34 | 34 |
35 // Resource overrides. | 35 // Resource overrides. |
36 virtual PPB_FileChooser_Impl* AsPPB_FileChooser_Impl(); | 36 virtual PPB_FileChooser_Impl* AsPPB_FileChooser_Impl(); |
37 | 37 |
38 // ResourceObjectBase overrides. | 38 // Resource overrides. |
39 virtual ::ppapi::thunk::PPB_FileChooser_API* AsPPB_FileChooser_API() OVERRIDE; | 39 virtual ::ppapi::thunk::PPB_FileChooser_API* AsPPB_FileChooser_API() OVERRIDE; |
40 | 40 |
41 // Stores the list of selected files. | 41 // Stores the list of selected files. |
42 void StoreChosenFiles(const std::vector<std::string>& files); | 42 void StoreChosenFiles(const std::vector<std::string>& files); |
43 | 43 |
44 // Check that |callback| is valid (only non-blocking operation is supported) | 44 // Check that |callback| is valid (only non-blocking operation is supported) |
45 // and that no callback is already pending. Returns |PP_OK| if okay, else | 45 // and that no callback is already pending. Returns |PP_OK| if okay, else |
46 // |PP_ERROR_...| to be returned to the plugin. | 46 // |PP_ERROR_...| to be returned to the plugin. |
47 int32_t ValidateCallback(const PP_CompletionCallback& callback); | 47 int32_t ValidateCallback(const PP_CompletionCallback& callback); |
48 | 48 |
(...skipping 12 matching lines...) Expand all Loading... |
61 std::string accept_mime_types_; | 61 std::string accept_mime_types_; |
62 scoped_refptr<TrackedCompletionCallback> callback_; | 62 scoped_refptr<TrackedCompletionCallback> callback_; |
63 std::vector< scoped_refptr<PPB_FileRef_Impl> > chosen_files_; | 63 std::vector< scoped_refptr<PPB_FileRef_Impl> > chosen_files_; |
64 size_t next_chosen_file_index_; | 64 size_t next_chosen_file_index_; |
65 }; | 65 }; |
66 | 66 |
67 } // namespace ppapi | 67 } // namespace ppapi |
68 } // namespace webkit | 68 } // namespace webkit |
69 | 69 |
70 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_ | 70 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_CHOOSER_IMPL_H_ |
OLD | NEW |