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

Unified Diff: content/browser/renderer_host/media/video_capture_provider.h

Issue 2800493002: [Mojo Video Capture] Create abstraction VideoCaptureProvider (Closed)
Patch Set: Incorporated suggestions from PatchSet 2 Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_provider.h
diff --git a/content/browser/renderer_host/media/buildable_video_capture_device.h b/content/browser/renderer_host/media/video_capture_provider.h
similarity index 83%
rename from content/browser/renderer_host/media/buildable_video_capture_device.h
rename to content/browser/renderer_host/media/video_capture_provider.h
index e358435d24d771178c82297cef114192374ab885..8515a5343950f7e4e7919abdac57afd85d5488dc 100644
--- a/content/browser/renderer_host/media/buildable_video_capture_device.h
+++ b/content/browser/renderer_host/media/video_capture_provider.h
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "content/public/common/media_stream_request.h"
#include "media/capture/video/video_capture_device.h"
+#include "media/capture/video/video_capture_device_info.h"
#include "media/capture/video_capture_types.h"
namespace content {
@@ -65,6 +66,22 @@ class CONTENT_EXPORT BuildableVideoCaptureDevice {
base::OnceClosure done_cb) = 0;
};
+class CONTENT_EXPORT VideoCaptureProvider {
+ public:
+ virtual ~VideoCaptureProvider() {}
+
+ // The passed-in |result_callback| must guarantee that the called
+ // instance stays alive until |result_callback| is invoked.
+ virtual void GetDeviceInfosAsync(
+ const base::Callback<
+ void(const std::vector<media::VideoCaptureDeviceInfo>&)>&
+ result_callback) = 0;
+
+ virtual std::unique_ptr<BuildableVideoCaptureDevice> CreateBuildableDevice(
+ const std::string& device_id,
+ MediaStreamType stream_type) = 0;
+};
+
} // namespace content
#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_BUILDABLE_VIDEO_CAPTURE_DEVICE_H_
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698