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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 PP_Resource ResourceCreationProxy::CreateDirectoryReader( | 234 PP_Resource ResourceCreationProxy::CreateDirectoryReader( |
235 PP_Resource directory_ref) { | 235 PP_Resource directory_ref) { |
236 NOTIMPLEMENTED(); // Not proxied yet. | 236 NOTIMPLEMENTED(); // Not proxied yet. |
237 return 0; | 237 return 0; |
238 } | 238 } |
239 | 239 |
240 PP_Resource ResourceCreationProxy::CreateFileChooser( | 240 PP_Resource ResourceCreationProxy::CreateFileChooser( |
241 PP_Instance instance, | 241 PP_Instance instance, |
242 PP_FileChooserMode_Dev mode, | 242 PP_FileChooserMode_Dev mode, |
243 const char* accept_types) { | 243 const char* accept_types) { |
244 return PPB_FileChooser_Proxy::CreateProxyResource(instance, mode, | 244 return (new FileChooserResource(dispatcher(), instance, mode, |
245 accept_types); | 245 accept_types))->GetReference(); |
246 } | 246 } |
247 | 247 |
248 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { | 248 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { |
249 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); | 249 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); |
250 } | 250 } |
251 | 251 |
252 PP_Resource ResourceCreationProxy::CreateFlashMenu( | 252 PP_Resource ResourceCreationProxy::CreateFlashMenu( |
253 PP_Instance instance, | 253 PP_Instance instance, |
254 const PP_Flash_Menu* menu_data) { | 254 const PP_Flash_Menu* menu_data) { |
255 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data); | 255 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data); |
(...skipping 93 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 |