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

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

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_H 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_H
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_H 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_H
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "content/public/browser/media_capture_devices.h" 9 #include "content/public/browser/media_capture_devices.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class MediaCaptureDevicesImpl : public MediaCaptureDevices { 13 class MediaCaptureDevicesImpl : public MediaCaptureDevices {
14 public: 14 public:
15 static MediaCaptureDevicesImpl* GetInstance(); 15 static MediaCaptureDevicesImpl* GetInstance();
16 16
17 // Overriden from MediaCaptureDevices 17 // Overriden from MediaCaptureDevices
18 virtual const MediaStreamDevices& GetAudioCaptureDevices() override; 18 const MediaStreamDevices& GetAudioCaptureDevices() override;
19 virtual const MediaStreamDevices& GetVideoCaptureDevices() override; 19 const MediaStreamDevices& GetVideoCaptureDevices() override;
20 20
21 // Called by MediaStreamManager to notify the change of media capture 21 // Called by MediaStreamManager to notify the change of media capture
22 // devices, these 2 methods are called in IO thread. 22 // devices, these 2 methods are called in IO thread.
23 void OnAudioCaptureDevicesChanged(const MediaStreamDevices& devices); 23 void OnAudioCaptureDevicesChanged(const MediaStreamDevices& devices);
24 void OnVideoCaptureDevicesChanged(const MediaStreamDevices& devices); 24 void OnVideoCaptureDevicesChanged(const MediaStreamDevices& devices);
25 25
26 private: 26 private:
27 friend struct DefaultSingletonTraits<MediaCaptureDevicesImpl>; 27 friend struct DefaultSingletonTraits<MediaCaptureDevicesImpl>;
28 MediaCaptureDevicesImpl(); 28 MediaCaptureDevicesImpl();
29 virtual ~MediaCaptureDevicesImpl(); 29 ~MediaCaptureDevicesImpl() override;
30 30
31 void UpdateAudioDevicesOnUIThread(const content::MediaStreamDevices& devices); 31 void UpdateAudioDevicesOnUIThread(const content::MediaStreamDevices& devices);
32 void UpdateVideoDevicesOnUIThread(const content::MediaStreamDevices& devices); 32 void UpdateVideoDevicesOnUIThread(const content::MediaStreamDevices& devices);
33 33
34 // Flag to indicate if device enumeration has been done/doing. 34 // Flag to indicate if device enumeration has been done/doing.
35 // Only accessed on UI thread. 35 // Only accessed on UI thread.
36 bool devices_enumerated_; 36 bool devices_enumerated_;
37 37
38 // A list of cached audio capture devices. 38 // A list of cached audio capture devices.
39 MediaStreamDevices audio_devices_; 39 MediaStreamDevices audio_devices_;
40 40
41 // A list of cached video capture devices. 41 // A list of cached video capture devices.
42 MediaStreamDevices video_devices_; 42 MediaStreamDevices video_devices_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesImpl); 44 DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesImpl);
45 }; 45 };
46 46
47 } // namespace content 47 } // namespace content
48 48
49 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_H 49 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698