| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // An experimental API that expands upon the <code>chrome.mediaGalleries</code> |
| 6 // API's functionality. |
| 5 namespace experimental.mediaGalleries { | 7 namespace experimental.mediaGalleries { |
| 6 | 8 |
| 7 callback AssembleMediaFileCallback = | 9 callback AssembleMediaFileCallback = |
| 8 void ([instanceOf=Blob] optional object mediaFile); | 10 void ([instanceOf=Blob] optional object mediaFile); |
| 9 | 11 |
| 10 interface Functions { | 12 interface Functions { |
| 11 // Create a new MediaFile setting the metadata in the Blob to the supplied | 13 // Create a new MediaFile setting the metadata in the Blob to the supplied |
| 12 // values, overriding any existing metadata in the media file. If user agent | 14 // values, overriding any existing metadata in the media file. If user agent |
| 13 // does not recognize the Blob as a supported file format, it will fail. | 15 // does not recognize the Blob as a supported file format, it will fail. |
| 14 // |mediaFileContents| : the media bytes. | 16 // |mediaFileContents| : the media bytes. |
| 15 // |metadata| : the metadata. TODO(estade): this should be | 17 // |metadata| : the metadata. TODO(estade): this should be |
| 16 // [instanceOf=Metafile]. | 18 // [instanceOf=Metafile]. |
| 17 static void assembleMediaFile( | 19 static void assembleMediaFile( |
| 18 [instanceOf=Blob] object mediaFileContents, | 20 [instanceOf=Blob] object mediaFileContents, |
| 19 object metadata, | 21 object metadata, |
| 20 AssembleMediaFileCallback callback); | 22 AssembleMediaFileCallback callback); |
| 21 | 23 |
| 22 // Get any thumbnails contained in the passed media file. The resulting | 24 // Get any thumbnails contained in the passed media file. The resulting |
| 23 // directory reader refers to a virtual directory that can not be navigated | 25 // directory reader refers to a virtual directory that can not be navigated |
| 24 // to. If there are no thumbnails in the passed file entry, the virtual | 26 // to. If there are no thumbnails in the passed file entry, the virtual |
| 25 // directory will have no entries. | 27 // directory will have no entries. |
| 26 // TODO(estade): The return type should be Directory. The argument type | 28 // TODO(estade): The return type should be Directory. The argument type |
| 27 // should be [instanceOf=FileEntry]. | 29 // should be [instanceOf=FileEntry]. |
| 28 [nocompile] static object extractEmbeddedThumbnails(object mediaFile); | 30 [nocompile] static object extractEmbeddedThumbnails(object mediaFile); |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 }; | 33 }; |
| OLD | NEW |