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/connection.h" |
10 #include "ppapi/proxy/file_chooser_resource.h" | 11 #include "ppapi/proxy/file_chooser_resource.h" |
11 #include "ppapi/proxy/plugin_dispatcher.h" | 12 #include "ppapi/proxy/plugin_dispatcher.h" |
| 13 #include "ppapi/proxy/plugin_globals.h" |
| 14 #include "ppapi/proxy/plugin_proxy_delegate.h" |
12 #include "ppapi/proxy/plugin_resource_tracker.h" | 15 #include "ppapi/proxy/plugin_resource_tracker.h" |
13 #include "ppapi/proxy/ppapi_messages.h" | 16 #include "ppapi/proxy/ppapi_messages.h" |
14 #include "ppapi/proxy/ppb_audio_input_proxy.h" | 17 #include "ppapi/proxy/ppb_audio_input_proxy.h" |
15 #include "ppapi/proxy/ppb_audio_proxy.h" | 18 #include "ppapi/proxy/ppb_audio_proxy.h" |
16 #include "ppapi/proxy/ppb_buffer_proxy.h" | 19 #include "ppapi/proxy/ppb_buffer_proxy.h" |
17 #include "ppapi/proxy/ppb_broker_proxy.h" | 20 #include "ppapi/proxy/ppb_broker_proxy.h" |
18 #include "ppapi/proxy/ppb_file_io_proxy.h" | 21 #include "ppapi/proxy/ppb_file_io_proxy.h" |
19 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 22 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
20 #include "ppapi/proxy/ppb_file_system_proxy.h" | 23 #include "ppapi/proxy/ppb_file_system_proxy.h" |
21 #include "ppapi/proxy/ppb_flash_device_id_proxy.h" | 24 #include "ppapi/proxy/ppb_flash_device_id_proxy.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 PP_Resource ResourceCreationProxy::CreateDirectoryReader( | 267 PP_Resource ResourceCreationProxy::CreateDirectoryReader( |
265 PP_Resource directory_ref) { | 268 PP_Resource directory_ref) { |
266 NOTIMPLEMENTED(); // Not proxied yet. | 269 NOTIMPLEMENTED(); // Not proxied yet. |
267 return 0; | 270 return 0; |
268 } | 271 } |
269 | 272 |
270 PP_Resource ResourceCreationProxy::CreateFileChooser( | 273 PP_Resource ResourceCreationProxy::CreateFileChooser( |
271 PP_Instance instance, | 274 PP_Instance instance, |
272 PP_FileChooserMode_Dev mode, | 275 PP_FileChooserMode_Dev mode, |
273 const char* accept_types) { | 276 const char* accept_types) { |
274 return (new FileChooserResource(dispatcher(), instance, mode, | 277 return (new FileChooserResource(GetConnection(), instance, mode, |
275 accept_types))->GetReference(); | 278 accept_types))->GetReference(); |
276 } | 279 } |
277 | 280 |
278 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { | 281 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { |
279 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); | 282 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); |
280 } | 283 } |
281 | 284 |
282 PP_Resource ResourceCreationProxy::CreateFlashMenu( | 285 PP_Resource ResourceCreationProxy::CreateFlashMenu( |
283 PP_Instance instance, | 286 PP_Instance instance, |
284 const PP_Flash_Menu* menu_data) { | 287 const PP_Flash_Menu* menu_data) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 | 363 |
361 | 364 |
362 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 365 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
363 return dispatcher()->Send(msg); | 366 return dispatcher()->Send(msg); |
364 } | 367 } |
365 | 368 |
366 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 369 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
367 return false; | 370 return false; |
368 } | 371 } |
369 | 372 |
| 373 Connection ResourceCreationProxy::GetConnection() { |
| 374 return Connection( |
| 375 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(), |
| 376 dispatcher()); |
| 377 } |
| 378 |
370 } // namespace proxy | 379 } // namespace proxy |
371 } // namespace ppapi | 380 } // namespace ppapi |
OLD | NEW |