| 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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 // MessageCenterView /////////////////////////////////////////////////////////// | 36 // MessageCenterView /////////////////////////////////////////////////////////// |
| 37 | 37 |
| 38 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, | 38 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, |
| 39 public MessageCenterObserver, | 39 public MessageCenterObserver, |
| 40 public ui::AnimationDelegate { | 40 public ui::AnimationDelegate { |
| 41 public: | 41 public: |
| 42 MessageCenterView(MessageCenter* message_center, | 42 MessageCenterView(MessageCenter* message_center, |
| 43 MessageCenterTray* tray, | 43 MessageCenterTray* tray, |
| 44 int max_height, | 44 int max_height, |
| 45 bool initially_settings_visible); | 45 bool initially_settings_visible, |
| 46 bool buttons_on_top); |
| 46 virtual ~MessageCenterView(); | 47 virtual ~MessageCenterView(); |
| 47 | 48 |
| 48 void SetNotifications(const NotificationList::Notifications& notifications); | 49 void SetNotifications(const NotificationList::Notifications& notifications); |
| 49 | 50 |
| 50 void ClearAllNotifications(); | 51 void ClearAllNotifications(); |
| 51 void OnAllNotificationsCleared(); | 52 void OnAllNotificationsCleared(); |
| 52 | 53 |
| 53 size_t NumMessageViewsForTest() const; | 54 size_t NumMessageViewsForTest() const; |
| 54 | 55 |
| 55 void SetSettingsVisible(bool visible); | 56 void SetSettingsVisible(bool visible); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 82 void SetNotificationViewForTest(views::View* view); | 83 void SetNotificationViewForTest(views::View* view); |
| 83 | 84 |
| 84 MessageCenter* message_center_; // Weak reference. | 85 MessageCenter* message_center_; // Weak reference. |
| 85 MessageCenterTray* tray_; // Weak reference. | 86 MessageCenterTray* tray_; // Weak reference. |
| 86 std::vector<MessageView*> message_views_; | 87 std::vector<MessageView*> message_views_; |
| 87 views::ScrollView* scroller_; | 88 views::ScrollView* scroller_; |
| 88 MessageListView* message_list_view_; | 89 MessageListView* message_list_view_; |
| 89 NotifierSettingsView* settings_view_; | 90 NotifierSettingsView* settings_view_; |
| 90 MessageCenterButtonBar* button_bar_; | 91 MessageCenterButtonBar* button_bar_; |
| 91 views::View* no_notifications_message_view_; | 92 views::View* no_notifications_message_view_; |
| 93 bool buttons_on_top_; |
| 92 | 94 |
| 93 // Data for transition animation between settings view and message list. | 95 // Data for transition animation between settings view and message list. |
| 94 bool settings_visible_; | 96 bool settings_visible_; |
| 95 views::View* source_view_; | 97 views::View* source_view_; |
| 96 views::View* target_view_; | 98 views::View* target_view_; |
| 97 int source_height_; | 99 int source_height_; |
| 98 int target_height_; | 100 int target_height_; |
| 99 scoped_ptr<ui::MultiAnimation> settings_transition_animation_; | 101 scoped_ptr<ui::MultiAnimation> settings_transition_animation_; |
| 100 | 102 |
| 101 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); | 103 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); |
| 102 }; | 104 }; |
| 103 | 105 |
| 104 } // namespace message_center | 106 } // namespace message_center |
| 105 | 107 |
| 106 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 108 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| OLD | NEW |