| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 class MESSAGE_CENTER_EXPORT MessageCenterView | 38 class MESSAGE_CENTER_EXPORT MessageCenterView |
| 39 : public views::View, | 39 : public views::View, |
| 40 public MessageCenterObserver, | 40 public MessageCenterObserver, |
| 41 public MessageCenterController, | 41 public MessageCenterController, |
| 42 public MessageListView::Observer, | 42 public MessageListView::Observer, |
| 43 public gfx::AnimationDelegate { | 43 public gfx::AnimationDelegate { |
| 44 public: | 44 public: |
| 45 MessageCenterView(MessageCenter* message_center, | 45 MessageCenterView(MessageCenter* message_center, |
| 46 MessageCenterTray* tray, | 46 MessageCenterTray* tray, |
| 47 int max_height, | 47 int max_height, |
| 48 bool initially_settings_visible, | 48 bool initially_settings_visible); |
| 49 bool top_down); | |
| 50 ~MessageCenterView() override; | 49 ~MessageCenterView() override; |
| 51 | 50 |
| 52 void SetNotifications(const NotificationList::Notifications& notifications); | 51 void SetNotifications(const NotificationList::Notifications& notifications); |
| 53 | 52 |
| 54 void ClearAllClosableNotifications(); | 53 void ClearAllClosableNotifications(); |
| 55 | 54 |
| 56 size_t NumMessageViewsForTest() const; | 55 size_t NumMessageViewsForTest() const; |
| 57 | 56 |
| 58 void SetSettingsVisible(bool visible); | 57 void SetSettingsVisible(bool visible); |
| 59 void OnSettingsChanged(); | 58 void OnSettingsChanged(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Map notification_id->MessageView*. It contains all MessageViews currently | 115 // Map notification_id->MessageView*. It contains all MessageViews currently |
| 117 // displayed in MessageCenter. | 116 // displayed in MessageCenter. |
| 118 typedef std::map<std::string, MessageView*> NotificationViewsMap; | 117 typedef std::map<std::string, MessageView*> NotificationViewsMap; |
| 119 NotificationViewsMap notification_views_; // Weak. | 118 NotificationViewsMap notification_views_; // Weak. |
| 120 | 119 |
| 121 // Child views. | 120 // Child views. |
| 122 views::ScrollView* scroller_; | 121 views::ScrollView* scroller_; |
| 123 std::unique_ptr<MessageListView> message_list_view_; | 122 std::unique_ptr<MessageListView> message_list_view_; |
| 124 NotifierSettingsView* settings_view_; | 123 NotifierSettingsView* settings_view_; |
| 125 MessageCenterButtonBar* button_bar_; | 124 MessageCenterButtonBar* button_bar_; |
| 126 bool top_down_; | |
| 127 | 125 |
| 128 // Data for transition animation between settings view and message list. | 126 // Data for transition animation between settings view and message list. |
| 129 bool settings_visible_; | 127 bool settings_visible_; |
| 130 | 128 |
| 131 // Animation managing transition between message center and settings (and vice | 129 // Animation managing transition between message center and settings (and vice |
| 132 // versa). | 130 // versa). |
| 133 std::unique_ptr<gfx::MultiAnimation> settings_transition_animation_; | 131 std::unique_ptr<gfx::MultiAnimation> settings_transition_animation_; |
| 134 | 132 |
| 135 // Helper data to keep track of the transition between settings and | 133 // Helper data to keep track of the transition between settings and |
| 136 // message center views. | 134 // message center views. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 150 Mode mode_ = Mode::BUTTONS_ONLY; | 148 Mode mode_ = Mode::BUTTONS_ONLY; |
| 151 | 149 |
| 152 std::unique_ptr<MessageViewContextMenuController> context_menu_controller_; | 150 std::unique_ptr<MessageViewContextMenuController> context_menu_controller_; |
| 153 | 151 |
| 154 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); | 152 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); |
| 155 }; | 153 }; |
| 156 | 154 |
| 157 } // namespace message_center | 155 } // namespace message_center |
| 158 | 156 |
| 159 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 157 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| OLD | NEW |