Chromium Code Reviews| 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..b144896c2444c2eac641aa764e5c9217c69e714d |
| --- /dev/null |
| +++ b/content/browser/renderer_host/media/service_launched_video_capture_device.h |
| @@ -0,0 +1,44 @@ |
| +// 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: |
| + 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: |
| + video_capture::mojom::DevicePtr device_; |
|
mcasas
2017/05/03 19:10:23
This can probably be const (since is passed on cto
chfremer
2017/05/03 21:29:36
You are correct that, in this CL, it can be const.
|
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_LAUNCHED_VIDEO_CAPTURE_DEVICE_H_ |