| Index: ui/message_center/notification_view.h
|
| diff --git a/ui/message_center/notification_view.h b/ui/message_center/notification_view.h
|
| index 144893198adbcfc7d95b0495f1dabb7f0befcaf0..88d49073231cf8cc622ce2905e50fae73f83bda8 100644
|
| --- a/ui/message_center/notification_view.h
|
| +++ b/ui/message_center/notification_view.h
|
| @@ -5,40 +5,49 @@
|
| #ifndef UI_MESSAGE_CENTER_NOTIFICATION_VIEW_H_
|
| #define UI_MESSAGE_CENTER_NOTIFICATION_VIEW_H_
|
|
|
| +#include <vector>
|
| +
|
| #include "ui/message_center/message_view.h"
|
| -#include "ui/message_center/notification_list.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);
|
|
|