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..2f5b11c31ea87670ee694a017fbeee7abf50bbcd 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,28 @@ |
// 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 is created, destructed and operated 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" |
+#include "base/threading/thread_checker.h" |
+class FilePath; |
class Profile; |
+namespace base { |
+class ListValue; |
+} |
+ |
namespace extensions { |
class MediaGalleriesPrivateEventRouter |
@@ -27,6 +34,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,8 +49,12 @@ class MediaGalleriesPrivateEventRouter |
void DispatchEvent(const std::string& event_name, |
scoped_ptr<base::ListValue> event_args); |
+ // Current profile. |
Profile* profile_; |
+ // Make sure all the member functions are called on the right thread. |
+ base::ThreadChecker thread_checker_; |
+ |
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPrivateEventRouter); |
}; |