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

Unified Diff: third_party/WebKit/Source/modules/imagecapture/ImageCapture.h

Issue 2871653003: Image Capture: teach takePhoto() to accept an optional PhotoSettings dictionary (2nd landing) (Closed)
Patch Set: 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: third_party/WebKit/Source/modules/imagecapture/ImageCapture.h
diff --git a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h
index e1138bdc8fd23a87af15ed6df899d70999938b93..31f1d79a2cf537065002e87222dbeee703538b5e 100644
--- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h
+++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h
@@ -56,9 +56,12 @@ class MODULES_EXPORT ImageCapture final
ScriptPromise getPhotoCapabilities(ScriptState*);
- ScriptPromise setOptions(ScriptState*, const PhotoSettings&);
+ ScriptPromise setOptions(ScriptState*,
+ const PhotoSettings&,
+ bool trigger_take_photo = false);
ScriptPromise takePhoto(ScriptState*);
+ ScriptPromise takePhoto(ScriptState*, const PhotoSettings&);
ScriptPromise grabFrame(ScriptState*);
@@ -77,14 +80,15 @@ class MODULES_EXPORT ImageCapture final
private:
ImageCapture(ExecutionContext*, MediaStreamTrack*);
- void OnPhotoCapabilities(ScriptPromiseResolver*,
- media::mojom::blink::PhotoCapabilitiesPtr);
- void OnSetOptions(ScriptPromiseResolver*, bool);
- void OnTakePhoto(ScriptPromiseResolver*, media::mojom::blink::BlobPtr);
- void OnCapabilitiesUpdate(media::mojom::blink::PhotoCapabilitiesPtr);
+ void OnMojoPhotoCapabilities(ScriptPromiseResolver*,
+ bool trigger_take_photo,
+ media::mojom::blink::PhotoCapabilitiesPtr);
+ void OnMojoSetOptions(ScriptPromiseResolver*,
+ bool trigger_take_photo,
+ bool result);
+ void OnMojoTakePhoto(ScriptPromiseResolver*, media::mojom::blink::BlobPtr);
- void OnCapabilitiesUpdateInternal(
- const media::mojom::blink::PhotoCapabilities&);
+ void UpdateMediaTrackCapabilities(media::mojom::blink::PhotoCapabilitiesPtr);
void OnServiceConnectionError();
Member<MediaStreamTrack> stream_track_;

Powered by Google App Engine
This is Rietveld 408576698