diff options
Diffstat (limited to 'ui/message_center/message_center.h')
-rw-r--r-- | ui/message_center/message_center.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ui/message_center/message_center.h b/ui/message_center/message_center.h index 7cc49da..a78c151 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); |