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

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

Issue 2867213004: [Mojo Video Capture] Hook up video capture service behind a feature flag (Closed)
Patch Set: Rebase to May 19th Created 3 years, 7 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
(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 GetDeviceInfosCallback& result_callback) override;
28
29 std::unique_ptr<VideoCaptureDeviceLauncher> CreateDeviceLauncher() override;
30
31 private:
32 const std::unique_ptr<VideoCaptureProvider> media_device_capture_provider_;
33 const std::unique_ptr<VideoCaptureProvider> other_types_capture_provider_;
34 };
35
36 } // namespace content
37
38 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_PROVIDER_SWITCHER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698