diff options
Diffstat (limited to 'ui/message_center/views/message_center_view.h')
-rw-r--r-- | ui/message_center/views/message_center_view.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ui/message_center/views/message_center_view.h b/ui/message_center/views/message_center_view.h index e2c7da7..a512c63 100644 --- a/ui/message_center/views/message_center_view.h +++ b/ui/message_center/views/message_center_view.h @@ -8,7 +8,6 @@ #include "ui/views/view.h" #include "ui/message_center/message_center_export.h" -#include "ui/message_center/message_center_observer.h" #include "ui/message_center/notification_list.h" namespace views { @@ -48,8 +47,7 @@ class MessageCenterButtonBar : public views::View { // MessageCenterView /////////////////////////////////////////////////////////// -class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, - public MessageCenterObserver { +class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View { public: MessageCenterView(MessageCenter* message_center, int max_height); virtual ~MessageCenterView(); @@ -63,20 +61,14 @@ class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, virtual void Layout() OVERRIDE; virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; - // Overridden from MessageCenterObserver: - virtual void OnNotificationAdded(const std::string& id) OVERRIDE; - virtual void OnNotificationRemoved(const std::string& id, - bool by_user) OVERRIDE; - virtual void OnNotificationUpdated(const std::string& id) OVERRIDE; - private: friend class MessageCenterViewTest; - void AddNotificationAt(const Notification& notification, int index); - void NotificationsChanged(); + void RemoveAllNotifications(); + void AddNotification(const Notification& notification); MessageCenter* message_center_; // Weak reference. - std::vector<MessageView*> message_views_; + std::map<std::string,MessageView*> message_views_; views::ScrollView* scroller_; views::View* message_list_view_; MessageCenterButtonBar* button_bar_; |