Index: services/video_capture/test/mock_device_factory.cc |
diff --git a/services/video_capture/test/mock_device_factory.cc b/services/video_capture/test/mock_device_factory.cc |
index 8fe10777a5fe125f199056825add7aad03ff3dca..dd9a7875495f1cfdadeef2ffe6a72fbaa3590b68 100644 |
--- a/services/video_capture/test/mock_device_factory.cc |
+++ b/services/video_capture/test/mock_device_factory.cc |
@@ -8,11 +8,13 @@ |
namespace { |
// Report a single hard-coded supported format to clients. |
-media::VideoCaptureFormat kSupportedFormat(gfx::Size(), |
+media::VideoCaptureFormat kSupportedFormat(gfx::Size(640, 480), |
25.0f, |
media::PIXEL_FORMAT_I420, |
media::PIXEL_STORAGE_CPU); |
+// Wraps a raw pointer to a media::VideoCaptureDevice and allows us to |
+// create a std::unique_ptr<media::VideoCaptureDevice> that delegates to it. |
class RawPointerVideoCaptureDevice : public media::VideoCaptureDevice { |
public: |
explicit RawPointerVideoCaptureDevice(media::VideoCaptureDevice* device) |
@@ -35,6 +37,9 @@ class RawPointerVideoCaptureDevice : public media::VideoCaptureDevice { |
void TakePhoto(TakePhotoCallback callback) override { |
device_->TakePhoto(std::move(callback)); |
} |
+ void OnUtilizationReport(int frame_feedback_id, double utilization) override { |
+ device_->OnUtilizationReport(frame_feedback_id, utilization); |
+ } |
private: |
media::VideoCaptureDevice* device_; |