Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(880)

Unified Diff: ui/message_center/views/notification_view.h

Issue 12326091: Made notification center notifications collapsed and expandable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, rebase, and rebase again! Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/views/message_view.cc ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ui/message_center/views/message_view.cc ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698