OLD | NEW |
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_VIEWS_NOTIFICATION_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ui/message_center/views/message_view.h" | 10 #include "ui/message_center/views/message_view.h" |
11 | 11 |
12 namespace views { | |
13 class Label; | |
14 } // namespace views | |
15 | |
16 namespace message_center { | 12 namespace message_center { |
17 | 13 |
| 14 class BoundedLabel; |
18 class NotificationChangeObserver; | 15 class NotificationChangeObserver; |
19 | 16 |
20 // View that displays all current types of notification (web, basic, image, and | 17 // View that displays all current types of notification (web, basic, image, and |
21 // list). Future notification types may be handled by other classes, in which | 18 // list). Future notification types may be handled by other classes, in which |
22 // case instances of those classes would be returned by the Create() factory | 19 // case instances of those classes would be returned by the Create() factory |
23 // method below. | 20 // method below. |
24 class NotificationView : public MessageView { | 21 class NotificationView : public MessageView { |
25 public: | 22 public: |
26 // Creates appropriate MessageViews for notifications. Those currently are | 23 // Creates appropriate MessageViews for notifications. Those currently are |
27 // always NotificationView or MessageSimpleView instances but in the future | 24 // always NotificationView or MessageSimpleView instances but in the future |
(...skipping 15 matching lines...) Expand all Loading... |
43 const ui::Event& event) OVERRIDE; | 40 const ui::Event& event) OVERRIDE; |
44 | 41 |
45 private: | 42 private: |
46 NotificationView(const Notification& notification, | 43 NotificationView(const Notification& notification, |
47 NotificationChangeObserver* observer, | 44 NotificationChangeObserver* observer, |
48 bool expanded); | 45 bool expanded); |
49 | 46 |
50 // Weak references to NotificationView descendants owned by their parents. | 47 // Weak references to NotificationView descendants owned by their parents. |
51 views::View* background_view_; | 48 views::View* background_view_; |
52 views::View* top_view_; | 49 views::View* top_view_; |
53 views::Label* title_view_; | 50 BoundedLabel* title_view_; |
54 views::Label* message_view_; | 51 BoundedLabel* message_view_; |
55 std::vector<views::View*> item_views_; | 52 std::vector<views::View*> item_views_; |
56 views::View* icon_view_; | 53 views::View* icon_view_; |
57 views::View* bottom_view_; | 54 views::View* bottom_view_; |
58 views::View* image_view_; | 55 views::View* image_view_; |
59 std::vector<views::View*> action_buttons_; | 56 std::vector<views::View*> action_buttons_; |
60 | 57 |
61 DISALLOW_COPY_AND_ASSIGN(NotificationView); | 58 DISALLOW_COPY_AND_ASSIGN(NotificationView); |
62 }; | 59 }; |
63 | 60 |
64 } // namespace message_center | 61 } // namespace message_center |
65 | 62 |
66 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ | 63 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_VIEW_H_ |
OLD | NEW |