OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module blink.mojom; | 5 module media.mojom; |
6 | 6 |
7 // Equivalent to idl MediaSettingsRange, arbitrary range representing the | 7 // Equivalent to idl MediaSettingsRange, arbitrary range representing the |
8 // allowed variations of a Capability or an Option. | 8 // allowed variations of a Capability or an Option. |
9 // http://w3c.github.io/mediacapture-image/#mediasettingsrange | 9 // http://w3c.github.io/mediacapture-image/#mediasettingsrange |
10 struct Range { | 10 struct Range { |
11 uint32 max; | 11 uint32 max; |
12 uint32 min; | 12 uint32 min; |
13 uint32 current; | 13 uint32 current; |
14 }; | 14 }; |
15 | 15 |
| 16 // Equivalent to idl PhotoCapabilities, |
| 17 // http://w3c.github.io/mediacapture-image/#photocapabilities |
16 struct PhotoCapabilities { | 18 struct PhotoCapabilities { |
17 Range zoom; | 19 Range zoom; |
18 }; | 20 }; |
19 | 21 |
| 22 // |source_id| is the renderer-side UUID identifier of the image capture device. |
20 interface ImageCapture | 23 interface ImageCapture |
21 { | 24 { |
| 25 // Retrieves the image capture device capabilities and current settings. |
| 26 // http://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-getP
hotoCapabilities-Promise-PhotoCapabilities |
22 GetCapabilities(string source_id) | 27 GetCapabilities(string source_id) |
23 => (PhotoCapabilities capabilities); | 28 => (PhotoCapabilities capabilities); |
24 | 29 |
| 30 // Takes a Photo from the given |source_id|, returning it encoded in |data| |
| 31 // with the format specified in |mime_type|. |
| 32 // http://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-take
Photo-Promise-Blob |
25 TakePhoto(string source_id) | 33 TakePhoto(string source_id) |
26 => (string mime_type, array<uint8> data); | 34 => (string mime_type, array<uint8> data); |
27 }; | 35 }; |
OLD | NEW |