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

Unified Diff: chrome/common/extensions/api/experimental.mediaGalleries.json

Issue 9358076: Initial extension bindings for Media Gallery API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/common_resources.grd ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/experimental.mediaGalleries.json
diff --git a/chrome/common/extensions/api/experimental.mediaGalleries.json b/chrome/common/extensions/api/experimental.mediaGalleries.json
new file mode 100644
index 0000000000000000000000000000000000000000..77121ddfcf035dcde745efdbc74468f9c70a3b8d
--- /dev/null
+++ b/chrome/common/extensions/api/experimental.mediaGalleries.json
@@ -0,0 +1,98 @@
+[
+ {
+ "namespace": "experimental.mediaGalleries",
+ "nodoc": true,
+ "types": [
+ {
+ "id": "MediaGallery",
+ "type": "object",
+ "description": "A class representing a media gallery on the user's machines."
+ },
+ {
+ "id": "MediaFileMetadata",
+ "type": "object",
+ "description": "A class representing a metadata for a media file."
+ }
+ ],
+ "functions": [
+ {
+ "name": "getMediaGalleries",
+ "type": "function",
+ "description": "Get the media galleries configured in this user agent.",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "galleries",
+ "type": "array",
+ "items": { "$ref": "MediaGallery"}
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "openMediaGalleryManager",
+ "type": "function",
+ "description": "Open the user agent’s UI to configure galleries. Calling openMediaGalleryManager will trigger a permission prompt for any origin that has not yet been granted permission.",
+ "parameters": []
+ },
+ {
+ "name": "assembleMediaFile",
+ "type": "function",
+ "description": "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 return null in the callback.",
+ "parameters": [
+ {
+ "type": "object",
vandebo (ex-Chrome) 2012/03/23 01:03:24 This is actually the argument that's giving me tro
+ "description": "A Blob",
+ "name": "mediaFileContents"
+ },
+ {
+ "$ref": "MediaFileMetadata",
+ "name": "metadata"
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "mediaFile",
+ "choices": [
Aaron Boodman 2012/03/22 21:58:14 You can just mark the param optional - you don't n
vandebo (ex-Chrome) 2012/03/23 01:03:24 Since this is a callback, i.e. not the user's opti
+ { "type": "Blob" },
+ { "type": "null" }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "parseMediaFileMetadata",
+ "type": "function",
+ "description": "Parse the metadata in a given Blob. If the user agent does not recognize the Blob as a supported file format, it will return null in the callback.",
+ "parameters": [
+ {
+ "type": "object",
+ "description": "A Blob",
+ "name": "mediaFile"
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "metadata",
+ "choices": [
+ {"$ref": "MediaFileMetadata"},
+ { "type": "null" }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+]
« no previous file with comments | « chrome/common/common_resources.grd ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698