| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_MESSAGE_CENTER_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| 7 | 7 |
| 8 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
| 9 | 9 |
| 10 #include "ui/base/animation/animation_delegate.h" | 10 #include "ui/base/animation/animation_delegate.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 // MessageCenterView /////////////////////////////////////////////////////////// | 67 // MessageCenterView /////////////////////////////////////////////////////////// |
| 68 | 68 |
| 69 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, | 69 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, |
| 70 public MessageCenterObserver, | 70 public MessageCenterObserver, |
| 71 public ui::AnimationDelegate { | 71 public ui::AnimationDelegate { |
| 72 public: | 72 public: |
| 73 MessageCenterView(MessageCenter* message_center, | 73 MessageCenterView(MessageCenter* message_center, |
| 74 MessageCenterTray* tray, | 74 MessageCenterTray* tray, |
| 75 int max_height, | 75 int max_height, |
| 76 bool initially_settings_visible); | 76 bool initially_settings_visible, |
| 77 bool buttons_at_top = false); |
| 77 virtual ~MessageCenterView(); | 78 virtual ~MessageCenterView(); |
| 78 | 79 |
| 79 void SetNotifications(const NotificationList::Notifications& notifications); | 80 void SetNotifications(const NotificationList::Notifications& notifications); |
| 80 | 81 |
| 81 void ClearAllNotifications(); | 82 void ClearAllNotifications(); |
| 82 void OnAllNotificationsCleared(); | 83 void OnAllNotificationsCleared(); |
| 83 | 84 |
| 84 size_t NumMessageViewsForTest() const; | 85 size_t NumMessageViewsForTest() const; |
| 85 | 86 |
| 86 void SetSettingsVisible(bool visible); | 87 void SetSettingsVisible(bool visible); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 113 void SetNotificationViewForTest(views::View* view); | 114 void SetNotificationViewForTest(views::View* view); |
| 114 | 115 |
| 115 MessageCenter* message_center_; // Weak reference. | 116 MessageCenter* message_center_; // Weak reference. |
| 116 MessageCenterTray* tray_; // Weak reference. | 117 MessageCenterTray* tray_; // Weak reference. |
| 117 std::vector<MessageView*> message_views_; | 118 std::vector<MessageView*> message_views_; |
| 118 views::ScrollView* scroller_; | 119 views::ScrollView* scroller_; |
| 119 MessageListView* message_list_view_; | 120 MessageListView* message_list_view_; |
| 120 NotifierSettingsView* settings_view_; | 121 NotifierSettingsView* settings_view_; |
| 121 MessageCenterButtonBar* button_bar_; | 122 MessageCenterButtonBar* button_bar_; |
| 122 views::View* no_notifications_message_view_; | 123 views::View* no_notifications_message_view_; |
| 124 bool buttons_at_top_; |
| 123 | 125 |
| 124 // Data for transition animation between settings view and message list. | 126 // Data for transition animation between settings view and message list. |
| 125 bool settings_visible_; | 127 bool settings_visible_; |
| 126 views::View* source_view_; | 128 views::View* source_view_; |
| 127 views::View* target_view_; | 129 views::View* target_view_; |
| 128 int source_height_; | 130 int source_height_; |
| 129 int target_height_; | 131 int target_height_; |
| 130 scoped_ptr<ui::MultiAnimation> settings_transition_animation_; | 132 scoped_ptr<ui::MultiAnimation> settings_transition_animation_; |
| 131 | 133 |
| 132 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); | 134 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 } // namespace message_center | 137 } // namespace message_center |
| 136 | 138 |
| 137 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 139 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| OLD | NEW |