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 "chrome/browser/media/media_capture_devices_dispatcher.h" | 5 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 #if defined(ENABLE_EXTENSIONS) | 68 #if defined(ENABLE_EXTENSIONS) |
69 inline DesktopCaptureAccessHandler* ToDesktopCaptureAccessHandler( | 69 inline DesktopCaptureAccessHandler* ToDesktopCaptureAccessHandler( |
70 MediaAccessHandler* handler) { | 70 MediaAccessHandler* handler) { |
71 return static_cast<DesktopCaptureAccessHandler*>(handler); | 71 return static_cast<DesktopCaptureAccessHandler*>(handler); |
72 } | 72 } |
73 #endif | 73 #endif |
74 } // namespace | 74 } // namespace |
75 | 75 |
76 MediaCaptureDevicesDispatcher* MediaCaptureDevicesDispatcher::GetInstance() { | 76 MediaCaptureDevicesDispatcher* MediaCaptureDevicesDispatcher::GetInstance() { |
77 return Singleton<MediaCaptureDevicesDispatcher>::get(); | 77 return base::Singleton<MediaCaptureDevicesDispatcher>::get(); |
78 } | 78 } |
79 | 79 |
80 MediaCaptureDevicesDispatcher::MediaCaptureDevicesDispatcher() | 80 MediaCaptureDevicesDispatcher::MediaCaptureDevicesDispatcher() |
81 : is_device_enumeration_disabled_(false), | 81 : is_device_enumeration_disabled_(false), |
82 media_stream_capture_indicator_(new MediaStreamCaptureIndicator()) { | 82 media_stream_capture_indicator_(new MediaStreamCaptureIndicator()) { |
83 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 83 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
84 | 84 |
85 #if defined(OS_MACOSX) | 85 #if defined(OS_MACOSX) |
86 // AVFoundation is used for video/audio device monitoring and video capture. | 86 // AVFoundation is used for video/audio device monitoring and video capture. |
87 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 87 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 396 |
397 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( | 397 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( |
398 const MediaStreamDevices& devices) { | 398 const MediaStreamDevices& devices) { |
399 test_audio_devices_ = devices; | 399 test_audio_devices_ = devices; |
400 } | 400 } |
401 | 401 |
402 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( | 402 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( |
403 const MediaStreamDevices& devices) { | 403 const MediaStreamDevices& devices) { |
404 test_video_devices_ = devices; | 404 test_video_devices_ = devices; |
405 } | 405 } |
OLD | NEW |