Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / media_galleries.idl
index ce645e8..0955f09 100644 (file)
@@ -57,6 +57,8 @@ namespace mediaGalleries {
       void ([instanceOf=DOMFileSystem] object[] mediaFileSystems,
             DOMString selectedFileSystemName);
 
+  callback DropPermissionForMediaFileSystemCallback = void ();
+
   [inline_doc] dictionary MediaFileSystemMetadata {
     // The name of the file system.
     DOMString name;
@@ -96,6 +98,14 @@ namespace mediaGalleries {
   callback MediaFileSystemsMetadataCallback =
       void (MediaFileSystemMetadata[] metadata);
 
+  dictionary StreamInfo {
+    // Describes format of container or codec of stream, i.e. "mp3", "h264".
+    DOMString type;
+    
+    // An unfiltered string->string dictionary of tags for the stream.
+    object tags;
+  };
+
   dictionary MediaMetadata {
     // The browser sniffed mime type.
     DOMString mimeType;
@@ -104,13 +114,26 @@ namespace mediaGalleries {
     long? height;
     long? width;
 
+    // Defined for images only.
+    double? xResolution;
+    double? yResolution;
+
     // Defined for audio and video. In seconds.
     double? duration;
     
     // Defined for images and video. In degrees.
     long? rotation;
 
-    // Generic metadata tags.
+    // Defined for images only.
+    DOMString? cameraMake;
+    DOMString? cameraModel;
+    double? exposureTimeSeconds;
+    boolean? flashFired;
+    double? fNumber;
+    double? focalLengthMm;
+    double? isoEquivalent;
+
+    // Defined for audio and video only.
     DOMString? album;
     DOMString? artist;
     DOMString? comment;
@@ -120,6 +143,10 @@ namespace mediaGalleries {
     DOMString? language;
     DOMString? title;
     long? track;
+
+    // All the metadata in the media file. For formats with multiple streams,
+    // stream order will be preserved. Container metadata is the first element.
+    StreamInfo[] rawTags;
   };
 
   callback MediaMetadataCallback = void (MediaMetadata metadata);
@@ -137,6 +164,11 @@ namespace mediaGalleries {
     // gesture, the callback will run as though the user canceled.
     static void addUserSelectedFolder(AddUserFolderCallback callback);
 
+    // Give up access to a given media gallery.
+    static void dropPermissionForMediaFileSystem(
+        DOMString galleryId,
+        optional DropPermissionForMediaFileSystemCallback callback);
+
     // Start a scan of the user's hard disks for directories containing media.
     // The scan may take a long time so progress and completion is communicated
     // by events. No permission is granted as a result of the scan, see