OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_PROVIDER_SWITCHER_H_ | |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_PROVIDER_SWITCHER_H_ | |
7 | |
8 #include "content/browser/renderer_host/media/video_capture_provider.h" | |
9 #include "services/video_capture/public/interfaces/device_factory.mojom.h" | |
10 | |
11 namespace content { | |
12 | |
13 // Routes requests for media devices, e.g. cameras, to | |
14 // |media_device_capture_provider| and for all other types of capture, e.g. | |
15 // screen or tab capture, to the given |other_types_capture_provider|. | |
16 class CONTENT_EXPORT VideoCaptureProviderSwitcher | |
17 : public VideoCaptureProvider { | |
18 public: | |
19 VideoCaptureProviderSwitcher( | |
20 std::unique_ptr<VideoCaptureProvider> media_device_capture_provider, | |
21 std::unique_ptr<VideoCaptureProvider> other_types_capture_provider); | |
22 ~VideoCaptureProviderSwitcher() override; | |
23 | |
24 void Uninitialize() override; | |
25 | |
26 void GetDeviceInfosAsync( | |
27 const base::Callback<void( | |
28 const std::vector<media::VideoCaptureDeviceInfo>&)>& result_callback) | |
piman
2017/05/15 19:34:32
nit: should this callback type be a typedef in Vid
chfremer
2017/05/15 22:08:13
Done.
| |
29 override; | |
30 | |
31 std::unique_ptr<VideoCaptureDeviceLauncher> CreateDeviceLauncher() override; | |
32 | |
33 private: | |
34 const std::unique_ptr<VideoCaptureProvider> media_device_capture_provider_; | |
35 const std::unique_ptr<VideoCaptureProvider> other_types_capture_provider_; | |
36 }; | |
37 | |
38 } // namespace content | |
39 | |
40 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_PROVIDER_SWITCHER_H _ | |
OLD | NEW |