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

Side by Side Diff: content/browser/renderer_host/media/media_capture_devices_impl.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698