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

Unified Diff: chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h

Issue 11535008: Implement mediaGalleriesPrivate api to notify extensions about gallery changed events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 8 years 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/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h
index 39f014b92e6f2b743954410ef45cf113b693fe7e..999eaa394ed8a8c03a9a47d3243d551aafddfe37 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h
@@ -4,21 +4,26 @@
// Manages events for the private Chrome extensions media galleries API. This
// is temporary and will be moved to a permanent, public place in the near
-// future.
+// future. This class object lives on the UI thread.
#ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PRIVATE_EVENT_ROUTER_H_
#define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PRIVATE_EVENT_ROUTER_H_
+#include <set>
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/system_monitor/system_monitor.h"
-#include "base/values.h"
+class FilePath;
class Profile;
+namespace base {
+class ListValue;
+}
+
namespace extensions {
class MediaGalleriesPrivateEventRouter
@@ -27,6 +32,10 @@ class MediaGalleriesPrivateEventRouter
explicit MediaGalleriesPrivateEventRouter(Profile* profile);
virtual ~MediaGalleriesPrivateEventRouter();
+ // Gallery changed event handler.
+ void OnGalleryChanged(const std::string& gallery_id,
+ const std::set<std::string>& extension_ids);
+
private:
// base::SystemMonitor::DevicesChangedObserver implementation.
virtual void OnRemovableStorageAttached(
@@ -38,6 +47,7 @@ class MediaGalleriesPrivateEventRouter
void DispatchEvent(const std::string& event_name,
scoped_ptr<base::ListValue> event_args);
+ // Current profile.
Profile* profile_;
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPrivateEventRouter);

Powered by Google App Engine
This is Rietveld 408576698