| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |