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

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

Issue 10544089: Implement the file chooser as a new resource "host" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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_ref_proxy.cc ('k') | ppapi/proxy/resource_message_params.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/file_chooser_resource.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 11 #include "ppapi/proxy/plugin_dispatcher.h"
11 #include "ppapi/proxy/plugin_resource_tracker.h" 12 #include "ppapi/proxy/plugin_resource_tracker.h"
12 #include "ppapi/proxy/ppapi_messages.h" 13 #include "ppapi/proxy/ppapi_messages.h"
13 #include "ppapi/proxy/ppb_audio_input_proxy.h" 14 #include "ppapi/proxy/ppb_audio_input_proxy.h"
14 #include "ppapi/proxy/ppb_audio_proxy.h" 15 #include "ppapi/proxy/ppb_audio_proxy.h"
15 #include "ppapi/proxy/ppb_buffer_proxy.h" 16 #include "ppapi/proxy/ppb_buffer_proxy.h"
16 #include "ppapi/proxy/ppb_broker_proxy.h" 17 #include "ppapi/proxy/ppb_broker_proxy.h"
17 #include "ppapi/proxy/ppb_file_chooser_proxy.h" 18 #include "ppapi/proxy/ppb_file_chooser_proxy.h"
18 #include "ppapi/proxy/ppb_file_io_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"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 PP_Resource ResourceCreationProxy::CreateDirectoryReader( 219 PP_Resource ResourceCreationProxy::CreateDirectoryReader(
219 PP_Resource directory_ref) { 220 PP_Resource directory_ref) {
220 NOTIMPLEMENTED(); // Not proxied yet. 221 NOTIMPLEMENTED(); // Not proxied yet.
221 return 0; 222 return 0;
222 } 223 }
223 224
224 PP_Resource ResourceCreationProxy::CreateFileChooser( 225 PP_Resource ResourceCreationProxy::CreateFileChooser(
225 PP_Instance instance, 226 PP_Instance instance,
226 PP_FileChooserMode_Dev mode, 227 PP_FileChooserMode_Dev mode,
227 const char* accept_types) { 228 const char* accept_types) {
228 return PPB_FileChooser_Proxy::CreateProxyResource(instance, mode, 229 return (new FileChooserResource(dispatcher(), instance, mode,
229 accept_types); 230 accept_types))->GetReference();
230 } 231 }
231 232
232 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { 233 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) {
233 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); 234 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance);
234 } 235 }
235 236
236 PP_Resource ResourceCreationProxy::CreateFlashMenu( 237 PP_Resource ResourceCreationProxy::CreateFlashMenu(
237 PP_Instance instance, 238 PP_Instance instance,
238 const PP_Flash_Menu* menu_data) { 239 const PP_Flash_Menu* menu_data) {
239 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data); 240 return PPB_Flash_Menu_Proxy::CreateProxyResource(instance, menu_data);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 bool ResourceCreationProxy::Send(IPC::Message* msg) { 341 bool ResourceCreationProxy::Send(IPC::Message* msg) {
341 return dispatcher()->Send(msg); 342 return dispatcher()->Send(msg);
342 } 343 }
343 344
344 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 345 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
345 return false; 346 return false;
346 } 347 }
347 348
348 } // namespace proxy 349 } // namespace proxy
349 } // namespace ppapi 350 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_file_ref_proxy.cc ('k') | ppapi/proxy/resource_message_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698