OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/renderer_host/media/media_capture_devices_impl.h" | 5 #include "content/browser/renderer_host/media/media_capture_devices_impl.h" |
6 | 6 |
7 #include "content/browser/browser_main_loop.h" | 7 #include "content/browser/browser_main_loop.h" |
8 #include "content/browser/renderer_host/media/media_stream_manager.h" | 8 #include "content/browser/renderer_host/media/media_stream_manager.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 BrowserMainLoop::GetInstance()->media_stream_manager()))); | 21 BrowserMainLoop::GetInstance()->media_stream_manager()))); |
22 } | 22 } |
23 | 23 |
24 } // namespace | 24 } // namespace |
25 | 25 |
26 MediaCaptureDevices* MediaCaptureDevices::GetInstance() { | 26 MediaCaptureDevices* MediaCaptureDevices::GetInstance() { |
27 return MediaCaptureDevicesImpl::GetInstance(); | 27 return MediaCaptureDevicesImpl::GetInstance(); |
28 } | 28 } |
29 | 29 |
30 MediaCaptureDevicesImpl* MediaCaptureDevicesImpl::GetInstance() { | 30 MediaCaptureDevicesImpl* MediaCaptureDevicesImpl::GetInstance() { |
31 return Singleton<MediaCaptureDevicesImpl>::get(); | 31 return base::Singleton<MediaCaptureDevicesImpl>::get(); |
32 } | 32 } |
33 | 33 |
34 const MediaStreamDevices& | 34 const MediaStreamDevices& |
35 MediaCaptureDevicesImpl::GetAudioCaptureDevices() { | 35 MediaCaptureDevicesImpl::GetAudioCaptureDevices() { |
36 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 36 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
37 if (!devices_enumerated_) { | 37 if (!devices_enumerated_) { |
38 EnsureMonitorCaptureDevices(); | 38 EnsureMonitorCaptureDevices(); |
39 devices_enumerated_ = true; | 39 devices_enumerated_ = true; |
40 } | 40 } |
41 return audio_devices_; | 41 return audio_devices_; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 | 91 |
92 void MediaCaptureDevicesImpl::UpdateVideoDevicesOnUIThread( | 92 void MediaCaptureDevicesImpl::UpdateVideoDevicesOnUIThread( |
93 const MediaStreamDevices& devices) { | 93 const MediaStreamDevices& devices) { |
94 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 94 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
95 devices_enumerated_ = true; | 95 devices_enumerated_ = true; |
96 video_devices_ = devices; | 96 video_devices_ = devices; |
97 } | 97 } |
98 | 98 |
99 } // namespace content | 99 } // namespace content |
OLD | NEW |