Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / media_galleries.idl
index e58e4b1..02d21d1 100644 (file)
@@ -6,6 +6,14 @@
 // images, video) from the user's local disks (with the user's consent).
 namespace mediaGalleries {
 
+  [inline_doc] enum GalleryChangeType {
+    // The contents of the gallery have changed.
+    contents_changed,
+    // The watch has been dropped because the device has been detached,
+    // the gallery permission has been removed, or any other reason.
+    watch_dropped
+  };
+
   [inline_doc] enum GetMediaFileSystemsInteractivity {
     // Do not act interactively.
     no,
@@ -36,6 +44,14 @@ namespace mediaGalleries {
     // The scan encountered an error and could not proceed.
     error
   };
+  
+  [inline_doc] dictionary GalleryChangeDetails {
+    // Type of change event.
+    GalleryChangeType type;
+    
+    // Identifies the modified gallery.
+    DOMString galleryId;
+  };
 
   [inline_doc] dictionary MediaFileSystemsDetails {
     // Whether to prompt the user for permission to additional media galleries
@@ -152,7 +168,7 @@ namespace mediaGalleries {
 
     // The images embedded in the media file's metadata. This is most often
     // used for album art or video thumbnails.
-    [instanceof=Blob] object[] attachedImages;
+    [instanceOf=Blob] object[] attachedImages;
   };
 
   callback MediaMetadataCallback = void (MediaMetadata metadata);
@@ -207,6 +223,9 @@ namespace mediaGalleries {
   };
 
   interface Events {
+    // Fired when a media gallery is changed or a gallery watch is dropped.
+    static void onGalleryChanged(GalleryChangeDetails details);
+
     // The pending media scan has changed state. See details for more
     // information.
     static void onScanProgress(ScanProgressDetails details);