Index: ui/message_center/views/notification_view.h |
diff --git a/ui/message_center/views/notification_view.h b/ui/message_center/views/notification_view.h |
index dee7e986e68ae2de578cbe34a7a2e43232d6cbd4..a0b23e9c73a9dddaddf8ad61d0e1da55c194100b 100644 |
--- a/ui/message_center/views/notification_view.h |
+++ b/ui/message_center/views/notification_view.h |
@@ -5,40 +5,49 @@ |
#ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ |
#define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ |
-#include "ui/message_center/notification_list.h" |
+#include <vector> |
+ |
#include "ui/message_center/views/message_view.h" |
namespace message_center { |
+class NotificationChangeObserver; |
+ |
// View that displays all current types of notification (web, basic, image, and |
// list). Future notification types may be handled by other classes, in which |
-// case instances of those classes would be returned by the |
-// ViewForNotification() factory method below. |
+// case instances of those classes would be returned by the Create() factory |
+// method below. |
class NotificationView : public MessageView { |
public: |
// Creates appropriate MessageViews for notifications. Those currently are |
- // always NotificationView instances but in the future may be instances of |
- // other classes, with the class depending on the notification type. |
+ // always NotificationView or MessageSimpleView instances but in the future |
+ // may be instances of other classes, with the class depending on the |
+ // notification type. |
static MessageView* Create(const Notification& notification, |
- NotificationList::Delegate* list_delegate); |
+ NotificationChangeObserver* observer, |
+ bool expanded); |
virtual ~NotificationView(); |
- // Overridden from View. |
+ // Overridden from views::View: |
virtual void Layout() OVERRIDE; |
virtual gfx::Size GetPreferredSize() OVERRIDE; |
- // Overridden from MessageView. |
+ // Overridden from MessageView: |
+ virtual void Update(const Notification& notification) OVERRIDE; |
virtual void ButtonPressed(views::Button* sender, |
const ui::Event& event) OVERRIDE; |
private: |
- NotificationView(NotificationList::Delegate* list_delegate, |
- const Notification& notification); |
+ NotificationView(const Notification& notification, |
+ NotificationChangeObserver* observer, |
+ bool expanded); |
- views::View* MakeContentView(const Notification& notification); |
+ void AddChildViews(const Notification& notification); |
+ void AddContentView(const Notification& notification); |
views::View* content_view_; |
+ views::ImageView* icon_view_; |
std::vector<views::Button*> action_buttons_; |
DISALLOW_COPY_AND_ASSIGN(NotificationView); |