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

Side by Side Diff: content/browser/renderer_host/media/video_capture_provider.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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 media::VideoCaptureDevice::TakePhotoCallback callback) = 0; 61 media::VideoCaptureDevice::TakePhotoCallback callback) = 0;
62 virtual void MaybeSuspendDevice() = 0; 62 virtual void MaybeSuspendDevice() = 0;
63 virtual void ResumeDevice() = 0; 63 virtual void ResumeDevice() = 0;
64 virtual void RequestRefreshFrame() = 0; 64 virtual void RequestRefreshFrame() = 0;
65 65
66 // Methods for specific types of devices. 66 // Methods for specific types of devices.
67 virtual void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id, 67 virtual void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id,
68 base::OnceClosure done_cb) = 0; 68 base::OnceClosure done_cb) = 0;
69 }; 69 };
70 70
71 // Note: GetDeviceInfosAsync is only relevant for devices with
72 // MediaStreamType == MEDIA_DEVICE_VIDEO_CAPTURE, i.e. camera devices.
71 class CONTENT_EXPORT VideoCaptureProvider { 73 class CONTENT_EXPORT VideoCaptureProvider {
72 public: 74 public:
75 using GetDeviceInfosCallback =
76 base::Callback<void(const std::vector<media::VideoCaptureDeviceInfo>&)>;
77
73 virtual ~VideoCaptureProvider() {} 78 virtual ~VideoCaptureProvider() {}
74 79
75 virtual void Uninitialize() = 0; 80 virtual void Uninitialize() = 0;
76 81
77 // The passed-in |result_callback| must guarantee that the called 82 // The passed-in |result_callback| must guarantee that the called
78 // instance stays alive until |result_callback| is invoked. 83 // instance stays alive until |result_callback| is invoked.
79 virtual void GetDeviceInfosAsync( 84 virtual void GetDeviceInfosAsync(
80 const base::Callback< 85 const GetDeviceInfosCallback& result_callback) = 0;
81 void(const std::vector<media::VideoCaptureDeviceInfo>&)>&
82 result_callback) = 0;
83 86
84 virtual std::unique_ptr<VideoCaptureDeviceLauncher> 87 virtual std::unique_ptr<VideoCaptureDeviceLauncher>
85 CreateDeviceLauncher() = 0; 88 CreateDeviceLauncher() = 0;
86 }; 89 };
87 90
88 } // namespace content 91 } // namespace content
89 92
90 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_ 93 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698