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

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

Issue 2848973002: [Mojo Video Capture] Implement a VideoCaptureProvider using the Mojo service (part 1) (Closed)
Patch Set: Incorporated mcasas@'s suggestions from PatchSet 3 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
Index: content/browser/renderer_host/media/service_launched_video_capture_device.h
diff --git a/content/browser/renderer_host/media/service_launched_video_capture_device.h b/content/browser/renderer_host/media/service_launched_video_capture_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..6add459fd9c433b02c671ebbb562a66fe65f8960
--- /dev/null
+++ b/content/browser/renderer_host/media/service_launched_video_capture_device.h
@@ -0,0 +1,45 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_LAUNCHED_VIDEO_CAPTURE_DEVICE_H_
+#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_LAUNCHED_VIDEO_CAPTURE_DEVICE_H_
+
+#include "content/browser/renderer_host/media/video_capture_provider.h"
+#include "services/video_capture/public/interfaces/device.mojom.h"
+
+namespace content {
+
+// Implementation of LaunchedVideoCaptureDevice that uses the "video_capture"
+// service.
+class ServiceLaunchedVideoCaptureDevice : public LaunchedVideoCaptureDevice {
+ public:
+ explicit ServiceLaunchedVideoCaptureDevice(
+ video_capture::mojom::DevicePtr device);
+ ~ServiceLaunchedVideoCaptureDevice() override;
+
+ // LaunchedVideoCaptureDevice implementation.
+ void GetPhotoCapabilities(
+ media::VideoCaptureDevice::GetPhotoCapabilitiesCallback callback)
+ const override;
+ void SetPhotoOptions(
+ media::mojom::PhotoSettingsPtr settings,
+ media::VideoCaptureDevice::SetPhotoOptionsCallback callback) override;
+ void TakePhoto(
+ media::VideoCaptureDevice::TakePhotoCallback callback) override;
+ void MaybeSuspendDevice() override;
+ void ResumeDevice() override;
+ void RequestRefreshFrame() override;
+
+ void SetDesktopCaptureWindowIdAsync(gfx::NativeViewId window_id,
+ base::OnceClosure done_cb) override;
+
+ void OnUtilizationReport(int frame_feedback_id, double utilization) override;
+
+ private:
+ const video_capture::mojom::DevicePtr device_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_LAUNCHED_VIDEO_CAPTURE_DEVICE_H_

Powered by Google App Engine
This is Rietveld 408576698