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 14 matching lines...) Expand all Loading... |
25 #include "ppapi/proxy/ppb_audio_proxy.h" | 25 #include "ppapi/proxy/ppb_audio_proxy.h" |
26 #include "ppapi/proxy/ppb_broker_proxy.h" | 26 #include "ppapi/proxy/ppb_broker_proxy.h" |
27 #include "ppapi/proxy/ppb_buffer_proxy.h" | 27 #include "ppapi/proxy/ppb_buffer_proxy.h" |
28 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 28 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
29 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" | 29 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" |
30 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 30 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
31 #include "ppapi/proxy/ppb_image_data_proxy.h" | 31 #include "ppapi/proxy/ppb_image_data_proxy.h" |
32 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" | 32 #include "ppapi/proxy/ppb_network_monitor_private_proxy.h" |
33 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" | 33 #include "ppapi/proxy/ppb_tcp_server_socket_private_proxy.h" |
34 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" | 34 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" |
35 #include "ppapi/proxy/ppb_url_loader_proxy.h" | |
36 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 35 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
37 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" | 36 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" |
38 #include "ppapi/proxy/printing_resource.h" | 37 #include "ppapi/proxy/printing_resource.h" |
39 #include "ppapi/proxy/talk_resource.h" | 38 #include "ppapi/proxy/talk_resource.h" |
40 #include "ppapi/proxy/truetype_font_resource.h" | 39 #include "ppapi/proxy/truetype_font_resource.h" |
41 #include "ppapi/proxy/udp_socket_private_resource.h" | 40 #include "ppapi/proxy/udp_socket_private_resource.h" |
| 41 #include "ppapi/proxy/url_loader_resource.h" |
42 #include "ppapi/proxy/url_request_info_resource.h" | 42 #include "ppapi/proxy/url_request_info_resource.h" |
43 #include "ppapi/proxy/url_response_info_resource.h" | 43 #include "ppapi/proxy/url_response_info_resource.h" |
44 #include "ppapi/proxy/video_capture_resource.h" | 44 #include "ppapi/proxy/video_capture_resource.h" |
45 #include "ppapi/proxy/video_destination_resource.h" | 45 #include "ppapi/proxy/video_destination_resource.h" |
46 #include "ppapi/proxy/video_source_resource.h" | 46 #include "ppapi/proxy/video_source_resource.h" |
47 #include "ppapi/proxy/websocket_resource.h" | 47 #include "ppapi/proxy/websocket_resource.h" |
48 #include "ppapi/shared_impl/api_id.h" | 48 #include "ppapi/shared_impl/api_id.h" |
49 #include "ppapi/shared_impl/host_resource.h" | 49 #include "ppapi/shared_impl/host_resource.h" |
50 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 50 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
51 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 51 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
(...skipping 22 matching lines...) Expand all Loading... |
74 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { | 74 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { |
75 return (new FileIOResource(GetConnection(), instance))->GetReference(); | 75 return (new FileIOResource(GetConnection(), instance))->GetReference(); |
76 } | 76 } |
77 | 77 |
78 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, | 78 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, |
79 PP_Resource file_system, | 79 PP_Resource file_system, |
80 const char* path) { | 80 const char* path) { |
81 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); | 81 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); |
82 } | 82 } |
83 | 83 |
| 84 PP_Resource ResourceCreationProxy::CreateFileRef( |
| 85 const PPB_FileRef_CreateInfo& create_info) { |
| 86 return PPB_FileRef_Proxy::DeserializeFileRef(create_info); |
| 87 } |
| 88 |
84 PP_Resource ResourceCreationProxy::CreateFileSystem( | 89 PP_Resource ResourceCreationProxy::CreateFileSystem( |
85 PP_Instance instance, | 90 PP_Instance instance, |
86 PP_FileSystemType type) { | 91 PP_FileSystemType type) { |
87 return (new FileSystemResource(GetConnection(), instance, | 92 return (new FileSystemResource(GetConnection(), instance, |
88 type))->GetReference(); | 93 type))->GetReference(); |
89 } | 94 } |
90 | 95 |
91 PP_Resource ResourceCreationProxy::CreateIMEInputEvent( | 96 PP_Resource ResourceCreationProxy::CreateIMEInputEvent( |
92 PP_Instance instance, | 97 PP_Instance instance, |
93 PP_InputEvent_Type type, | 98 PP_InputEvent_Type type, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 154 |
150 PP_Resource ResourceCreationProxy::CreateTrueTypeFont( | 155 PP_Resource ResourceCreationProxy::CreateTrueTypeFont( |
151 PP_Instance instance, | 156 PP_Instance instance, |
152 const PP_TrueTypeFontDesc_Dev* desc) { | 157 const PP_TrueTypeFontDesc_Dev* desc) { |
153 return (new TrueTypeFontResource(GetConnection(), | 158 return (new TrueTypeFontResource(GetConnection(), |
154 instance, *desc))->GetReference(); | 159 instance, *desc))->GetReference(); |
155 | 160 |
156 } | 161 } |
157 | 162 |
158 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { | 163 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { |
159 return PPB_URLLoader_Proxy::CreateProxyResource(instance); | 164 return (new URLLoaderResource(GetConnection(), instance))->GetReference(); |
160 } | 165 } |
161 | 166 |
162 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( | 167 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( |
163 PP_Instance instance) { | 168 PP_Instance instance) { |
164 return (new URLRequestInfoResource( | 169 return (new URLRequestInfoResource( |
165 GetConnection(), instance, URLRequestInfoData()))->GetReference(); | 170 GetConnection(), instance, URLRequestInfoData()))->GetReference(); |
166 } | 171 } |
167 | 172 |
168 PP_Resource ResourceCreationProxy::CreateURLResponseInfo( | 173 PP_Resource ResourceCreationProxy::CreateURLResponseInfo( |
169 PP_Instance instance, | 174 PP_Instance instance, |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 409 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
405 return false; | 410 return false; |
406 } | 411 } |
407 | 412 |
408 Connection ResourceCreationProxy::GetConnection() { | 413 Connection ResourceCreationProxy::GetConnection() { |
409 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 414 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
410 } | 415 } |
411 | 416 |
412 } // namespace proxy | 417 } // namespace proxy |
413 } // namespace ppapi | 418 } // namespace ppapi |
OLD | NEW |