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 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "content/public/browser/media_capture_devices.h" | 10 #include "content/public/browser/media_capture_devices.h" |
| 11 #include "media/base/video_facing.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
14 class MediaCaptureDevicesImpl : public MediaCaptureDevices { | 15 class MediaCaptureDevicesImpl : public MediaCaptureDevices { |
15 public: | 16 public: |
16 static MediaCaptureDevicesImpl* GetInstance(); | 17 static MediaCaptureDevicesImpl* GetInstance(); |
17 | 18 |
18 // Overriden from MediaCaptureDevices | 19 // Overriden from MediaCaptureDevices |
19 const MediaStreamDevices& GetAudioCaptureDevices() override; | 20 const MediaStreamDevices& GetAudioCaptureDevices() override; |
20 const MediaStreamDevices& GetVideoCaptureDevices() override; | 21 const MediaStreamDevices& GetVideoCaptureDevices() override; |
| 22 void AddVideoCaptureObserver(media::VideoCaptureObserver* observer) override; |
| 23 void RemoveAllVideoCaptureObservers() override; |
21 | 24 |
22 // Called by MediaStreamManager to notify the change of media capture | 25 // Called by MediaStreamManager to notify the change of media capture |
23 // devices, these 2 methods are called in IO thread. | 26 // devices, these 2 methods are called in IO thread. |
24 void OnAudioCaptureDevicesChanged(const MediaStreamDevices& devices); | 27 void OnAudioCaptureDevicesChanged(const MediaStreamDevices& devices); |
25 void OnVideoCaptureDevicesChanged(const MediaStreamDevices& devices); | 28 void OnVideoCaptureDevicesChanged(const MediaStreamDevices& devices); |
26 | 29 |
27 private: | 30 private: |
28 friend struct base::DefaultSingletonTraits<MediaCaptureDevicesImpl>; | 31 friend struct base::DefaultSingletonTraits<MediaCaptureDevicesImpl>; |
29 MediaCaptureDevicesImpl(); | 32 MediaCaptureDevicesImpl(); |
30 ~MediaCaptureDevicesImpl() override; | 33 ~MediaCaptureDevicesImpl() override; |
(...skipping 10 matching lines...) Expand all Loading... |
41 | 44 |
42 // A list of cached video capture devices. | 45 // A list of cached video capture devices. |
43 MediaStreamDevices video_devices_; | 46 MediaStreamDevices video_devices_; |
44 | 47 |
45 DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesImpl); | 48 DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesImpl); |
46 }; | 49 }; |
47 | 50 |
48 } // namespace content | 51 } // namespace content |
49 | 52 |
50 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_IMPL_H_ | 53 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_IMPL_H_ |
OLD | NEW |