Chromium Code Reviews| Index: chrome/common/extensions/api/experimental_media_galleries.idl |
| diff --git a/chrome/common/extensions/api/experimental_media_galleries.idl b/chrome/common/extensions/api/experimental_media_galleries.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ae42828bc94c6b08b75b65c5cd872089906e73c4 |
| --- /dev/null |
| +++ b/chrome/common/extensions/api/experimental_media_galleries.idl |
| @@ -0,0 +1,53 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// File-level comment to appease parser. Eventually this will not be necessary. |
| + |
| +namespace experimental.mediaGalleries { |
| + |
| + enum GetMediaFileSystemsInteractivity { |
| + silent, prompt, prompt_if_needed |
| + }; |
| + |
| + [inline_doc] dictionary MediaFileSystemsDetails { |
| + // Whether to prompt the user for additional media galleries before |
| + // returning the permitted set. Default is silent. |
| + GetMediaFileSystemsInteractivity? interactivity; |
| + }; |
| + |
| + dictionary AssembleMediaFileDetails { |
| + // TODO(estade): this should be [instanceOf=Blob]. |
| + object mediaFileContents; |
| + |
| + // TODO(estade): this should be [instanceOf=Metafile]. |
| + object metadata; |
| + }; |
| + |
| + // TODO(estade): the type of the argument should be LocalFileSystem[]. |
|
vandebo (ex-Chrome)
2012/07/19 19:58:31
Do you want to include bug numbers here?
Evan Stade
2012/07/19 20:55:28
are there bug numbers for this? I'm not even sure
vandebo (ex-Chrome)
2012/07/19 22:45:22
Sorry, not sure. I initially assumed it was the s
Evan Stade
2012/07/19 23:06:33
no, i believe that bug's resolved because instance
|
| + callback MediaFileSystemsCallback = void (object mediaFileSystems); |
|
vandebo (ex-Chrome)
2012/07/19 19:58:31
mediaFileSystems => arrayOfMediaFileSystems ?
Evan Stade
2012/07/19 20:55:28
the type tells you "arrayOf", and the trailing "s"
vandebo (ex-Chrome)
2012/07/19 22:45:22
What do you mean "the type" tells you...? Not sur
Evan Stade
2012/07/19 23:06:33
By "the type" I mean once the TODO is fixed, there
vandebo (ex-Chrome)
2012/07/20 18:30:26
I see... Is there something hard about fixing this
Evan Stade
2012/07/20 19:48:12
yes, the hard thing is figuring out the syntax. Af
|
| + callback AssembleMediaFileCallback = |
| + void ([instanceOf=Blob] optional object mediaFile); |
| + |
| + interface Functions { |
| + // Get the media galleries configured in this user agent. If none are |
| + // configured or available, the callback will receive an empty array. |
| + static void getMediaFileSystems(optional MediaFileSystemsDetails details, |
|
vandebo (ex-Chrome)
2012/07/19 19:58:31
Does this mean that the interactivity argument is
Evan Stade
2012/07/19 20:55:28
yes, it is optional, as I think it should be. Opti
vandebo (ex-Chrome)
2012/07/19 22:45:22
Optional args not at the end of the arg list weird
|
| + MediaFileSystemsCallback callback); |
| + |
| + // Create a new MediaFile setting the metadata in the Blob to the supplied |
| + // values, overriding any existing metadata in the media file. If user agent |
| + // does not recognize the Blob as a supported file format, it will fail. |
| + static void assembleMediaFile(AssembleMediaFileDetails details, |
| + AssembleMediaFileCallback callback); |
| + |
| + // Get any thumbnails contained in the passed media file. The resulting |
| + // directory reader refers to a virtual directory that can not be navigated |
| + // to. If there are no thumbnails in the passed file entry, the virtual |
| + // directory will have no entries. |
| + // TODO(estade): The return type should be Directory. The argument type |
| + // should be [instanceOf=FileEntry]. |
|
Evan Stade
2012/07/19 20:55:28
the reason I didn't include this instanceOf is not
vandebo (ex-Chrome)
2012/07/19 22:45:22
Does it work properly? I had locally set up the t
Evan Stade
2012/07/19 23:06:33
yes, I had this and other types specified, but the
vandebo (ex-Chrome)
2012/07/20 18:30:26
You can use WebKitBlobBuilder to create a Blob tes
Evan Stade
2012/07/20 19:48:12
Done.
|
| + [nocompile] static object extractEmbeddedThumbnails(object mediaFile); |
|
vandebo (ex-Chrome)
2012/07/19 19:58:31
Does nocompile mean that it's currently not implem
asargent_no_longer_on_chrome
2012/07/19 20:40:12
nocompile means we don't autogenerate C++ code for
Evan Stade
2012/07/19 20:55:28
what Antony said, but as you know it's not impleme
|
| + }; |
| + |
| +}; |