Chromium Code Reviews| 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; |
| +}; |