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

Unified Diff: media/mojo/interfaces/image_capture.mojom

Issue 2167313002: ImageCapture: introduce image_capture Blob to allow move-only semantics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: foolip comments and rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/mojo/interfaces/image_capture.mojom
diff --git a/media/mojo/interfaces/image_capture.mojom b/media/mojo/interfaces/image_capture.mojom
index d103ee1555ff127d282834f1ade0fc7a1849fffe..7c7fed8260a49eaf36fe73b74595b2179198da6d 100644
--- a/media/mojo/interfaces/image_capture.mojom
+++ b/media/mojo/interfaces/image_capture.mojom
@@ -38,6 +38,12 @@ struct PhotoSettings {
uint32 height;
};
+// This is a mojo move-only equivalent of a Blob, i.e. MIME type and Data.
+struct Blob {
+ string mime_type;
+ array<uint8> data;
+};
+
// |source_id| is the renderer-side UUID identifier of the image capture device.
interface ImageCapture
{
@@ -51,9 +57,9 @@ interface ImageCapture
SetOptions(string source_id, PhotoSettings settings)
=> (bool success);
- // Takes a Photo from the given |source_id|, returning it encoded in |data|
- // with the format specified in |mime_type|.
+ // Takes a Photo from the given |source_id|, returning it encoded in |blob|
+ // with the format specified in its |mime_type|.
// https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-takePhoto-Promise-Blob
TakePhoto(string source_id)
- => (string mime_type, array<uint8> data);
+ => (Blob blob);
};

Powered by Google App Engine
This is Rietveld 408576698