| 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/proxy/audio_input_resource.h" | 9 #include "ppapi/proxy/audio_input_resource.h" |
| 10 #include "ppapi/proxy/camera_device_resource.h" | 10 #include "ppapi/proxy/camera_device_resource.h" |
| 11 #include "ppapi/proxy/compositor_resource.h" | 11 #include "ppapi/proxy/compositor_resource.h" |
| 12 #include "ppapi/proxy/connection.h" | 12 #include "ppapi/proxy/connection.h" |
| 13 #include "ppapi/proxy/file_chooser_resource.h" | 13 #include "ppapi/proxy/file_chooser_resource.h" |
| 14 #include "ppapi/proxy/file_io_resource.h" | 14 #include "ppapi/proxy/file_io_resource.h" |
| 15 #include "ppapi/proxy/file_ref_resource.h" | 15 #include "ppapi/proxy/file_ref_resource.h" |
| 16 #include "ppapi/proxy/file_system_resource.h" | 16 #include "ppapi/proxy/file_system_resource.h" |
| 17 #include "ppapi/proxy/filesystem_provider_resource.h" |
| 17 #include "ppapi/proxy/flash_drm_resource.h" | 18 #include "ppapi/proxy/flash_drm_resource.h" |
| 18 #include "ppapi/proxy/flash_font_file_resource.h" | 19 #include "ppapi/proxy/flash_font_file_resource.h" |
| 19 #include "ppapi/proxy/flash_menu_resource.h" | 20 #include "ppapi/proxy/flash_menu_resource.h" |
| 20 #include "ppapi/proxy/graphics_2d_resource.h" | 21 #include "ppapi/proxy/graphics_2d_resource.h" |
| 21 #include "ppapi/proxy/host_resolver_private_resource.h" | 22 #include "ppapi/proxy/host_resolver_private_resource.h" |
| 22 #include "ppapi/proxy/host_resolver_resource.h" | 23 #include "ppapi/proxy/host_resolver_resource.h" |
| 23 #include "ppapi/proxy/media_stream_video_track_resource.h" | 24 #include "ppapi/proxy/media_stream_video_track_resource.h" |
| 24 #include "ppapi/proxy/net_address_resource.h" | 25 #include "ppapi/proxy/net_address_resource.h" |
| 25 #include "ppapi/proxy/network_monitor_resource.h" | 26 #include "ppapi/proxy/network_monitor_resource.h" |
| 26 #include "ppapi/proxy/output_protection_resource.h" | 27 #include "ppapi/proxy/output_protection_resource.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 405 |
| 405 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { | 406 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { |
| 406 return (new WebSocketResource(GetConnection(), instance))->GetReference(); | 407 return (new WebSocketResource(GetConnection(), instance))->GetReference(); |
| 407 } | 408 } |
| 408 | 409 |
| 409 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( | 410 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( |
| 410 PP_Instance instance) { | 411 PP_Instance instance) { |
| 411 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); | 412 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); |
| 412 } | 413 } |
| 413 | 414 |
| 415 PP_Resource ResourceCreationProxy::CreateFilesystemProvider( |
| 416 PP_Instance instance) { |
| 417 return (new FilesystemProviderResource( |
| 418 GetConnection(), instance))->GetReference(); |
| 419 } |
| 420 |
| 414 #if !defined(OS_NACL) | 421 #if !defined(OS_NACL) |
| 415 PP_Resource ResourceCreationProxy::CreateAudioInput( | 422 PP_Resource ResourceCreationProxy::CreateAudioInput( |
| 416 PP_Instance instance) { | 423 PP_Instance instance) { |
| 417 return (new AudioInputResource(GetConnection(), instance))->GetReference(); | 424 return (new AudioInputResource(GetConnection(), instance))->GetReference(); |
| 418 } | 425 } |
| 419 | 426 |
| 420 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { | 427 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { |
| 421 return PPB_Broker_Proxy::CreateProxyResource(instance); | 428 return PPB_Broker_Proxy::CreateProxyResource(instance); |
| 422 } | 429 } |
| 423 | 430 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 return 0; | 482 return 0; |
| 476 return (new VideoCaptureResource(GetConnection(), instance, dispatcher)) | 483 return (new VideoCaptureResource(GetConnection(), instance, dispatcher)) |
| 477 ->GetReference(); | 484 ->GetReference(); |
| 478 } | 485 } |
| 479 | 486 |
| 480 PP_Resource ResourceCreationProxy::CreateVideoDecoderDev( | 487 PP_Resource ResourceCreationProxy::CreateVideoDecoderDev( |
| 481 PP_Instance instance, | 488 PP_Instance instance, |
| 482 PP_Resource context3d_id, | 489 PP_Resource context3d_id, |
| 483 PP_VideoDecoder_Profile profile) { | 490 PP_VideoDecoder_Profile profile) { |
| 484 return PPB_VideoDecoder_Proxy::CreateProxyResource( | 491 return PPB_VideoDecoder_Proxy::CreateProxyResource( |
| 485 instance, context3d_id, profile); | 492 instance, context3d_id, profile); |
| 486 } | 493 } |
| 487 | 494 |
| 488 #endif // !defined(OS_NACL) | 495 #endif // !defined(OS_NACL) |
| 489 | 496 |
| 490 bool ResourceCreationProxy::Send(IPC::Message* msg) { | 497 bool ResourceCreationProxy::Send(IPC::Message* msg) { |
| 491 return dispatcher()->Send(msg); | 498 return dispatcher()->Send(msg); |
| 492 } | 499 } |
| 493 | 500 |
| 494 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 501 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
| 495 return false; | 502 return false; |
| 496 } | 503 } |
| 497 | 504 |
| 498 Connection ResourceCreationProxy::GetConnection() { | 505 Connection ResourceCreationProxy::GetConnection() { |
| 499 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 506 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 500 } | 507 } |
| 501 | 508 |
| 502 } // namespace proxy | 509 } // namespace proxy |
| 503 } // namespace ppapi | 510 } // namespace ppapi |
| OLD | NEW |