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 #include "ppapi/proxy/resource_creation_proxy.h" | 5 #include "ppapi/proxy/resource_creation_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/pp_size.h" | 8 #include "ppapi/c/pp_size.h" |
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" | 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
| 10 #include "ppapi/proxy/file_chooser_resource.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 11 #include "ppapi/proxy/plugin_dispatcher.h" |
11 #include "ppapi/proxy/plugin_resource_tracker.h" | 12 #include "ppapi/proxy/plugin_resource_tracker.h" |
12 #include "ppapi/proxy/ppapi_messages.h" | 13 #include "ppapi/proxy/ppapi_messages.h" |
13 #include "ppapi/proxy/ppb_audio_input_proxy.h" | 14 #include "ppapi/proxy/ppb_audio_input_proxy.h" |
14 #include "ppapi/proxy/ppb_audio_proxy.h" | 15 #include "ppapi/proxy/ppb_audio_proxy.h" |
15 #include "ppapi/proxy/ppb_buffer_proxy.h" | 16 #include "ppapi/proxy/ppb_buffer_proxy.h" |
16 #include "ppapi/proxy/ppb_broker_proxy.h" | 17 #include "ppapi/proxy/ppb_broker_proxy.h" |
17 #include "ppapi/proxy/ppb_file_chooser_proxy.h" | |
18 #include "ppapi/proxy/ppb_file_io_proxy.h" | 18 #include "ppapi/proxy/ppb_file_io_proxy.h" |
19 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 19 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
20 #include "ppapi/proxy/ppb_file_system_proxy.h" | 20 #include "ppapi/proxy/ppb_file_system_proxy.h" |
21 #include "ppapi/proxy/ppb_flash_device_id_proxy.h" | 21 #include "ppapi/proxy/ppb_flash_device_id_proxy.h" |
22 #include "ppapi/proxy/ppb_flash_menu_proxy.h" | 22 #include "ppapi/proxy/ppb_flash_menu_proxy.h" |
23 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" | 23 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" |
24 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 24 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
25 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 25 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
26 #include "ppapi/proxy/ppb_host_resolver_private_proxy.h" | 26 #include "ppapi/proxy/ppb_host_resolver_private_proxy.h" |
27 #include "ppapi/proxy/ppb_image_data_proxy.h" | 27 #include "ppapi/proxy/ppb_image_data_proxy.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 PP_Resource ResourceCreationProxy::CreateDirectoryReader( | 227 PP_Resource ResourceCreationProxy::CreateDirectoryReader( |
228 PP_Resource directory_ref) { | 228 PP_Resource directory_ref) { |
229 NOTIMPLEMENTED(); // Not proxied yet. | 229 NOTIMPLEMENTED(); // Not proxied yet. |
230 return 0; | 230 return 0; |
231 } | 231 } |
232 | 232 |
233 PP_Resource ResourceCreationProxy::CreateFileChooser( | 233 PP_Resource ResourceCreationProxy::CreateFileChooser( |
234 PP_Instance instance, | 234 PP_Instance instance, |
235 PP_FileChooserMode_Dev mode, | 235 PP_FileChooserMode_Dev mode, |
236 const char* accept_types) { | 236 const char* accept_types) { |
237 return PPB_FileChooser_Proxy::CreateProxyResource(instance, mode, | 237 return (new FileChooserResource(dispatcher(), instance, mode, |
238 accept_types); | 238 accept_types))->GetReference(); |
239 } | 239 } |
240 | 240 |
241 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { | 241 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { |
242 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); | 242 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); |
243 } | 243 } |
244 | 244 |
245 PP_Resource ResourceCreationProxy::CreateFlashMenu( | 245 PP_Resource ResourceCreationProxy::CreateFlashMenu( |
246 PP_Instance instance, | 246 PP_Instance instance, |
247 const PP_Flash_Menu* menu_data) { | 247 const PP_Flash_Menu* menu_data) { |
248 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data); | 248 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 349 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
350 return dispatcher()->Send(msg); | 350 return dispatcher()->Send(msg); |
351 } | 351 } |
352 | 352 |
353 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 353 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
354 return false; | 354 return false; |
355 } | 355 } |
356 | 356 |
357 } // namespace proxy | 357 } // namespace proxy |
358 } // namespace ppapi | 358 } // namespace ppapi |
OLD | NEW |