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

Side by Side Diff: content/renderer/pepper/content_renderer_pepper_host_factory.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 | « content/renderer/BUILD.gn ('k') | content/renderer/pepper/pepper_audio_controller.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 "content/renderer/pepper/content_renderer_pepper_host_factory.h" 5 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "content/common/content_switches_internal.h" 13 #include "content/common/content_switches_internal.h"
14 #include "content/public/common/content_client.h" 14 #include "content/public/common/content_client.h"
15 #include "content/public/renderer/content_renderer_client.h" 15 #include "content/public/renderer/content_renderer_client.h"
16 #include "content/renderer/pepper/pepper_audio_encoder_host.h" 16 #include "content/renderer/pepper/pepper_audio_encoder_host.h"
17 #include "content/renderer/pepper/pepper_audio_input_host.h" 17 #include "content/renderer/pepper/pepper_audio_input_host.h"
18 #include "content/renderer/pepper/pepper_audio_output_host.h"
18 #include "content/renderer/pepper/pepper_camera_device_host.h" 19 #include "content/renderer/pepper/pepper_camera_device_host.h"
19 #include "content/renderer/pepper/pepper_compositor_host.h" 20 #include "content/renderer/pepper/pepper_compositor_host.h"
20 #include "content/renderer/pepper/pepper_file_chooser_host.h" 21 #include "content/renderer/pepper/pepper_file_chooser_host.h"
21 #include "content/renderer/pepper/pepper_file_ref_renderer_host.h" 22 #include "content/renderer/pepper/pepper_file_ref_renderer_host.h"
22 #include "content/renderer/pepper/pepper_file_system_host.h" 23 #include "content/renderer/pepper/pepper_file_system_host.h"
23 #include "content/renderer/pepper/pepper_graphics_2d_host.h" 24 #include "content/renderer/pepper/pepper_graphics_2d_host.h"
24 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" 25 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h"
25 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 26 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
26 #include "content/renderer/pepper/pepper_url_loader_host.h" 27 #include "content/renderer/pepper/pepper_url_loader_host.h"
27 #include "content/renderer/pepper/pepper_video_capture_host.h" 28 #include "content/renderer/pepper/pepper_video_capture_host.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 205
205 // Dev interfaces. 206 // Dev interfaces.
206 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) { 207 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) {
207 switch (message.type()) { 208 switch (message.type()) {
208 case PpapiHostMsg_AudioEncoder_Create::ID: 209 case PpapiHostMsg_AudioEncoder_Create::ID:
209 return base::MakeUnique<PepperAudioEncoderHost>(host_, instance, 210 return base::MakeUnique<PepperAudioEncoderHost>(host_, instance,
210 resource); 211 resource);
211 case PpapiHostMsg_AudioInput_Create::ID: 212 case PpapiHostMsg_AudioInput_Create::ID:
212 return base::MakeUnique<PepperAudioInputHost>(host_, instance, 213 return base::MakeUnique<PepperAudioInputHost>(host_, instance,
213 resource); 214 resource);
215 case PpapiHostMsg_AudioOutput_Create::ID:
216 return base::MakeUnique<PepperAudioOutputHost>(host_, instance,
217 resource);
214 case PpapiHostMsg_FileChooser_Create::ID: 218 case PpapiHostMsg_FileChooser_Create::ID:
215 return base::MakeUnique<PepperFileChooserHost>(host_, instance, 219 return base::MakeUnique<PepperFileChooserHost>(host_, instance,
216 resource); 220 resource);
217 case PpapiHostMsg_VideoCapture_Create::ID: { 221 case PpapiHostMsg_VideoCapture_Create::ID: {
218 std::unique_ptr<PepperVideoCaptureHost> host( 222 std::unique_ptr<PepperVideoCaptureHost> host(
219 new PepperVideoCaptureHost(host_, instance, resource)); 223 new PepperVideoCaptureHost(host_, instance, resource));
220 return host->Init() ? std::move(host) : nullptr; 224 return host->Init() ? std::move(host) : nullptr;
221 } 225 }
222 } 226 }
223 } 227 }
(...skipping 11 matching lines...) Expand all
235 239
236 return nullptr; 240 return nullptr;
237 } 241 }
238 242
239 const ppapi::PpapiPermissions& 243 const ppapi::PpapiPermissions&
240 ContentRendererPepperHostFactory::GetPermissions() const { 244 ContentRendererPepperHostFactory::GetPermissions() const {
241 return host_->GetPpapiHost()->permissions(); 245 return host_->GetPpapiHost()->permissions();
242 } 246 }
243 247
244 } // namespace content 248 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/renderer/pepper/pepper_audio_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698