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

Unified Diff: ui/message_center/message_center.h

Issue 12375004: Re-home the global MessageCenter to support Ash+Win environments. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge master. Created 7 years, 10 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 | « chrome/test/base/view_event_test_base.cc ('k') | ui/message_center/message_center.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/message_center.h
diff --git a/ui/message_center/message_center.h b/ui/message_center/message_center.h
index 7cc49daa96344396bfcc59e742d36e94dcb0d252..a78c151e5dd16766599473d684a517f9360bbf24 100644
--- a/ui/message_center/message_center.h
+++ b/ui/message_center/message_center.h
@@ -30,6 +30,15 @@ namespace message_center {
class MESSAGE_CENTER_EXPORT MessageCenter : public NotificationList::Delegate {
public:
+ // Creates the global message center object.
+ static void Initialize();
+
+ // Returns the global message center object. Initialize must be called first.
+ static MessageCenter* Get();
+
+ // Destroys the global message_center object.
+ static void Shutdown();
+
// Class that hosts the message center.
class MESSAGE_CENTER_EXPORT Observer {
public:
@@ -78,9 +87,6 @@ class MESSAGE_CENTER_EXPORT MessageCenter : public NotificationList::Delegate {
virtual ~Delegate() {}
};
- MessageCenter();
- virtual ~MessageCenter();
-
// Called to set the delegate. Generally called only once, except in tests.
// Changing the delegate does not affect notifications in its
// NotificationList.
@@ -153,6 +159,10 @@ class MESSAGE_CENTER_EXPORT MessageCenter : public NotificationList::Delegate {
OVERRIDE;
virtual NotificationList* GetNotificationList() OVERRIDE;
+ protected:
+ MessageCenter();
+ virtual ~MessageCenter();
+
private:
// Calls OnMessageCenterChanged on each observer.
void NotifyMessageCenterChanged(bool new_notification);
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | ui/message_center/message_center.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698