Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 11416064: Convert URLLoader to the new proxy design (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments, merge Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/url_loader_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
26 #include "ppapi/proxy/ppb_file_ref_proxy.h" 26 #include "ppapi/proxy/ppb_file_ref_proxy.h"
27 #include "ppapi/proxy/ppb_file_system_proxy.h" 27 #include "ppapi/proxy/ppb_file_system_proxy.h"
28 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" 28 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h"
29 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" 29 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
30 #include "ppapi/proxy/ppb_host_resolver_private_proxy.h" 30 #include "ppapi/proxy/ppb_host_resolver_private_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_udp_socket_private_proxy.h" 35 #include "ppapi/proxy/ppb_udp_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"
40 #include "ppapi/proxy/url_loader_resource.h"
41 #include "ppapi/proxy/url_request_info_resource.h" 41 #include "ppapi/proxy/url_request_info_resource.h"
42 #include "ppapi/proxy/url_response_info_resource.h" 42 #include "ppapi/proxy/url_response_info_resource.h"
43 #include "ppapi/proxy/video_capture_resource.h" 43 #include "ppapi/proxy/video_capture_resource.h"
44 #include "ppapi/proxy/websocket_resource.h" 44 #include "ppapi/proxy/websocket_resource.h"
45 #include "ppapi/shared_impl/api_id.h" 45 #include "ppapi/shared_impl/api_id.h"
46 #include "ppapi/shared_impl/host_resource.h" 46 #include "ppapi/shared_impl/host_resource.h"
47 #include "ppapi/shared_impl/ppb_audio_config_shared.h" 47 #include "ppapi/shared_impl/ppb_audio_config_shared.h"
48 #include "ppapi/shared_impl/ppb_input_event_shared.h" 48 #include "ppapi/shared_impl/ppb_input_event_shared.h"
49 #include "ppapi/shared_impl/ppb_resource_array_shared.h" 49 #include "ppapi/shared_impl/ppb_resource_array_shared.h"
50 #include "ppapi/shared_impl/var.h" 50 #include "ppapi/shared_impl/var.h"
(...skipping 19 matching lines...) Expand all
70 70
71 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { 71 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) {
72 return PPB_FileIO_Proxy::CreateProxyResource(instance); 72 return PPB_FileIO_Proxy::CreateProxyResource(instance);
73 } 73 }
74 74
75 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Resource file_system, 75 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Resource file_system,
76 const char* path) { 76 const char* path) {
77 return PPB_FileRef_Proxy::CreateProxyResource(file_system, path); 77 return PPB_FileRef_Proxy::CreateProxyResource(file_system, path);
78 } 78 }
79 79
80 PP_Resource ResourceCreationProxy::CreateFileRef(
81 const PPB_FileRef_CreateInfo& serialized) {
82 return PPB_FileRef_Proxy::DeserializeFileRef(serialized);
83 }
84
80 PP_Resource ResourceCreationProxy::CreateFileSystem( 85 PP_Resource ResourceCreationProxy::CreateFileSystem(
81 PP_Instance instance, 86 PP_Instance instance,
82 PP_FileSystemType type) { 87 PP_FileSystemType type) {
83 return PPB_FileSystem_Proxy::CreateProxyResource(instance, type); 88 return PPB_FileSystem_Proxy::CreateProxyResource(instance, type);
84 } 89 }
85 90
86 PP_Resource ResourceCreationProxy::CreateIMEInputEvent( 91 PP_Resource ResourceCreationProxy::CreateIMEInputEvent(
87 PP_Instance instance, 92 PP_Instance instance,
88 PP_InputEvent_Type type, 93 PP_InputEvent_Type type,
89 PP_TimeTicks time_stamp, 94 PP_TimeTicks time_stamp,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 PP_Resource ResourceCreationProxy::CreateResourceArray( 141 PP_Resource ResourceCreationProxy::CreateResourceArray(
137 PP_Instance instance, 142 PP_Instance instance,
138 const PP_Resource elements[], 143 const PP_Resource elements[],
139 uint32_t size) { 144 uint32_t size) {
140 PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared( 145 PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared(
141 OBJECT_IS_PROXY, instance, elements, size); 146 OBJECT_IS_PROXY, instance, elements, size);
142 return object->GetReference(); 147 return object->GetReference();
143 } 148 }
144 149
145 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { 150 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) {
146 return PPB_URLLoader_Proxy::CreateProxyResource(instance); 151 return (new URLLoaderResource(GetConnection(), instance))->GetReference();
147 } 152 }
148 153
149 PP_Resource ResourceCreationProxy::CreateURLRequestInfo( 154 PP_Resource ResourceCreationProxy::CreateURLRequestInfo(
150 PP_Instance instance, 155 PP_Instance instance,
151 const URLRequestInfoData& data) { 156 const URLRequestInfoData& data) {
152 return (new URLRequestInfoResource(GetConnection(), 157 return (new URLRequestInfoResource(GetConnection(),
153 instance, data))->GetReference(); 158 instance, data))->GetReference();
154 } 159 }
155 160
156 PP_Resource ResourceCreationProxy::CreateURLResponseInfo( 161 PP_Resource ResourceCreationProxy::CreateURLResponseInfo(
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 388 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
384 return false; 389 return false;
385 } 390 }
386 391
387 Connection ResourceCreationProxy::GetConnection() { 392 Connection ResourceCreationProxy::GetConnection() {
388 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 393 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
389 } 394 }
390 395
391 } // namespace proxy 396 } // namespace proxy
392 } // namespace ppapi 397 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/url_loader_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698