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 // TODO(estade): this should be [instanceOf=Blob]. |
| 21 object mediaFileContents; |
| 22 |
| 23 // TODO(estade): this should be [instanceOf=Metafile]. |
| 24 object metadata; |
| 25 }; |
| 26 |
| 27 // TODO(estade): the type of the argument should be LocalFileSystem[]. |
| 28 callback MediaFileSystemsCallback = void (object mediaFileSystems); |
| 29 callback AssembleMediaFileCallback = |
| 30 void ([instanceOf=Blob] optional object mediaFile); |
| 31 |
| 32 interface Functions { |
| 33 // Get the media galleries configured in this user agent. If none are |
| 34 // configured or available, the callback will receive an empty array. |
| 35 static void getMediaFileSystems(optional MediaFileSystemsDetails details, |
| 36 MediaFileSystemsCallback callback); |
| 37 |
| 38 // Create a new MediaFile setting the metadata in the Blob to the supplied |
| 39 // values, overriding any existing metadata in the media file. If user agent |
| 40 // does not recognize the Blob as a supported file format, it will fail. |
| 41 static void assembleMediaFile(AssembleMediaFileDetails details, |
| 42 AssembleMediaFileCallback callback); |
| 43 |
| 44 // Get any thumbnails contained in the passed media file. The resulting |
| 45 // directory reader refers to a virtual directory that can not be navigated |
| 46 // to. If there are no thumbnails in the passed file entry, the virtual |
| 47 // directory will have no entries. |
| 48 // TODO(estade): The return type should be Directory. The argument type |
| 49 // should be [instanceOf=FileEntry]. |
| 50 [nocompile] static object extractEmbeddedThumbnails(object mediaFile); |
| 51 }; |
| 52 |
| 53 }; |
OLD | NEW |