| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 PPAPI_PROXY_FILE_CHOOSER_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_FILE_CHOOSER_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_FILE_CHOOSER_RESOURCE_H_ | 6 #define PPAPI_PROXY_FILE_CHOOSER_RESOURCE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 : public PluginResource, | 25 : public PluginResource, |
| 26 public NON_EXPORTED_BASE(thunk::PPB_FileChooser_API) { | 26 public NON_EXPORTED_BASE(thunk::PPB_FileChooser_API) { |
| 27 public: | 27 public: |
| 28 FileChooserResource(Connection connection, | 28 FileChooserResource(Connection connection, |
| 29 PP_Instance instance, | 29 PP_Instance instance, |
| 30 PP_FileChooserMode_Dev mode, | 30 PP_FileChooserMode_Dev mode, |
| 31 const std::string& accept_types); | 31 const std::string& accept_types); |
| 32 virtual ~FileChooserResource(); | 32 virtual ~FileChooserResource(); |
| 33 | 33 |
| 34 // Resource overrides. | 34 // Resource overrides. |
| 35 virtual thunk::PPB_FileChooser_API* AsPPB_FileChooser_API() OVERRIDE; | 35 virtual thunk::PPB_FileChooser_API* AsPPB_FileChooser_API() override; |
| 36 | 36 |
| 37 // PPB_FileChooser_API. | 37 // PPB_FileChooser_API. |
| 38 virtual int32_t Show(const PP_ArrayOutput& output, | 38 virtual int32_t Show(const PP_ArrayOutput& output, |
| 39 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 39 scoped_refptr<TrackedCallback> callback) override; |
| 40 virtual int32_t ShowWithoutUserGesture( | 40 virtual int32_t ShowWithoutUserGesture( |
| 41 PP_Bool save_as, | 41 PP_Bool save_as, |
| 42 PP_Var suggested_file_name, | 42 PP_Var suggested_file_name, |
| 43 const PP_ArrayOutput& output, | 43 const PP_ArrayOutput& output, |
| 44 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 44 scoped_refptr<TrackedCallback> callback) override; |
| 45 virtual int32_t Show0_5(scoped_refptr<TrackedCallback> callback) OVERRIDE; | 45 virtual int32_t Show0_5(scoped_refptr<TrackedCallback> callback) override; |
| 46 virtual PP_Resource GetNextChosenFile() OVERRIDE; | 46 virtual PP_Resource GetNextChosenFile() override; |
| 47 virtual int32_t ShowWithoutUserGesture0_5( | 47 virtual int32_t ShowWithoutUserGesture0_5( |
| 48 PP_Bool save_as, | 48 PP_Bool save_as, |
| 49 PP_Var suggested_file_name, | 49 PP_Var suggested_file_name, |
| 50 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 50 scoped_refptr<TrackedCallback> callback) override; |
| 51 | 51 |
| 52 // Parses the accept string into the given vector. | 52 // Parses the accept string into the given vector. |
| 53 static void PopulateAcceptTypes(const std::string& input, | 53 static void PopulateAcceptTypes(const std::string& input, |
| 54 std::vector<std::string>* output); | 54 std::vector<std::string>* output); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 void OnPluginMsgShowReply( | 57 void OnPluginMsgShowReply( |
| 58 const ResourceMessageReplyParams& params, | 58 const ResourceMessageReplyParams& params, |
| 59 const std::vector<FileRefCreateInfo>& chosen_files); | 59 const std::vector<FileRefCreateInfo>& chosen_files); |
| 60 | 60 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 76 | 76 |
| 77 scoped_refptr<TrackedCallback> callback_; | 77 scoped_refptr<TrackedCallback> callback_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(FileChooserResource); | 79 DISALLOW_COPY_AND_ASSIGN(FileChooserResource); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace proxy | 82 } // namespace proxy |
| 83 } // namespace ppapi | 83 } // namespace ppapi |
| 84 | 84 |
| 85 #endif // PPAPI_PROXY_FILE_CHOOSER_RESOURCE_H_ | 85 #endif // PPAPI_PROXY_FILE_CHOOSER_RESOURCE_H_ |
| OLD | NEW |