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

Unified Diff: chrome/common/extensions/media_parser.mojom

Issue 2667443002: Convert utility process ParseMediaMetadata blob reading IPC to mojo (Closed)
Patch Set: Remove the damn helper: call ReleaseProcessIfNeeded directly. Created 3 years, 10 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: chrome/common/extensions/media_parser.mojom
diff --git a/chrome/common/extensions/media_parser.mojom b/chrome/common/extensions/media_parser.mojom
index cc700c5acc0b171df1515bc1316ba8bb39c67785..aa41afd527b5c091e1a402dbb97d8a57cba650a2 100644
--- a/chrome/common/extensions/media_parser.mojom
+++ b/chrome/common/extensions/media_parser.mojom
@@ -11,15 +11,15 @@ import "mojo/common/file.mojom";
import "mojo/common/time.mojom";
import "mojo/common/values.mojom";
-struct AttachedImage {
- string type;
- array<uint8> data;
-};
-
interface MediaParser {
+ // Extract metadata from a |mime_type| blob of data of |total_size| and
+ // available from the browser process via |media_data_source|. If there
+ // are images referred to in the metadata, and |get_attached_images| is
+ // true, return the images in |attached_images|.
ParseMediaMetadata(string mime_type,
int64 total_size,
- bool get_attached_images)
+ bool get_attached_images,
+ MediaDataSource media_data_source)
=> (bool parse_success,
mojo.common.mojom.DictionaryValue metadata,
array<AttachedImage> attached_images);
@@ -33,3 +33,17 @@ interface MediaParser {
mojo.common.mojom.File file)
=> (bool success);
};
+
+interface MediaDataSource {
+ // ParseMediaMetadata interface used to read blob data for parsing from
+ // the browser process.
+ ReadBlob(int64 request_id, int64 position, int64 length)
Sam McNally 2017/02/03 22:14:16 Remove |request_id|.
Noel Gordon 2017/02/05 23:45:03 Indeed, done.
+ => (int64 request_id, array<uint8> data);
+};
+
+struct AttachedImage {
+ // If ParseMediaMetadata returns attached images, each of the images is
+ // returned in an AttachedImage object.
+ string type;
+ array<uint8> data;
+};

Powered by Google App Engine
This is Rietveld 408576698