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

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

Issue 2755613002: Support audio output device enumeration and selection in PPAPI (Closed)
Patch Set: Fix format, Rebase Created 3 years, 8 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
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/shared_impl/api_id.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 "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/pp_size.h" 9 #include "ppapi/c/pp_size.h"
10 #include "ppapi/proxy/audio_encoder_resource.h" 10 #include "ppapi/proxy/audio_encoder_resource.h"
11 #include "ppapi/proxy/audio_input_resource.h" 11 #include "ppapi/proxy/audio_input_resource.h"
12 #include "ppapi/proxy/audio_output_resource.h"
12 #include "ppapi/proxy/camera_device_resource.h" 13 #include "ppapi/proxy/camera_device_resource.h"
13 #include "ppapi/proxy/compositor_resource.h" 14 #include "ppapi/proxy/compositor_resource.h"
14 #include "ppapi/proxy/connection.h" 15 #include "ppapi/proxy/connection.h"
15 #include "ppapi/proxy/file_chooser_resource.h" 16 #include "ppapi/proxy/file_chooser_resource.h"
16 #include "ppapi/proxy/file_io_resource.h" 17 #include "ppapi/proxy/file_io_resource.h"
17 #include "ppapi/proxy/file_ref_resource.h" 18 #include "ppapi/proxy/file_ref_resource.h"
18 #include "ppapi/proxy/file_system_resource.h" 19 #include "ppapi/proxy/file_system_resource.h"
19 #include "ppapi/proxy/flash_drm_resource.h" 20 #include "ppapi/proxy/flash_drm_resource.h"
20 #include "ppapi/proxy/flash_font_file_resource.h" 21 #include "ppapi/proxy/flash_font_file_resource.h"
21 #include "ppapi/proxy/flash_menu_resource.h" 22 #include "ppapi/proxy/flash_menu_resource.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 PP_Instance instance) { 423 PP_Instance instance) {
423 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance); 424 return PPB_X509Certificate_Private_Proxy::CreateProxyResource(instance);
424 } 425 }
425 426
426 #if !defined(OS_NACL) 427 #if !defined(OS_NACL)
427 PP_Resource ResourceCreationProxy::CreateAudioInput( 428 PP_Resource ResourceCreationProxy::CreateAudioInput(
428 PP_Instance instance) { 429 PP_Instance instance) {
429 return (new AudioInputResource(GetConnection(), instance))->GetReference(); 430 return (new AudioInputResource(GetConnection(), instance))->GetReference();
430 } 431 }
431 432
433 PP_Resource ResourceCreationProxy::CreateAudioOutput(PP_Instance instance) {
434 return (new AudioOutputResource(GetConnection(), instance))->GetReference();
435 }
436
432 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) { 437 PP_Resource ResourceCreationProxy::CreateBroker(PP_Instance instance) {
433 return PPB_Broker_Proxy::CreateProxyResource(instance); 438 return PPB_Broker_Proxy::CreateProxyResource(instance);
434 } 439 }
435 440
436 PP_Resource ResourceCreationProxy::CreateBrowserFont( 441 PP_Resource ResourceCreationProxy::CreateBrowserFont(
437 PP_Instance instance, 442 PP_Instance instance,
438 const PP_BrowserFont_Trusted_Description* description) { 443 const PP_BrowserFont_Trusted_Description* description) {
439 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); 444 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
440 if (!dispatcher) 445 if (!dispatcher)
441 return 0; 446 return 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 511 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
507 return false; 512 return false;
508 } 513 }
509 514
510 Connection ResourceCreationProxy::GetConnection() { 515 Connection ResourceCreationProxy::GetConnection() {
511 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 516 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
512 } 517 }
513 518
514 } // namespace proxy 519 } // namespace proxy
515 } // namespace ppapi 520 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.h ('k') | ppapi/shared_impl/api_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698