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

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

Issue 1093383002: [WIP] Provided file system from NACL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Various cleanups Created 5 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
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/proxy/audio_input_resource.h" 9 #include "ppapi/proxy/audio_input_resource.h"
10 #include "ppapi/proxy/camera_device_resource.h" 10 #include "ppapi/proxy/camera_device_resource.h"
11 #include "ppapi/proxy/compositor_resource.h" 11 #include "ppapi/proxy/compositor_resource.h"
12 #include "ppapi/proxy/connection.h" 12 #include "ppapi/proxy/connection.h"
13 #include "ppapi/proxy/file_chooser_resource.h" 13 #include "ppapi/proxy/file_chooser_resource.h"
14 #include "ppapi/proxy/file_io_resource.h" 14 #include "ppapi/proxy/file_io_resource.h"
15 #include "ppapi/proxy/file_ref_resource.h" 15 #include "ppapi/proxy/file_ref_resource.h"
16 #include "ppapi/proxy/file_system_resource.h" 16 #include "ppapi/proxy/file_system_resource.h"
17 #include "ppapi/proxy/filesystem_provider_resource.h"
17 #include "ppapi/proxy/flash_drm_resource.h" 18 #include "ppapi/proxy/flash_drm_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/host_resolver_resource.h" 23 #include "ppapi/proxy/host_resolver_resource.h"
23 #include "ppapi/proxy/media_stream_video_track_resource.h" 24 #include "ppapi/proxy/media_stream_video_track_resource.h"
24 #include "ppapi/proxy/net_address_resource.h" 25 #include "ppapi/proxy/net_address_resource.h"
25 #include "ppapi/proxy/network_monitor_resource.h" 26 #include "ppapi/proxy/network_monitor_resource.h"
26 #include "ppapi/proxy/output_protection_resource.h" 27 #include "ppapi/proxy/output_protection_resource.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 405
405 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) { 406 PP_Resource ResourceCreationProxy::CreateWebSocket(PP_Instance instance) {
406 return (new WebSocketResource(GetConnection(), instance))->GetReference(); 407 return (new WebSocketResource(GetConnection(), instance))->GetReference();
407 } 408 }
408 409
409 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate( 410 PP_Resource ResourceCreationProxy::CreateX509CertificatePrivate(
410 PP_Instance instance) { 411 PP_Instance instance) {
411 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); 412 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance);
412 } 413 }
413 414
415 PP_Resource ResourceCreationProxy::CreateFilesystemProvider(
416 PP_Instance instance) {
417 return (new FilesystemProviderResource(
418 GetConnection(), instance))->GetReference();
419 }
420
414 #if !defined(OS_NACL) 421 #if !defined(OS_NACL)
415 PP_Resource ResourceCreationProxy::CreateAudioInput( 422 PP_Resource ResourceCreationProxy::CreateAudioInput(
416 PP_Instance instance) { 423 PP_Instance instance) {
417 return (new AudioInputResource(GetConnection(), instance))->GetReference(); 424 return (new AudioInputResource(GetConnection(), instance))->GetReference();
418 } 425 }
419 426
420 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { 427 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) {
421 return PPB_Broker_Proxy::CreateProxyResource(instance); 428 return PPB_Broker_Proxy::CreateProxyResource(instance);
422 } 429 }
423 430
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 return 0; 488 return 0;
482 return (new VideoCaptureResource(GetConnection(), instance, dispatcher)) 489 return (new VideoCaptureResource(GetConnection(), instance, dispatcher))
483 ->GetReference(); 490 ->GetReference();
484 } 491 }
485 492
486 PP_Resource ResourceCreationProxy::CreateVideoDecoderDev( 493 PP_Resource ResourceCreationProxy::CreateVideoDecoderDev(
487 PP_Instance instance, 494 PP_Instance instance,
488 PP_Resource context3d_id, 495 PP_Resource context3d_id,
489 PP_VideoDecoder_Profile profile) { 496 PP_VideoDecoder_Profile profile) {
490 return PPB_VideoDecoder_Proxy::CreateProxyResource( 497 return PPB_VideoDecoder_Proxy::CreateProxyResource(
491 instance, context3d_id, profile); 498 instance, context3d_id, profile);
492 } 499 }
493 500
494 #endif // !defined(OS_NACL) 501 #endif // !defined(OS_NACL)
495 502
496 bool ResourceCreationProxy::Send(IPC::Message* msg) { 503 bool ResourceCreationProxy::Send(IPC::Message* msg) {
497 return dispatcher()->Send(msg); 504 return dispatcher()->Send(msg);
498 } 505 }
499 506
500 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 507 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
501 return false; 508 return false;
502 } 509 }
503 510
504 Connection ResourceCreationProxy::GetConnection() { 511 Connection ResourceCreationProxy::GetConnection() {
505 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 512 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
506 } 513 }
507 514
508 } // namespace proxy 515 } // namespace proxy
509 } // namespace ppapi 516 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698