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

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

Issue 2753073006: [Mojo Video Capture] Add support to BuildableVideoCaptureDevice for aborting the device start. (Closed)
Patch Set: Incorporate suggestions from Patch Set 1 Created 3 years, 9 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/buildable_video_capture_device.h
diff --git a/content/browser/renderer_host/media/buildable_video_capture_device.h b/content/browser/renderer_host/media/buildable_video_capture_device.h
index 7ea3d9fe2758d01f8fe8daaf121e0115fec5129a..11f2d5668cc34e2461238f13ef10c1655a3421a4 100644
--- a/content/browser/renderer_host/media/buildable_video_capture_device.h
+++ b/content/browser/renderer_host/media/buildable_video_capture_device.h
@@ -24,6 +24,7 @@ class CONTENT_EXPORT BuildableDeviceCallbacks {
virtual void WillStartDevice(media::VideoFacingMode facing_mode) = 0;
virtual void DidStartDevice(VideoCaptureController* controller) = 0;
virtual void OnDeviceStartFailed(VideoCaptureController* controller) = 0;
+ virtual void OnDeviceStartAborted() = 0;
};
// Abstraction for a video capture device that must be "built" before it can be
@@ -34,9 +35,14 @@ class CONTENT_EXPORT BuildableDeviceCallbacks {
// reported to an instance of BuildableDeviceCallbacks (see above). Once the
// device has been built successfully, the "Device operation methods", are
// allowed to be called. ReleaseDeviceAsync() must be called in order to
-// release the device if it has before been built successfully. After calling
-// ReleaseDeviceAsync(), it is legal to call CreateAndStartDeviceAsync() to
-// rebuild and start the device again.
+// release the device if it has before been built successfully.
+// Clients may call ReleaseDeviceAsync() before a preceding call to
+// CreateAndStartDeviceAsync() has resulted in a callback to OnDeviceStarted()
+// or OnDeviceStartFailed(). Doing so requests the device startup to be aborted,
+// and the BuildableVideoCaptureDevice will call OnDeviceStartAborted() to
+// indicate when the abort is completed.
+// After calling ReleaseDeviceAsync(), it is legal to call
+// CreateAndStartDeviceAsync() to rebuild and start the device again.
class BuildableVideoCaptureDevice {
public:
virtual ~BuildableVideoCaptureDevice() {}

Powered by Google App Engine
This is Rietveld 408576698