| 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/audio_input_resource.h" | 10 #include "ppapi/proxy/audio_input_resource.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "ppapi/proxy/ppb_audio_proxy.h" | 26 #include "ppapi/proxy/ppb_audio_proxy.h" |
| 27 #include "ppapi/proxy/ppb_broker_proxy.h" | 27 #include "ppapi/proxy/ppb_broker_proxy.h" |
| 28 #include "ppapi/proxy/ppb_buffer_proxy.h" | 28 #include "ppapi/proxy/ppb_buffer_proxy.h" |
| 29 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 29 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
| 30 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" | 30 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" |
| 31 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 31 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
| 32 #include "ppapi/proxy/ppb_image_data_proxy.h" | 32 #include "ppapi/proxy/ppb_image_data_proxy.h" |
| 33 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" | 33 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" |
| 34 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" | 34 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" |
| 35 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" | 35 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" |
| 36 #include "ppapi/proxy/ppb_url_loader_proxy.h" | |
| 37 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 36 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
| 38 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" | 37 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" |
| 39 #include "ppapi/proxy/printing_resource.h" | 38 #include "ppapi/proxy/printing_resource.h" |
| 40 #include "ppapi/proxy/talk_resource.h" | 39 #include "ppapi/proxy/talk_resource.h" |
| 41 #include "ppapi/proxy/truetype_font_resource.h" | 40 #include "ppapi/proxy/truetype_font_resource.h" |
| 42 #include "ppapi/proxy/udp_socket_private_resource.h" | 41 #include "ppapi/proxy/udp_socket_private_resource.h" |
| 42 #include "ppapi/proxy/url_loader_resource.h" |
| 43 #include "ppapi/proxy/url_request_info_resource.h" | 43 #include "ppapi/proxy/url_request_info_resource.h" |
| 44 #include "ppapi/proxy/url_response_info_resource.h" | 44 #include "ppapi/proxy/url_response_info_resource.h" |
| 45 #include "ppapi/proxy/video_capture_resource.h" | 45 #include "ppapi/proxy/video_capture_resource.h" |
| 46 #include "ppapi/proxy/video_destination_resource.h" | 46 #include "ppapi/proxy/video_destination_resource.h" |
| 47 #include "ppapi/proxy/video_source_resource.h" | 47 #include "ppapi/proxy/video_source_resource.h" |
| 48 #include "ppapi/proxy/websocket_resource.h" | 48 #include "ppapi/proxy/websocket_resource.h" |
| 49 #include "ppapi/shared_impl/api_id.h" | 49 #include "ppapi/shared_impl/api_id.h" |
| 50 #include "ppapi/shared_impl/host_resource.h" | 50 #include "ppapi/shared_impl/host_resource.h" |
| 51 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 51 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
| 52 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 52 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 75 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { | 75 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { |
| 76 return (new FileIOResource(GetConnection(), instance))->GetReference(); | 76 return (new FileIOResource(GetConnection(), instance))->GetReference(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, | 79 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, |
| 80 PP_Resource file_system, | 80 PP_Resource file_system, |
| 81 const char* path) { | 81 const char* path) { |
| 82 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); | 82 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); |
| 83 } | 83 } |
| 84 | 84 |
| 85 PP_Resource ResourceCreationProxy::CreateFileRef( |
| 86 const PPB_FileRef_CreateInfo& create_info) { |
| 87 return PPB_FileRef_Proxy::DeserializeFileRef(create_info); |
| 88 } |
| 89 |
| 85 PP_Resource ResourceCreationProxy::CreateFileSystem( | 90 PP_Resource ResourceCreationProxy::CreateFileSystem( |
| 86 PP_Instance instance, | 91 PP_Instance instance, |
| 87 PP_FileSystemType type) { | 92 PP_FileSystemType type) { |
| 88 return (new FileSystemResource(GetConnection(), instance, | 93 return (new FileSystemResource(GetConnection(), instance, |
| 89 type))->GetReference(); | 94 type))->GetReference(); |
| 90 } | 95 } |
| 91 | 96 |
| 92 PP_Resource ResourceCreationProxy::CreateIsolatedFileSystem( | 97 PP_Resource ResourceCreationProxy::CreateIsolatedFileSystem( |
| 93 PP_Instance instance, | 98 PP_Instance instance, |
| 94 const char* fsid) { | 99 const char* fsid) { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 164 |
| 160 PP_Resource ResourceCreationProxy::CreateTrueTypeFont( | 165 PP_Resource ResourceCreationProxy::CreateTrueTypeFont( |
| 161 PP_Instance instance, | 166 PP_Instance instance, |
| 162 const PP_TrueTypeFontDesc_Dev* desc) { | 167 const PP_TrueTypeFontDesc_Dev* desc) { |
| 163 return (new TrueTypeFontResource(GetConnection(), | 168 return (new TrueTypeFontResource(GetConnection(), |
| 164 instance, *desc))->GetReference(); | 169 instance, *desc))->GetReference(); |
| 165 | 170 |
| 166 } | 171 } |
| 167 | 172 |
| 168 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { | 173 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { |
| 169 return PPB_URLLoader_Proxy::CreateProxyResource(instance); | 174 return (new URLLoaderResource(GetConnection(), instance))->GetReference(); |
| 170 } | 175 } |
| 171 | 176 |
| 172 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( | 177 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( |
| 173 PP_Instance instance) { | 178 PP_Instance instance) { |
| 174 return (new URLRequestInfoResource( | 179 return (new URLRequestInfoResource( |
| 175 GetConnection(), instance, URLRequestInfoData()))->GetReference(); | 180 GetConnection(), instance, URLRequestInfoData()))->GetReference(); |
| 176 } | 181 } |
| 177 | 182 |
| 178 PP_Resource ResourceCreationProxy::CreateURLResponseInfo( | 183 PP_Resource ResourceCreationProxy::CreateURLResponseInfo( |
| 179 PP_Instance instance, | 184 PP_Instance instance, |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 419 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
| 415 return false; | 420 return false; |
| 416 } | 421 } |
| 417 | 422 |
| 418 Connection ResourceCreationProxy::GetConnection() { | 423 Connection ResourceCreationProxy::GetConnection() { |
| 419 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 424 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 420 } | 425 } |
| 421 | 426 |
| 422 } // namespace proxy | 427 } // namespace proxy |
| 423 } // namespace ppapi | 428 } // namespace ppapi |
| OLD | NEW |