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

Unified Diff: chrome/browser/extensions/api/media_galleries/media_galleries_api.h

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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries/media_galleries_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/media_galleries/media_galleries_api.h
diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.h b/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
index 7e1208c3350f4a669aa4791d3c40d3160ba20d08..ede3dd7825b5545e716ab56b9f7516bb00b88dca 100644
--- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
+++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.h
@@ -298,6 +298,65 @@ class MediaGalleriesGetMetadataFunction : public ChromeAsyncExtensionFunction {
scoped_ptr<content::BlobHandle> current_blob);
};
+class MediaGalleriesAddGalleryWatchFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("mediaGalleries.addGalleryWatch",
+ MEDIAGALLERIES_ADDGALLERYWATCH);
+
+ protected:
+ virtual ~MediaGalleriesAddGalleryWatchFunction();
+ virtual bool RunAsync() OVERRIDE;
+
+ private:
+ void OnPreferencesInit(const std::string& pref_id);
+
+ // Gallery watch request handler.
+ void HandleResponse(MediaGalleryPrefId gallery_id, const std::string& error);
+};
+
+class MediaGalleriesRemoveGalleryWatchFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("mediaGalleries.removeGalleryWatch",
+ MEDIAGALLERIES_REMOVEGALLERYWATCH);
+
+ protected:
+ virtual ~MediaGalleriesRemoveGalleryWatchFunction();
+ virtual bool RunAsync() OVERRIDE;
+
+ private:
+ void OnPreferencesInit(const std::string& pref_id);
+};
+
+class MediaGalleriesGetAllGalleryWatchFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("mediaGalleries.getAllGalleryWatch",
+ MEDIAGALLERIES_GETALLGALLERYWATCH);
+
+ protected:
+ virtual ~MediaGalleriesGetAllGalleryWatchFunction();
+ virtual bool RunAsync() OVERRIDE;
+
+ private:
+ void OnPreferencesInit();
+};
+
+class MediaGalleriesRemoveAllGalleryWatchFunction
+ : public ChromeAsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("mediaGalleries.removeAllGalleryWatch",
+ MEDIAGALLERIES_REMOVEALLGALLERYWATCH);
+
+ protected:
+ virtual ~MediaGalleriesRemoveAllGalleryWatchFunction();
+ virtual bool RunAsync() OVERRIDE;
+
+ private:
+ void OnPreferencesInit();
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_MEDIA_GALLERIES_API_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries/media_galleries_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698