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

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

Issue 21966004: Pepper: Move FileRef to the "new" resource proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 7 years, 3 months 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.cc » ('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/proxy/audio_input_resource.h" 9 #include "ppapi/proxy/audio_input_resource.h"
10 #include "ppapi/proxy/connection.h" 10 #include "ppapi/proxy/connection.h"
11 #include "ppapi/proxy/ext_crx_file_system_private_resource.h" 11 #include "ppapi/proxy/ext_crx_file_system_private_resource.h"
12 #include "ppapi/proxy/file_chooser_resource.h" 12 #include "ppapi/proxy/file_chooser_resource.h"
13 #include "ppapi/proxy/file_io_resource.h" 13 #include "ppapi/proxy/file_io_resource.h"
14 #include "ppapi/proxy/file_ref_resource.h"
14 #include "ppapi/proxy/file_system_resource.h" 15 #include "ppapi/proxy/file_system_resource.h"
15 #include "ppapi/proxy/flash_drm_resource.h" 16 #include "ppapi/proxy/flash_drm_resource.h"
16 #include "ppapi/proxy/flash_font_file_resource.h" 17 #include "ppapi/proxy/flash_font_file_resource.h"
17 #include "ppapi/proxy/flash_menu_resource.h" 18 #include "ppapi/proxy/flash_menu_resource.h"
18 #include "ppapi/proxy/graphics_2d_resource.h" 19 #include "ppapi/proxy/graphics_2d_resource.h"
19 #include "ppapi/proxy/host_resolver_private_resource.h" 20 #include "ppapi/proxy/host_resolver_private_resource.h"
20 #include "ppapi/proxy/host_resolver_resource.h" 21 #include "ppapi/proxy/host_resolver_resource.h"
21 #include "ppapi/proxy/net_address_resource.h" 22 #include "ppapi/proxy/net_address_resource.h"
22 #include "ppapi/proxy/network_monitor_resource.h" 23 #include "ppapi/proxy/network_monitor_resource.h"
23 #include "ppapi/proxy/platform_verification_private_resource.h" 24 #include "ppapi/proxy/platform_verification_private_resource.h"
24 #include "ppapi/proxy/plugin_dispatcher.h" 25 #include "ppapi/proxy/plugin_dispatcher.h"
25 #include "ppapi/proxy/plugin_globals.h" 26 #include "ppapi/proxy/plugin_globals.h"
26 #include "ppapi/proxy/plugin_resource_tracker.h" 27 #include "ppapi/proxy/plugin_resource_tracker.h"
27 #include "ppapi/proxy/ppapi_messages.h" 28 #include "ppapi/proxy/ppapi_messages.h"
28 #include "ppapi/proxy/ppb_audio_proxy.h" 29 #include "ppapi/proxy/ppb_audio_proxy.h"
29 #include "ppapi/proxy/ppb_broker_proxy.h" 30 #include "ppapi/proxy/ppb_broker_proxy.h"
30 #include "ppapi/proxy/ppb_buffer_proxy.h" 31 #include "ppapi/proxy/ppb_buffer_proxy.h"
31 #include "ppapi/proxy/ppb_file_ref_proxy.h"
32 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h" 32 #include "ppapi/proxy/ppb_flash_message_loop_proxy.h"
33 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" 33 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
34 #include "ppapi/proxy/ppb_image_data_proxy.h" 34 #include "ppapi/proxy/ppb_image_data_proxy.h"
35 #include "ppapi/proxy/ppb_video_decoder_proxy.h" 35 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
36 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" 36 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h"
37 #include "ppapi/proxy/printing_resource.h" 37 #include "ppapi/proxy/printing_resource.h"
38 #include "ppapi/proxy/talk_resource.h" 38 #include "ppapi/proxy/talk_resource.h"
39 #include "ppapi/proxy/tcp_server_socket_private_resource.h" 39 #include "ppapi/proxy/tcp_server_socket_private_resource.h"
40 #include "ppapi/proxy/tcp_socket_private_resource.h" 40 #include "ppapi/proxy/tcp_socket_private_resource.h"
41 #include "ppapi/proxy/tcp_socket_resource.h" 41 #include "ppapi/proxy/tcp_socket_resource.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // static 74 // static
75 InterfaceProxy* ResourceCreationProxy::Create(Dispatcher* dispatcher) { 75 InterfaceProxy* ResourceCreationProxy::Create(Dispatcher* dispatcher) {
76 return new ResourceCreationProxy(dispatcher); 76 return new ResourceCreationProxy(dispatcher);
77 } 77 }
78 78
79 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { 79 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) {
80 return (new FileIOResource(GetConnection(), instance))->GetReference(); 80 return (new FileIOResource(GetConnection(), instance))->GetReference();
81 } 81 }
82 82
83 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance,
84 PP_Resource file_system,
85 const char* path) {
86 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path);
87 }
88
89 PP_Resource ResourceCreationProxy::CreateFileRef( 83 PP_Resource ResourceCreationProxy::CreateFileRef(
90 const PPB_FileRef_CreateInfo& create_info) { 84 PP_Instance instance,
91 return PPB_FileRef_Proxy::DeserializeFileRef(create_info); 85 const FileRefCreateInfo& create_info) {
86 return FileRefResource::CreateFileRef(GetConnection(), instance, create_info);
92 } 87 }
93 88
94 PP_Resource ResourceCreationProxy::CreateFileSystem( 89 PP_Resource ResourceCreationProxy::CreateFileSystem(
95 PP_Instance instance, 90 PP_Instance instance,
96 PP_FileSystemType type) { 91 PP_FileSystemType type) {
97 return (new FileSystemResource(GetConnection(), instance, 92 return (new FileSystemResource(GetConnection(), instance,
98 type))->GetReference(); 93 type))->GetReference();
99 } 94 }
100 95
101 PP_Resource ResourceCreationProxy::CreateIMEInputEvent( 96 PP_Resource ResourceCreationProxy::CreateIMEInputEvent(
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 457 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
463 return false; 458 return false;
464 } 459 }
465 460
466 Connection ResourceCreationProxy::GetConnection() { 461 Connection ResourceCreationProxy::GetConnection() {
467 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 462 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
468 } 463 }
469 464
470 } // namespace proxy 465 } // namespace proxy
471 } // namespace ppapi 466 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/proxy/url_loader_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698