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

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

Issue 8764003: Implement a proxy for Pepper FileIO. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
11 #include "ppapi/proxy/plugin_resource_tracker.h" 11 #include "ppapi/proxy/plugin_resource_tracker.h"
12 #include "ppapi/proxy/ppapi_messages.h" 12 #include "ppapi/proxy/ppapi_messages.h"
13 #include "ppapi/proxy/ppb_audio_input_proxy.h" 13 #include "ppapi/proxy/ppb_audio_input_proxy.h"
14 #include "ppapi/proxy/ppb_audio_proxy.h" 14 #include "ppapi/proxy/ppb_audio_proxy.h"
15 #include "ppapi/proxy/ppb_buffer_proxy.h" 15 #include "ppapi/proxy/ppb_buffer_proxy.h"
16 #include "ppapi/proxy/ppb_broker_proxy.h" 16 #include "ppapi/proxy/ppb_broker_proxy.h"
17 #include "ppapi/proxy/ppb_context_3d_proxy.h" 17 #include "ppapi/proxy/ppb_context_3d_proxy.h"
18 #include "ppapi/proxy/ppb_file_chooser_proxy.h" 18 #include "ppapi/proxy/ppb_file_chooser_proxy.h"
19 #include "ppapi/proxy/ppb_file_io_proxy.h"
19 #include "ppapi/proxy/ppb_file_ref_proxy.h" 20 #include "ppapi/proxy/ppb_file_ref_proxy.h"
20 #include "ppapi/proxy/ppb_file_system_proxy.h" 21 #include "ppapi/proxy/ppb_file_system_proxy.h"
21 #include "ppapi/proxy/ppb_flash_menu_proxy.h" 22 #include "ppapi/proxy/ppb_flash_menu_proxy.h"
22 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" 23 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h"
23 #include "ppapi/proxy/ppb_font_proxy.h" 24 #include "ppapi/proxy/ppb_font_proxy.h"
24 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" 25 #include "ppapi/proxy/ppb_graphics_2d_proxy.h"
25 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" 26 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
26 #include "ppapi/proxy/ppb_image_data_proxy.h" 27 #include "ppapi/proxy/ppb_image_data_proxy.h"
27 #include "ppapi/proxy/ppb_surface_3d_proxy.h" 28 #include "ppapi/proxy/ppb_surface_3d_proxy.h"
28 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" 29 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 137
137 PP_Resource ResourceCreationProxy::CreateFileChooser( 138 PP_Resource ResourceCreationProxy::CreateFileChooser(
138 PP_Instance instance, 139 PP_Instance instance,
139 PP_FileChooserMode_Dev mode, 140 PP_FileChooserMode_Dev mode,
140 const char* accept_mime_types) { 141 const char* accept_mime_types) {
141 return PPB_FileChooser_Proxy::CreateProxyResource(instance, mode, 142 return PPB_FileChooser_Proxy::CreateProxyResource(instance, mode,
142 accept_mime_types); 143 accept_mime_types);
143 } 144 }
144 145
145 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { 146 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) {
146 NOTIMPLEMENTED(); // Not proxied yet. 147 return PPB_FileIO_Proxy::CreateProxyResource(instance);
147 return 0;
148 } 148 }
149 149
150 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Resource file_system, 150 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Resource file_system,
151 const char* path) { 151 const char* path) {
152 return PPB_FileRef_Proxy::CreateProxyResource(file_system, path); 152 return PPB_FileRef_Proxy::CreateProxyResource(file_system, path);
153 } 153 }
154 154
155 PP_Resource ResourceCreationProxy::CreateFileSystem( 155 PP_Resource ResourceCreationProxy::CreateFileSystem(
156 PP_Instance instance, 156 PP_Instance instance,
157 PP_FileSystemType type) { 157 PP_FileSystemType type) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false); 439 *result_image_handle = dispatcher()->ShareHandleWithRemote(ih, false);
440 #else 440 #else
441 *result_image_handle = ImageData::HandleFromInt(handle); 441 *result_image_handle = ImageData::HandleFromInt(handle);
442 #endif 442 #endif
443 } 443 }
444 } 444 }
445 } 445 }
446 446
447 } // namespace proxy 447 } // namespace proxy
448 } // namespace ppapi 448 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698