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

Side by Side Diff: ui/message_center/notification_view.h

Issue 11926032: Updated the look of web and basic notifications to match latest mockups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/message_center/message_view_factory.cc ('k') | ui/message_center/notification_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_NOTIFICATION_VIEW_H_
6 #define UI_MESSAGE_CENTER_NOTIFICATION_VIEW_H_ 6 #define UI_MESSAGE_CENTER_NOTIFICATION_VIEW_H_
7 7
8 #include "ui/message_center/message_view.h" 8 #include "ui/message_center/message_view.h"
9 #include "ui/message_center/notification_list.h" 9 #include "ui/message_center/notification_list.h"
10 10
11 namespace message_center { 11 namespace message_center {
12 12
13 // View that displays image and list notifications, and in the future will 13 // View that displays all current types of notification (web, basic, image, and
14 // display all types of notification (web/simple, basic/base, image, and 14 // list). Future notification types may be handled by other classes, in which
15 // list/multiple-item/inbox/digest). 15 // case instances of those classes would be returned by the
16 // ViewForNotification() factory method below.
16 class NotificationView : public MessageView { 17 class NotificationView : public MessageView {
17 public: 18 public:
19 // Creates appropriate MessageViews for notifications. Those currently are
20 // always NotificationView instances but in the future may be instances of
21 // other classes, with the class depending on the notification type.
22 static MessageView* ViewForNotification(
23 const NotificationList::Notification& notification,
24 NotificationList::Delegate* list_delegate);
25
18 NotificationView(NotificationList::Delegate* list_delegate, 26 NotificationView(NotificationList::Delegate* list_delegate,
19 const NotificationList::Notification& notification); 27 const NotificationList::Notification& notification);
20 virtual ~NotificationView(); 28 virtual ~NotificationView();
21 29
22 // Overridden from View. 30 // Overridden from View.
23 virtual void Layout() OVERRIDE; 31 virtual void Layout() OVERRIDE;
24 virtual gfx::Size GetPreferredSize() OVERRIDE; 32 virtual gfx::Size GetPreferredSize() OVERRIDE;
25 33
26 // Overridden from MessageView. 34 // Overridden from MessageView.
27 virtual void SetUpView() OVERRIDE; 35 virtual void SetUpView() OVERRIDE;
28 virtual void ButtonPressed(views::Button* sender, 36 virtual void ButtonPressed(views::Button* sender,
29 const ui::Event& event) OVERRIDE; 37 const ui::Event& event) OVERRIDE;
30 38
31 private: 39 private:
32 views::View* MakeContentView(); 40 views::View* MakeContentView();
33 41
34 views::View* content_view_; 42 views::View* content_view_;
35 std::vector<views::Button*> action_buttons_; 43 std::vector<views::Button*> action_buttons_;
36 44
37 DISALLOW_COPY_AND_ASSIGN(NotificationView); 45 DISALLOW_COPY_AND_ASSIGN(NotificationView);
38 }; 46 };
39 47
40 } // namespace message_center 48 } // namespace message_center
41 49
42 #endif // UI_MESSAGE_CENTER_NOTIFICATION_VIEW_H_ 50 #endif // UI_MESSAGE_CENTER_NOTIFICATION_VIEW_H_
OLDNEW
« no previous file with comments | « ui/message_center/message_view_factory.cc ('k') | ui/message_center/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698