| 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 media.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 // https://w3c.github.io/mediacapture-image/#mediasettingsrange | 9 // https://w3c.github.io/mediacapture-image/#mediasettingsrange |
| 10 struct Range { | 10 struct Range { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 struct PhotoSettings { | 31 struct PhotoSettings { |
| 32 // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag. | 32 // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag. |
| 33 bool has_zoom; | 33 bool has_zoom; |
| 34 uint32 zoom; | 34 uint32 zoom; |
| 35 bool has_width; | 35 bool has_width; |
| 36 uint32 width; | 36 uint32 width; |
| 37 bool has_height; | 37 bool has_height; |
| 38 uint32 height; | 38 uint32 height; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // This is a mojo move-only equivalent of a Blob, i.e. MIME type and Data. |
| 42 struct Blob { |
| 43 string mime_type; |
| 44 array<uint8> data; |
| 45 }; |
| 46 |
| 41 // |source_id| is the renderer-side UUID identifier of the image capture device. | 47 // |source_id| is the renderer-side UUID identifier of the image capture device. |
| 42 interface ImageCapture | 48 interface ImageCapture |
| 43 { | 49 { |
| 44 // Retrieves the image capture device capabilities and current settings. | 50 // Retrieves the image capture device capabilities and current settings. |
| 45 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-get
PhotoCapabilities-Promise-PhotoCapabilities | 51 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-get
PhotoCapabilities-Promise-PhotoCapabilities |
| 46 GetCapabilities(string source_id) | 52 GetCapabilities(string source_id) |
| 47 => (PhotoCapabilities capabilities); | 53 => (PhotoCapabilities capabilities); |
| 48 | 54 |
| 49 // Sets the |settings| on the associated video capture device. | 55 // Sets the |settings| on the associated video capture device. |
| 50 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-set
Options-Promise-void--PhotoSettings-photoSettings | 56 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-set
Options-Promise-void--PhotoSettings-photoSettings |
| 51 SetOptions(string source_id, PhotoSettings settings) | 57 SetOptions(string source_id, PhotoSettings settings) |
| 52 => (bool success); | 58 => (bool success); |
| 53 | 59 |
| 54 // Takes a Photo from the given |source_id|, returning it encoded in |data| | 60 // Takes a Photo from the given |source_id|, returning it encoded in |blob| |
| 55 // with the format specified in |mime_type|. | 61 // with the format specified in its |mime_type|. |
| 56 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-tak
ePhoto-Promise-Blob | 62 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-tak
ePhoto-Promise-Blob |
| 57 TakePhoto(string source_id) | 63 TakePhoto(string source_id) |
| 58 => (string mime_type, array<uint8> data); | 64 => (Blob blob); |
| 59 }; | 65 }; |
| OLD | NEW |