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

Side by Side Diff: chrome/common/extensions/media_parser.mojom

Issue 2639503002: Convert utility process CheckMediaFile IPC to mojo (Closed)
Patch Set: Removed unused #include files, add TODO. Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 // Media parsing interface provided by the utility process and exposed by 5 // Media parsing interface provided by the utility process and exposed by
6 // mojo policy control to the chrome browser process. 6 // mojo policy control to the chrome browser process.
7 7
8 module extensions.mojom; 8 module extensions.mojom;
9 9
10 import "mojo/common/file.mojom";
11 import "mojo/common/time.mojom";
10 import "mojo/common/values.mojom"; 12 import "mojo/common/values.mojom";
11 13
12 struct AttachedImage { 14 struct AttachedImage {
13 string type; 15 string type;
14 array<uint8> data; 16 array<uint8> data;
15 }; 17 };
16 18
17 interface MediaParser { 19 interface MediaParser {
18 ParseMediaMetadata(string mime_type, 20 ParseMediaMetadata(string mime_type,
19 int64 total_size, 21 int64 total_size,
20 bool get_attached_images) 22 bool get_attached_images)
21 => (bool parse_success, 23 => (bool parse_success,
22 mojo.common.mojom.DictionaryValue metadata, 24 mojo.common.mojom.DictionaryValue metadata,
23 array<AttachedImage> attached_images); 25 array<AttachedImage> attached_images);
26
27 // Validate the passed media file with sanity checks, and file decoding
28 // for at most |decode_time| wall clock time. Returns |success| true if
29 // |file| appears to be a well-formed media file, false otherwise.
30 // Note: it is still not safe to decode the file in the browser process
31 // after this check.
32 CheckMediaFile(mojo.common.mojom.TimeDelta decode_time,
33 mojo.common.mojom.File file)
34 => (bool success);
24 }; 35 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/chrome_utility_extensions_messages.h ('k') | chrome/utility/extensions/extensions_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698