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

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

Issue 10815073: Refactoring of new IPC-only pepper implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
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/connection.h"
10 #include "ppapi/proxy/file_chooser_resource.h" 11 #include "ppapi/proxy/file_chooser_resource.h"
11 #include "ppapi/proxy/plugin_dispatcher.h" 12 #include "ppapi/proxy/plugin_dispatcher.h"
13 #include "ppapi/proxy/plugin_globals.h"
14 #include "ppapi/proxy/plugin_proxy_delegate.h"
12 #include "ppapi/proxy/plugin_resource_tracker.h" 15 #include "ppapi/proxy/plugin_resource_tracker.h"
13 #include "ppapi/proxy/ppapi_messages.h" 16 #include "ppapi/proxy/ppapi_messages.h"
14 #include "ppapi/proxy/ppb_audio_input_proxy.h" 17 #include "ppapi/proxy/ppb_audio_input_proxy.h"
15 #include "ppapi/proxy/ppb_audio_proxy.h" 18 #include "ppapi/proxy/ppb_audio_proxy.h"
16 #include "ppapi/proxy/ppb_buffer_proxy.h" 19 #include "ppapi/proxy/ppb_buffer_proxy.h"
17 #include "ppapi/proxy/ppb_broker_proxy.h" 20 #include "ppapi/proxy/ppb_broker_proxy.h"
18 #include "ppapi/proxy/ppb_file_io_proxy.h" 21 #include "ppapi/proxy/ppb_file_io_proxy.h"
19 #include "ppapi/proxy/ppb_file_ref_proxy.h" 22 #include "ppapi/proxy/ppb_file_ref_proxy.h"
20 #include "ppapi/proxy/ppb_file_system_proxy.h" 23 #include "ppapi/proxy/ppb_file_system_proxy.h"
21 #include "ppapi/proxy/ppb_flash_device_id_proxy.h" 24 #include "ppapi/proxy/ppb_flash_device_id_proxy.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 PP_Resource ResourceCreationProxy::CreateDirectoryReader( 248 PP_Resource ResourceCreationProxy::CreateDirectoryReader(
246 PP_Resource directory_ref) { 249 PP_Resource directory_ref) {
247 NOTIMPLEMENTED(); // Not proxied yet. 250 NOTIMPLEMENTED(); // Not proxied yet.
248 return 0; 251 return 0;
249 } 252 }
250 253
251 PP_Resource ResourceCreationProxy::CreateFileChooser( 254 PP_Resource ResourceCreationProxy::CreateFileChooser(
252 PP_Instance instance, 255 PP_Instance instance,
253 PP_FileChooserMode_Dev mode, 256 PP_FileChooserMode_Dev mode,
254 const char* accept_types) { 257 const char* accept_types) {
255 return (new FileChooserResource(dispatcher(), instance, mode, 258 return (new FileChooserResource(GetConnection(), instance, mode,
256 accept_types))->GetReference(); 259 accept_types))->GetReference();
257 } 260 }
258 261
259 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { 262 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) {
260 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance); 263 return PPB_Flash_DeviceID_Proxy::CreateProxyResource(instance);
261 } 264 }
262 265
263 PP_Resource ResourceCreationProxy::CreateFlashMenu( 266 PP_Resource ResourceCreationProxy::CreateFlashMenu(
264 PP_Instance instance, 267 PP_Instance instance,
265 const PP_Flash_Menu* menu_data) { 268 const PP_Flash_Menu* menu_data) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 361
359 362
360 bool ResourceCreationProxy::Send(IPC::Message* msg) { 363 bool ResourceCreationProxy::Send(IPC::Message* msg) {
361 return dispatcher()->Send(msg); 364 return dispatcher()->Send(msg);
362 } 365 }
363 366
364 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 367 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
365 return false; 368 return false;
366 } 369 }
367 370
371 Connection ResourceCreationProxy::GetConnection() {
372 return Connection(
373 PluginGlobals::Get()->plugin_proxy_delegate()->GetBrowserSender(),
374 dispatcher());
375 }
376
368 } // namespace proxy 377 } // namespace proxy
369 } // namespace ppapi 378 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698