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

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

Issue 2857303002: [Mojo Video Capture] Implement a VideoCaptureProvider using the Mojo service (part 2) (Closed)
Patch Set: Added back update to |state_| which was accidentally dropped in PatchSet 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/service_video_capture_device_launcher.h
diff --git a/content/browser/renderer_host/media/service_video_capture_device_launcher.h b/content/browser/renderer_host/media/service_video_capture_device_launcher.h
index 6ef20ee68cde712f041ae77632f4ce3afb108ca6..31f1c21d3a12bfca15ce8db011390f0f5394ea37 100644
--- a/content/browser/renderer_host/media/service_video_capture_device_launcher.h
+++ b/content/browser/renderer_host/media/service_video_capture_device_launcher.h
@@ -31,7 +31,23 @@ class ServiceVideoCaptureDeviceLauncher : public VideoCaptureDeviceLauncher {
void OnUtilizationReport(int frame_feedback_id, double utilization);
private:
+ enum class State {
+ READY_TO_LAUNCH,
+ DEVICE_START_IN_PROGRESS,
+ DEVICE_START_ABORTING
+ };
+
+ void OnCreateDeviceCallback(
+ const media::VideoCaptureParams& params,
+ video_capture::mojom::DevicePtr device,
+ base::WeakPtr<media::VideoFrameReceiver> receiver,
+ Callbacks* callbacks,
+ base::OnceClosure done_cb,
+ video_capture::mojom::DeviceAccessResultCode result_code);
+
video_capture::mojom::DeviceFactoryPtr* const device_factory_;
+ State state_;
+ base::SequenceChecker sequence_checker_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698