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

Side by Side Diff: content/renderer/pepper/pepper_media_device_manager.cc

Issue 1918173002: Add support for device-change notifications to MediaStreamDispatcher and MediaStreamDispatcherHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and palmer's comments Created 4 years, 7 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/pepper/pepper_media_device_manager.h ('k') | no next file » | 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/pepper_media_device_manager.h" 5 #include "content/renderer/pepper/pepper_media_device_manager.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 int request_id, 190 int request_id,
191 const std::string& label, 191 const std::string& label,
192 const StreamDeviceInfo& device_info) { 192 const StreamDeviceInfo& device_info) {
193 NotifyDeviceOpened(request_id, true, label); 193 NotifyDeviceOpened(request_id, true, label);
194 } 194 }
195 195
196 void PepperMediaDeviceManager::OnDeviceOpenFailed(int request_id) { 196 void PepperMediaDeviceManager::OnDeviceOpenFailed(int request_id) {
197 NotifyDeviceOpened(request_id, false, std::string()); 197 NotifyDeviceOpened(request_id, false, std::string());
198 } 198 }
199 199
200 void PepperMediaDeviceManager::OnDevicesChanged() {}
201
200 // static 202 // static
201 MediaStreamType PepperMediaDeviceManager::FromPepperDeviceType( 203 MediaStreamType PepperMediaDeviceManager::FromPepperDeviceType(
202 PP_DeviceType_Dev type) { 204 PP_DeviceType_Dev type) {
203 switch (type) { 205 switch (type) {
204 case PP_DEVICETYPE_DEV_INVALID: 206 case PP_DEVICETYPE_DEV_INVALID:
205 return MEDIA_NO_SERVICE; 207 return MEDIA_NO_SERVICE;
206 case PP_DEVICETYPE_DEV_AUDIOCAPTURE: 208 case PP_DEVICETYPE_DEV_AUDIOCAPTURE:
207 return MEDIA_DEVICE_AUDIO_CAPTURE; 209 return MEDIA_DEVICE_AUDIO_CAPTURE;
208 case PP_DEVICETYPE_DEV_VIDEOCAPTURE: 210 case PP_DEVICETYPE_DEV_VIDEOCAPTURE:
209 return MEDIA_DEVICE_VIDEO_CAPTURE; 211 return MEDIA_DEVICE_VIDEO_CAPTURE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 MediaStreamDispatcher* PepperMediaDeviceManager::GetMediaStreamDispatcher() 249 MediaStreamDispatcher* PepperMediaDeviceManager::GetMediaStreamDispatcher()
248 const { 250 const {
249 DCHECK(render_frame()); 251 DCHECK(render_frame());
250 MediaStreamDispatcher* const dispatcher = 252 MediaStreamDispatcher* const dispatcher =
251 static_cast<RenderFrameImpl*>(render_frame())->GetMediaStreamDispatcher(); 253 static_cast<RenderFrameImpl*>(render_frame())->GetMediaStreamDispatcher();
252 DCHECK(dispatcher); 254 DCHECK(dispatcher);
253 return dispatcher; 255 return dispatcher;
254 } 256 }
255 257
256 } // namespace content 258 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_media_device_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698