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

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

Issue 14188019: CRX FileSystem Pepper private API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
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/ext_crx_file_system_private_resource.h"
14 #include "ppapi/proxy/file_chooser_resource.h" 15 #include "ppapi/proxy/file_chooser_resource.h"
15 #include "ppapi/proxy/file_io_resource.h" 16 #include "ppapi/proxy/file_io_resource.h"
16 #include "ppapi/proxy/file_system_resource.h" 17 #include "ppapi/proxy/file_system_resource.h"
17 #include "ppapi/proxy/flash_device_id_resource.h" 18 #include "ppapi/proxy/flash_device_id_resource.h"
18 #include "ppapi/proxy/flash_font_file_resource.h" 19 #include "ppapi/proxy/flash_font_file_resource.h"
19 #include "ppapi/proxy/flash_menu_resource.h" 20 #include "ppapi/proxy/flash_menu_resource.h"
20 #include "ppapi/proxy/graphics_2d_resource.h" 21 #include "ppapi/proxy/graphics_2d_resource.h"
21 #include "ppapi/proxy/host_resolver_private_resource.h" 22 #include "ppapi/proxy/host_resolver_private_resource.h"
22 #include "ppapi/proxy/plugin_dispatcher.h" 23 #include "ppapi/proxy/plugin_dispatcher.h"
23 #include "ppapi/proxy/plugin_globals.h" 24 #include "ppapi/proxy/plugin_globals.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return new ResourceCreationProxy(dispatcher); 71 return new ResourceCreationProxy(dispatcher);
71 } 72 }
72 73
73 PP_Resource ResourceCreationProxy::CreateDirectoryReader( 74 PP_Resource ResourceCreationProxy::CreateDirectoryReader(
74 PP_Instance instance, 75 PP_Instance instance,
75 PP_Resource directory_ref) { 76 PP_Resource directory_ref) {
76 return (new DirectoryReaderResource( 77 return (new DirectoryReaderResource(
77 GetConnection(), instance, directory_ref))->GetReference(); 78 GetConnection(), instance, directory_ref))->GetReference();
78 } 79 }
79 80
81 PP_Resource ResourceCreationProxy::CreateExtCrxFileSystemPrivate(
82 PP_Instance instance) {
83 return (new ExtCrxFileSystemPrivateResource(GetConnection(),
84 instance))->GetReference();
85 }
86
80 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { 87 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) {
81 return (new FileIOResource(GetConnection(), instance))->GetReference(); 88 return (new FileIOResource(GetConnection(), instance))->GetReference();
82 } 89 }
83 90
84 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, 91 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance,
85 PP_Resource file_system, 92 PP_Resource file_system,
86 const char* path) { 93 const char* path) {
87 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); 94 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path);
88 } 95 }
89 96
90 PP_Resource ResourceCreationProxy::CreateFileSystem( 97 PP_Resource ResourceCreationProxy::CreateFileSystem(
91 PP_Instance instance, 98 PP_Instance instance,
92 PP_FileSystemType type) { 99 PP_FileSystemType type) {
93 return (new FileSystemResource(GetConnection(), instance, 100 return (new FileSystemResource(GetConnection(), instance,
94 type))->GetReference(); 101 type))->GetReference();
95 } 102 }
96 103
104 PP_Resource ResourceCreationProxy::CreateIsolatedFileSystem(
105 PP_Instance instance,
106 const char* fsid) {
107 FileSystemResource* fs = new FileSystemResource(
108 GetConnection(), instance, PP_FILESYSTEMTYPE_ISOLATED);
109 fs->InitIsolatedFileSystem(fsid);
110 return fs->GetReference();
111 }
112
97 PP_Resource ResourceCreationProxy::CreateIMEInputEvent( 113 PP_Resource ResourceCreationProxy::CreateIMEInputEvent(
98 PP_Instance instance, 114 PP_Instance instance,
99 PP_InputEvent_Type type, 115 PP_InputEvent_Type type,
100 PP_TimeTicks time_stamp, 116 PP_TimeTicks time_stamp,
101 struct PP_Var text, 117 struct PP_Var text,
102 uint32_t segment_number, 118 uint32_t segment_number,
103 const uint32_t* segment_offsets, 119 const uint32_t* segment_offsets,
104 int32_t target_segment, 120 int32_t target_segment,
105 uint32_t selection_start, 121 uint32_t selection_start,
106 uint32_t selection_end) { 122 uint32_t selection_end) {
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 415 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
400 return false; 416 return false;
401 } 417 }
402 418
403 Connection ResourceCreationProxy::GetConnection() { 419 Connection ResourceCreationProxy::GetConnection() {
404 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 420 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
405 } 421 }
406 422
407 } // namespace proxy 423 } // namespace proxy
408 } // namespace ppapi 424 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698