New issue
Advanced search Search tips

Issue 732521 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug
61



Sign in to add a comment

Image Capture: add getPhotoOptions() method

Project Member Reported by mcasas@chromium.org, Jun 12 2017

Issue description

Project Member

Comment 1 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3314842c70063bf93214fafca6e36148bf4a7940

commit 3314842c70063bf93214fafca6e36148bf4a7940
Author: Miguel Casas-Sanchez <mcasas@chromium.org>
Date: Tue Jun 13 16:49:26 2017

Image Capture: s/PhotoCapabilities/PhotoState in mojo and elsewhere

This CL renames media.mojom.PhotoCapabilities to PhotoState (and
the associated method from getCapabilities to getPhotoState), to 
reflect that the method and data type merge the device's 
capabilities and current settings into a single struct/request. 

FTR, the JS API provides capabilities and settings separatedly, so 
this change greatly clarifies the mapping. Also, this change is 
needed to grab the state of the flash light and of the red eye 
reduction, which is needed for the bug.


** Absolutely no new code, just a lot of renaming. **



Bug:  732521 
Change-Id: Ic39f4496fd5d5f92f1b0cc99b1c7dc4503353a5f
Reviewed-on: https://chromium-review.googlesource.com/532075
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479050}
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/image_capture/image_capture_impl.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/image_capture/image_capture_impl.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/in_process_launched_video_capture_device.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/in_process_launched_video_capture_device.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/mock_video_capture_provider.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/service_launched_video_capture_device.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/service_launched_video_capture_device.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/video_capture_controller.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/video_capture_controller.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/video_capture_manager.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/video_capture_manager.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/video_capture_manager_unittest.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/content/browser/renderer_host/media/video_capture_provider.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/mojo/image_capture.mojom
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/android/video_capture_device_android.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/android/video_capture_device_android.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/fake_video_capture_device.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/fake_video_capture_device.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/fake_video_capture_device_factory.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/fake_video_capture_device_unittest.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/linux/v4l2_capture_delegate.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/linux/v4l2_capture_delegate.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/linux/video_capture_device_linux.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/linux/video_capture_device_linux.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/mac/video_capture_device_mac.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/mac/video_capture_device_mac.mm
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/video_capture_device.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/video_capture_device.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/video_capture_device_unittest.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/win/video_capture_device_win.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/media/capture/video/win/video_capture_device_win.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/services/video_capture/test/mock_device_factory.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/services/video_capture/test/mock_device_test.cc
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/services/video_capture/test/mock_device_test.h
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-reject.html
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-getCapabilities.html
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-getSettings.html
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/third_party/WebKit/LayoutTests/imagecapture/getPhotoCapabilities.html
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/third_party/WebKit/LayoutTests/imagecapture/resources/mock-imagecapture.js
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/third_party/WebKit/LayoutTests/imagecapture/setOptions-reject.html
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
[modify] https://crrev.com/3314842c70063bf93214fafca6e36148bf4a7940/third_party/WebKit/Source/modules/imagecapture/ImageCapture.h

Comment 2 by mcasas@chromium.org, Jun 15 2017

https://www.chromestatus.com/feature/5104908176982016
is tracking this feature.

Comment 4 by mcasas@chromium.org, Jun 20 2017

Somehow my landed patches didn't ping this bug, so copying by hand:



https://chromium-review.googlesource.com/c/534754/

Image Capture: add getPhotoSettings() method

This CL adds a method getPhotoSettings() to catch up with 
the idl [1], and also adds tests for it.

ToT code calls the two mojo methods (getPhotoState() and SetOptions())
and distinguishes how to Resolve() the Promises via the Blink's
|service_requests_| map. Instead of extending this mechanism, this CL
binds to the OnMojo...() methods one of 4 new callbacks (WTF::Function):

- ResolveWithNothing()
- ResolveWithPhotoSettings()
- ResolveWithPhotoCapabilities()
- ResolveWithMediaTrackConstraints()

So that the different sequences to mojo and back are now:

getPhotoCapabilities --> OnMojoGetPhotoState --> ResolveWithPhotoCapabilities
getPhotoSettings --> OnMojoGetPhotoState --> ResolveWithPhotoSettings
setOptions --> OnMojoSetOptions --> OnMojoGetPhotoState --> ResolveWithNothing
SetMediaTrackConstraints --> OnMojoSetOptions --> OnMojoGetPhotoState --> ResolveWithMediaTrackConstraints

(note that the "set" versions have a cycle of setting and
a cycle of current state readback).

[1] https://github.com/w3c/mediacapture-image/issues/167

Bug:  732521 
Change-Id: Id5a3ee3b58cedd289a18fa1c721be390776c6543
Reviewed-on: https://chromium-review.googlesource.com/534754
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480447}





https://chromium-review.googlesource.com/c/539756/

Image Capture: use single quotes throughout layout tests

This CL homogeneises all JS quotes to be single, where they are mixed
on ToT.

** No new code **

HTML quotes stay double, i.e.:
<script src="resources/mock-imagecapture.js"></script>


Bug:  732521 
Change-Id: I590d93e258dfb5d2e620431d6d73b1cee0247ec4
Reviewed-on: https://chromium-review.googlesource.com/539756
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Vincent Scheib <scheib@chromium.org>
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480481}

Comment 5 by mcasas@chromium.org, Jun 20 2017

Status: Fixed (was: Assigned)
Commit 141446c9... initially landed in 61.0.3136.0


Comment 6 by mcasas@chromium.org, Jun 20 2017

Status: Started (was: Fixed)

Sign in to add a comment