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

Unified Diff: chrome/common/extensions/api/media_galleries.idl

Issue 440813002: Expose gallery watching functionality to the public mediaGalleries API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix race condition in the apitest. Created 6 years, 4 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
Index: chrome/common/extensions/api/media_galleries.idl
diff --git a/chrome/common/extensions/api/media_galleries.idl b/chrome/common/extensions/api/media_galleries.idl
index 02d21d1d741f931891c98fb61720722e4a397f66..959267367a2649b174c7b708dce771fbfff96a79 100644
--- a/chrome/common/extensions/api/media_galleries.idl
+++ b/chrome/common/extensions/api/media_galleries.idl
@@ -173,6 +173,15 @@ namespace mediaGalleries {
callback MediaMetadataCallback = void (MediaMetadata metadata);
+ // A dictionary that describes the add gallery watch request results.
+ dictionary AddGalleryWatchResult {
+ DOMString galleryId;
+ boolean success;
+ };
+
+ callback AddGalleryWatchCallback = void (AddGalleryWatchResult result);
+ callback GetAllGalleryWatchCallback = void (DOMString[] galleryIds);
+
interface Functions {
// Get the media galleries configured in this user agent. If none are
// configured or available, the callback will receive an empty array.
@@ -220,6 +229,20 @@ namespace mediaGalleries {
static void getMetadata([instanceOf=Blob] object mediaFile,
optional MediaMetadataOptions options,
MediaMetadataCallback callback);
+
+ // Adds a gallery watch for the gallery with the specified gallery ID.
+ // The given callback is then fired with a success or failure result.
+ static void addGalleryWatch(DOMString galleryId,
+ AddGalleryWatchCallback callback);
+
+ // Removes a gallery watch for the gallery with the specified gallery ID.
+ static void removeGalleryWatch(DOMString galleryId);
+
+ // Notifies which galleries are being watched via the given callback.
+ static void getAllGalleryWatch(GetAllGalleryWatchCallback callback);
+
+ // Removes all gallery watches.
+ static void removeAllGalleryWatch();
};
interface Events {
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/extensions/api_test/media_galleries/gallerywatch/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698