| 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
| 9 #include "ppapi/c/pp_size.h" | 9 #include "ppapi/c/pp_size.h" |
| 10 #include "ppapi/proxy/audio_encoder_resource.h" | 10 #include "ppapi/proxy/audio_encoder_resource.h" |
| 11 #include "ppapi/proxy/audio_input_resource.h" | 11 #include "ppapi/proxy/audio_input_resource.h" |
| 12 #include "ppapi/proxy/audio_output_resource.h" |
| 12 #include "ppapi/proxy/camera_device_resource.h" | 13 #include "ppapi/proxy/camera_device_resource.h" |
| 13 #include "ppapi/proxy/compositor_resource.h" | 14 #include "ppapi/proxy/compositor_resource.h" |
| 14 #include "ppapi/proxy/connection.h" | 15 #include "ppapi/proxy/connection.h" |
| 15 #include "ppapi/proxy/file_chooser_resource.h" | 16 #include "ppapi/proxy/file_chooser_resource.h" |
| 16 #include "ppapi/proxy/file_io_resource.h" | 17 #include "ppapi/proxy/file_io_resource.h" |
| 17 #include "ppapi/proxy/file_ref_resource.h" | 18 #include "ppapi/proxy/file_ref_resource.h" |
| 18 #include "ppapi/proxy/file_system_resource.h" | 19 #include "ppapi/proxy/file_system_resource.h" |
| 19 #include "ppapi/proxy/flash_drm_resource.h" | 20 #include "ppapi/proxy/flash_drm_resource.h" |
| 20 #include "ppapi/proxy/flash_font_file_resource.h" | 21 #include "ppapi/proxy/flash_font_file_resource.h" |
| 21 #include "ppapi/proxy/flash_menu_resource.h" | 22 #include "ppapi/proxy/flash_menu_resource.h" |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 PP_Instance instance) { | 423 PP_Instance instance) { |
| 423 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); | 424 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); |
| 424 } | 425 } |
| 425 | 426 |
| 426 #if !defined(OS_NACL) | 427 #if !defined(OS_NACL) |
| 427 PP_Resource ResourceCreationProxy::CreateAudioInput( | 428 PP_Resource ResourceCreationProxy::CreateAudioInput( |
| 428 PP_Instance instance) { | 429 PP_Instance instance) { |
| 429 return (new AudioInputResource(GetConnection(), instance))->GetReference(); | 430 return (new AudioInputResource(GetConnection(), instance))->GetReference(); |
| 430 } | 431 } |
| 431 | 432 |
| 433 PP_Resource ResourceCreationProxy::CreateAudioOutput(PP_Instance instance) { |
| 434 return (new AudioOutputResource(GetConnection(), instance))->GetReference(); |
| 435 } |
| 436 |
| 432 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { | 437 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { |
| 433 return PPB_Broker_Proxy::CreateProxyResource(instance); | 438 return PPB_Broker_Proxy::CreateProxyResource(instance); |
| 434 } | 439 } |
| 435 | 440 |
| 436 PP_Resource ResourceCreationProxy::CreateBrowserFont( | 441 PP_Resource ResourceCreationProxy::CreateBrowserFont( |
| 437 PP_Instance instance, | 442 PP_Instance instance, |
| 438 const PP_BrowserFont_Trusted_Description* description) { | 443 const PP_BrowserFont_Trusted_Description* description) { |
| 439 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); | 444 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
| 440 if (!dispatcher) | 445 if (!dispatcher) |
| 441 return 0; | 446 return 0; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 511 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
| 507 return false; | 512 return false; |
| 508 } | 513 } |
| 509 | 514 |
| 510 Connection ResourceCreationProxy::GetConnection() { | 515 Connection ResourceCreationProxy::GetConnection() { |
| 511 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 516 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 512 } | 517 } |
| 513 | 518 |
| 514 } // namespace proxy | 519 } // namespace proxy |
| 515 } // namespace ppapi | 520 } // namespace ppapi |
| OLD | NEW |