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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 PP_Resource ResourceCreationProxy::CreateDirectoryReader( | 237 PP_Resource ResourceCreationProxy::CreateDirectoryReader( |
235 PP_Resource directory_ref) { | 238 PP_Resource directory_ref) { |
236 NOTIMPLEMENTED(); // Not proxied yet. | 239 NOTIMPLEMENTED(); // Not proxied yet. |
237 return 0; | 240 return 0; |
238 } | 241 } |
239 | 242 |
240 PP_Resource ResourceCreationProxy::CreateFileChooser( | 243 PP_Resource ResourceCreationProxy::CreateFileChooser( |
241 PP_Instance instance, | 244 PP_Instance instance, |
242 PP_FileChooserMode_Dev mode, | 245 PP_FileChooserMode_Dev mode, |
243 const char* accept_types) { | 246 const char* accept_types) { |
244 return (new FileChooserResource(dispatcher(), instance, mode, | 247 return (new FileChooserResource(GetConnection(), instance, mode, |
245 accept_types))->GetReference(); | 248 accept_types))->GetReference(); |
246 } | 249 } |
247 | 250 |
248 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { | 251 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { |
249 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); | 252 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); |
250 } | 253 } |
251 | 254 |
252 PP_Resource ResourceCreationProxy::CreateFlashMenu( | 255 PP_Resource ResourceCreationProxy::CreateFlashMenu( |
253 PP_Instance instance, | 256 PP_Instance instance, |
254 const PP_Flash_Menu* menu_data) { | 257 const PP_Flash_Menu* menu_data) { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 350 |
348 | 351 |
349 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 352 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
350 return dispatcher()->Send(msg); | 353 return dispatcher()->Send(msg); |
351 } | 354 } |
352 | 355 |
353 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 356 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
354 return false; | 357 return false; |
355 } | 358 } |
356 | 359 |
| 360 Connection ResourceCreationProxy::GetConnection() { |
| 361 return Connection( |
| 362 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(), |
| 363 dispatcher()); |
| 364 } |
| 365 |
357 } // namespace proxy | 366 } // namespace proxy |
358 } // namespace ppapi | 367 } // namespace ppapi |
OLD | NEW |