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).


Bug: 732521
Change-Id: Id5a3ee3b58cedd289a18fa1c721be390776c6543
Reviewed-by: Kent Tamura <>
Reviewed-by: Reilly Grant <>
Commit-Queue: Miguel Casas <>
Cr-Commit-Position: refs/heads/master@{#480447}
10 files changed