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

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

Issue 13726024: Refactor FileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NON_EXPORTED_BASE Created 7 years, 8 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
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/shared_impl/ppb_file_ref_shared.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/directory_reader_resource.h" 13 #include "ppapi/proxy/directory_reader_resource.h"
14 #include "ppapi/proxy/file_chooser_resource.h" 14 #include "ppapi/proxy/file_chooser_resource.h"
15 #include "ppapi/proxy/file_io_resource.h" 15 #include "ppapi/proxy/file_io_resource.h"
16 #include "ppapi/proxy/file_system_resource.h"
16 #include "ppapi/proxy/flash_device_id_resource.h" 17 #include "ppapi/proxy/flash_device_id_resource.h"
17 #include "ppapi/proxy/flash_font_file_resource.h" 18 #include "ppapi/proxy/flash_font_file_resource.h"
18 #include "ppapi/proxy/flash_menu_resource.h" 19 #include "ppapi/proxy/flash_menu_resource.h"
19 #include "ppapi/proxy/graphics_2d_resource.h" 20 #include "ppapi/proxy/graphics_2d_resource.h"
20 #include "ppapi/proxy/host_resolver_private_resource.h" 21 #include "ppapi/proxy/host_resolver_private_resource.h"
21 #include "ppapi/proxy/plugin_dispatcher.h" 22 #include "ppapi/proxy/plugin_dispatcher.h"
22 #include "ppapi/proxy/plugin_globals.h" 23 #include "ppapi/proxy/plugin_globals.h"
23 #include "ppapi/proxy/plugin_resource_tracker.h" 24 #include "ppapi/proxy/plugin_resource_tracker.h"
24 #include "ppapi/proxy/ppapi_messages.h" 25 #include "ppapi/proxy/ppapi_messages.h"
25 #include "ppapi/proxy/ppb_audio_proxy.h" 26 #include "ppapi/proxy/ppb_audio_proxy.h"
26 #include "ppapi/proxy/ppb_broker_proxy.h" 27 #include "ppapi/proxy/ppb_broker_proxy.h"
27 #include "ppapi/proxy/ppb_buffer_proxy.h" 28 #include "ppapi/proxy/ppb_buffer_proxy.h"
28 #include "ppapi/proxy/ppb_file_ref_proxy.h" 29 #include "ppapi/proxy/ppb_file_ref_proxy.h"
29 #include "ppapi/proxy/ppb_file_system_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" 36 #include "ppapi/proxy/ppb_url_loader_proxy.h"
37 #include "ppapi/proxy/ppb_video_decoder_proxy.h" 37 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
38 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h" 38 #include "ppapi/proxy/ppb_x509_certificate_private_proxy.h"
39 #include "ppapi/proxy/printing_resource.h" 39 #include "ppapi/proxy/printing_resource.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 PP_Instance instance, 74 PP_Instance instance,
75 PP_Resource directory_ref) { 75 PP_Resource directory_ref) {
76 return (new DirectoryReaderResource( 76 return (new DirectoryReaderResource(
77 GetConnection(), instance, directory_ref))->GetReference(); 77 GetConnection(), instance, directory_ref))->GetReference();
78 } 78 }
79 79
80 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { 80 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) {
81 return (new FileIOResource(GetConnection(), instance))->GetReference(); 81 return (new FileIOResource(GetConnection(), instance))->GetReference();
82 } 82 }
83 83
84 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Resource file_system, 84 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance,
85 PP_Resource file_system,
85 const char* path) { 86 const char* path) {
86 return PPB_FileRef_Proxy::CreateProxyResource(file_system, path); 87 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path);
87 } 88 }
88 89
89 PP_Resource ResourceCreationProxy::CreateFileSystem( 90 PP_Resource ResourceCreationProxy::CreateFileSystem(
90 PP_Instance instance, 91 PP_Instance instance,
91 PP_FileSystemType type) { 92 PP_FileSystemType type) {
92 return PPB_FileSystem_Proxy::CreateProxyResource(instance, type); 93 return (new FileSystemResource(GetConnection(), instance,
94 type))->GetReference();
93 } 95 }
94 96
95 PP_Resource ResourceCreationProxy::CreateIMEInputEvent( 97 PP_Resource ResourceCreationProxy::CreateIMEInputEvent(
96 PP_Instance instance, 98 PP_Instance instance,
97 PP_InputEvent_Type type, 99 PP_InputEvent_Type type,
98 PP_TimeTicks time_stamp, 100 PP_TimeTicks time_stamp,
99 struct PP_Var text, 101 struct PP_Var text,
100 uint32_t segment_number, 102 uint32_t segment_number,
101 const uint32_t* segment_offsets, 103 const uint32_t* segment_offsets,
102 int32_t target_segment, 104 int32_t target_segment,
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 399 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
398 return false; 400 return false;
399 } 401 }
400 402
401 Connection ResourceCreationProxy::GetConnection() { 403 Connection ResourceCreationProxy::GetConnection() {
402 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 404 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
403 } 405 }
404 406
405 } // namespace proxy 407 } // namespace proxy
406 } // namespace ppapi 408 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/shared_impl/ppb_file_ref_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698