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

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: hta 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
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 int request_id, 193 int request_id,
194 const std::string& label, 194 const std::string& label,
195 const StreamDeviceInfo& device_info) { 195 const StreamDeviceInfo& device_info) {
196 NotifyDeviceOpened(request_id, true, label); 196 NotifyDeviceOpened(request_id, true, label);
197 } 197 }
198 198
199 void PepperMediaDeviceManager::OnDeviceOpenFailed(int request_id) { 199 void PepperMediaDeviceManager::OnDeviceOpenFailed(int request_id) {
200 NotifyDeviceOpened(request_id, false, std::string()); 200 NotifyDeviceOpened(request_id, false, std::string());
201 } 201 }
202 202
203 void PepperMediaDeviceManager::OnDevicesChanged() {}
204
203 // static 205 // static
204 MediaStreamType PepperMediaDeviceManager::FromPepperDeviceType( 206 MediaStreamType PepperMediaDeviceManager::FromPepperDeviceType(
205 PP_DeviceType_Dev type) { 207 PP_DeviceType_Dev type) {
206 switch (type) { 208 switch (type) {
207 case PP_DEVICETYPE_DEV_INVALID: 209 case PP_DEVICETYPE_DEV_INVALID:
208 return MEDIA_NO_SERVICE; 210 return MEDIA_NO_SERVICE;
209 case PP_DEVICETYPE_DEV_AUDIOCAPTURE: 211 case PP_DEVICETYPE_DEV_AUDIOCAPTURE:
210 return MEDIA_DEVICE_AUDIO_CAPTURE; 212 return MEDIA_DEVICE_AUDIO_CAPTURE;
211 case PP_DEVICETYPE_DEV_VIDEOCAPTURE: 213 case PP_DEVICETYPE_DEV_VIDEOCAPTURE:
212 return MEDIA_DEVICE_VIDEO_CAPTURE; 214 return MEDIA_DEVICE_VIDEO_CAPTURE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 MediaStreamDispatcher* PepperMediaDeviceManager::GetMediaStreamDispatcher() 252 MediaStreamDispatcher* PepperMediaDeviceManager::GetMediaStreamDispatcher()
251 const { 253 const {
252 DCHECK(render_frame()); 254 DCHECK(render_frame());
253 MediaStreamDispatcher* const dispatcher = 255 MediaStreamDispatcher* const dispatcher =
254 static_cast<RenderFrameImpl*>(render_frame())->GetMediaStreamDispatcher(); 256 static_cast<RenderFrameImpl*>(render_frame())->GetMediaStreamDispatcher();
255 DCHECK(dispatcher); 257 DCHECK(dispatcher);
256 return dispatcher; 258 return dispatcher;
257 } 259 }
258 260
259 } // namespace content 261 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698