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

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

Issue 11941022: Refactor FileIO to the new resource host system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/ppb_file_io_proxy.cc ('k') | ppapi/shared_impl/file_io_state_manager.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"
11 #include "ppapi/proxy/browser_font_resource_trusted.h" 11 #include "ppapi/proxy/browser_font_resource_trusted.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/flash_device_id_resource.h" 15 #include "ppapi/proxy/flash_device_id_resource.h"
15 #include "ppapi/proxy/flash_font_file_resource.h" 16 #include "ppapi/proxy/flash_font_file_resource.h"
16 #include "ppapi/proxy/flash_menu_resource.h" 17 #include "ppapi/proxy/flash_menu_resource.h"
17 #include "ppapi/proxy/graphics_2d_resource.h" 18 #include "ppapi/proxy/graphics_2d_resource.h"
18 #include "ppapi/proxy/plugin_dispatcher.h" 19 #include "ppapi/proxy/plugin_dispatcher.h"
19 #include "ppapi/proxy/plugin_globals.h" 20 #include "ppapi/proxy/plugin_globals.h"
20 #include "ppapi/proxy/plugin_resource_tracker.h" 21 #include "ppapi/proxy/plugin_resource_tracker.h"
21 #include "ppapi/proxy/ppapi_messages.h" 22 #include "ppapi/proxy/ppapi_messages.h"
22 #include "ppapi/proxy/ppb_audio_proxy.h" 23 #include "ppapi/proxy/ppb_audio_proxy.h"
23 #include "ppapi/proxy/ppb_broker_proxy.h" 24 #include "ppapi/proxy/ppb_broker_proxy.h"
24 #include "ppapi/proxy/ppb_buffer_proxy.h" 25 #include "ppapi/proxy/ppb_buffer_proxy.h"
25 #include "ppapi/proxy/ppb_file_io_proxy.h"
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"
(...skipping 26 matching lines...) Expand all
62 62
63 ResourceCreationProxy::~ResourceCreationProxy() { 63 ResourceCreationProxy::~ResourceCreationProxy() {
64 } 64 }
65 65
66 // static 66 // static
67 InterfaceProxy* ResourceCreationProxy::Create(Dispatcher* dispatcher) { 67 InterfaceProxy* ResourceCreationProxy::Create(Dispatcher* dispatcher) {
68 return new ResourceCreationProxy(dispatcher); 68 return new ResourceCreationProxy(dispatcher);
69 } 69 }
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 (new FileIOResource(GetConnection(), instance))->GetReference();
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::CreateFileSystem( 80 PP_Resource ResourceCreationProxy::CreateFileSystem(
81 PP_Instance instance, 81 PP_Instance instance,
82 PP_FileSystemType type) { 82 PP_FileSystemType type) {
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 383 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
384 return false; 384 return false;
385 } 385 }
386 386
387 Connection ResourceCreationProxy::GetConnection() { 387 Connection ResourceCreationProxy::GetConnection() {
388 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 388 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
389 } 389 }
390 390
391 } // namespace proxy 391 } // namespace proxy
392 } // namespace ppapi 392 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_file_io_proxy.cc ('k') | ppapi/shared_impl/file_io_state_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698