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

Issue 2865563002: Image Capture: teach takePhoto() to accept an optional PhotoSettings dictionary (Closed)

Created:
3 years, 7 months ago by mcasas
Modified:
3 years, 7 months ago
CC:
chromium-reviews, blink-reviews, haraken, mcasas+imagecapture_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Image Capture: teach takePhoto() to accept an optional PhotoSettings dictionary This CL: - Adds an optional PhotoSettings arg to takePhoto(), - cleanup: the 3 private methods used to receive mojo callbacks (OnPhotoCapabilities, OnSetOptions and OnTakePhoto) get a Mojo prefix, for clarity. - adds a |trigger_take_photo| argument to setOptions() and a few others that pass it along; takePhoto() uses it to setOptions() when appropriate. The sequence of method calls in ImageCapture.cpp then would be: - without options takePhoto() -> OnMojoTakePhoto() - with options: takePhoto(options) -> setOptions(trigger_take_photo == true) --> OnMojoSetOptions(true) --> OnMojoPhotoCapabilities(true) --> OnMojoTakePhoto() - methods OnCapabilitiesUpdate() and OnCapabilitiesUpdateInternal() (which are essentially the same thing) are merged and the resulting method renamed to UpdateMediaTrackCapabilities() to make more evident what it does. BUG=718632 Review-Url: https://codereview.chromium.org/2865563002 Cr-Commit-Position: refs/heads/master@{#469766} Committed: https://chromium.googlesource.com/chromium/src/+/3fd00a51e22a0ffa55d0ab14725f9f300b2fc56b

Patch Set 1 : #

Total comments: 4

Patch Set 2 : reillyg@ comments: added param names #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -103 lines) Patch
A third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html View 1 chunk +71 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/modules/imagecapture/ImageCapture.h View 1 2 chunks +12 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp View 7 chunks +111 lines, -94 lines 0 comments Download
M third_party/WebKit/Source/modules/imagecapture/ImageCapture.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (12 generated)
mcasas
reillyg@ PTAL
3 years, 7 months ago (2017-05-05 00:09:29 UTC) #5
Reilly Grant (use Gerrit)
https://codereview.chromium.org/2865563002/diff/20001/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h File third_party/WebKit/Source/modules/imagecapture/ImageCapture.h (right): https://codereview.chromium.org/2865563002/diff/20001/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h#newcode59 third_party/WebKit/Source/modules/imagecapture/ImageCapture.h:59: ScriptPromise setOptions(ScriptState*, const PhotoSettings&, bool = false); Since the ...
3 years, 7 months ago (2017-05-05 16:00:28 UTC) #6
mcasas
Ptal https://codereview.chromium.org/2865563002/diff/20001/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h File third_party/WebKit/Source/modules/imagecapture/ImageCapture.h (right): https://codereview.chromium.org/2865563002/diff/20001/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h#newcode59 third_party/WebKit/Source/modules/imagecapture/ImageCapture.h:59: ScriptPromise setOptions(ScriptState*, const PhotoSettings&, bool = false); On ...
3 years, 7 months ago (2017-05-05 16:38:07 UTC) #7
Reilly Grant (use Gerrit)
lgtm https://codereview.chromium.org/2865563002/diff/40001/third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html File third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html (right): https://codereview.chromium.org/2865563002/diff/40001/third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html#newcode16 third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html:16: async_test(function(t) { nit: why not a promise_test?
3 years, 7 months ago (2017-05-05 17:18:00 UTC) #8
mcasas
https://codereview.chromium.org/2865563002/diff/40001/third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html File third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html (right): https://codereview.chromium.org/2865563002/diff/40001/third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html#newcode16 third_party/WebKit/LayoutTests/imagecapture/takephoto-with-photosettings.html:16: async_test(function(t) { On 2017/05/05 17:18:00, Reilly Grant wrote: > ...
3 years, 7 months ago (2017-05-05 18:43:08 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2865563002/40001
3 years, 7 months ago (2017-05-05 20:30:52 UTC) #16
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 20:37:30 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/3fd00a51e22a0ffa55d0ab14725f...

Powered by Google App Engine
This is Rietveld 408576698