Index: ui/message_center/message_center.h |
diff --git a/ui/message_center/message_center.h b/ui/message_center/message_center.h |
index bde776743ed614bce36afb0a8bf41d9a68fa050a..672123fd08e91e0e861b37b7eacb9368086e2d4b 100644 |
--- a/ui/message_center/message_center.h |
+++ b/ui/message_center/message_center.h |
@@ -10,6 +10,8 @@ |
#include "ui/message_center/notification_list.h" |
#include "ui/notifications/notification_types.h" |
+template <typename T> struct DefaultSingletonTraits; |
+ |
namespace base { |
class DictionaryValue; |
} |
@@ -70,11 +72,13 @@ class MESSAGE_CENTER_EXPORT MessageCenter : public NotificationList::Delegate { |
virtual ~Delegate() {} |
}; |
- // |host| is expected to manage any notification bubbles. It may be NULL. |
- explicit MessageCenter(Host* host); |
+ static MessageCenter* GetInstance(); |
virtual ~MessageCenter(); |
+ // Called once to set the host, which is expected to manage any notification |
+ // bubbles. |host| can be NULL. |
stevenjb
2012/12/27 19:49:34
I would remove the '|host| can be NULL' part of th
dewittj
2012/12/27 23:38:50
Done.
|
+ void SetHost(Host* host); |
// Called once to set the delegate. |
void SetDelegate(Delegate* delegate); |
@@ -133,6 +137,9 @@ class MESSAGE_CENTER_EXPORT MessageCenter : public NotificationList::Delegate { |
virtual NotificationList* GetNotificationList() OVERRIDE; |
private: |
+ MessageCenter(); |
+ friend struct DefaultSingletonTraits<MessageCenter>; |
+ |
scoped_ptr<NotificationList> notification_list_; |
Host* host_; |
Delegate* delegate_; |