OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // File-level comment to appease parser. Eventually this will not be necessary. | |
6 | |
7 namespace experimental.mediaGalleries { | |
8 | |
9 enum GetMediaFileSystemsInteractivity { | |
10 silent, prompt, prompt_if_needed | |
11 }; | |
12 | |
13 [inline_doc] dictionary MediaFileSystemsDetails { | |
14 // Whether to prompt the user for additional media galleries before | |
15 // returning the permitted set. Default is silent. | |
16 GetMediaFileSystemsInteractivity? interactivity; | |
17 }; | |
18 | |
19 dictionary AssembleMediaFileDetails { | |
20 [instanceOf=Blob] object mediaFileContents; | |
21 | |
22 // TODO(estade): this should be [instanceOf=Metafile]. | |
23 object metadata; | |
24 }; | |
25 | |
26 callback MediaFileSystemsCallback = | |
27 void ([instanceOf=LocalFileSystem] optional object[] mediaFileSystems); | |
Evan Stade
2012/07/20 19:48:13
Antony, does this look correct? it seems to work.
asargent_no_longer_on_chrome
2012/07/20 19:55:07
Yep, that looks correct.
| |
28 callback AssembleMediaFileCallback = | |
29 void ([instanceOf=Blob] optional object mediaFile); | |
30 | |
31 interface Functions { | |
32 // Get the media galleries configured in this user agent. If none are | |
33 // configured or available, the callback will receive an empty array. | |
34 static void getMediaFileSystems(optional MediaFileSystemsDetails details, | |
35 MediaFileSystemsCallback callback); | |
36 | |
37 // Create a new MediaFile setting the metadata in the Blob to the supplied | |
38 // values, overriding any existing metadata in the media file. If user agent | |
39 // does not recognize the Blob as a supported file format, it will fail. | |
40 static void assembleMediaFile(AssembleMediaFileDetails details, | |
41 AssembleMediaFileCallback callback); | |
42 | |
43 // Get any thumbnails contained in the passed media file. The resulting | |
44 // directory reader refers to a virtual directory that can not be navigated | |
45 // to. If there are no thumbnails in the passed file entry, the virtual | |
46 // directory will have no entries. | |
47 // TODO(estade): The return type should be Directory. The argument type | |
48 // should be [instanceOf=FileEntry]. | |
49 [nocompile] static object extractEmbeddedThumbnails(object mediaFile); | |
50 }; | |
51 | |
52 }; | |
OLD | NEW |