| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 enum class Mode { NOTIFICATIONS, SETTINGS, BUTTONS_ONLY }; | 101 enum class Mode { NOTIFICATIONS, SETTINGS, BUTTONS_ONLY }; |
| 102 | 102 |
| 103 static bool disable_animation_for_testing; | 103 static bool disable_animation_for_testing; |
| 104 | 104 |
| 105 void AddNotificationAt(const Notification& notification, int index); | 105 void AddNotificationAt(const Notification& notification, int index); |
| 106 base::string16 GetButtonBarTitle() const; | 106 base::string16 GetButtonBarTitle() const; |
| 107 void Update(bool animate); | 107 void Update(bool animate); |
| 108 void SetVisibilityMode(Mode mode, bool animate); | 108 void SetVisibilityMode(Mode mode, bool animate); |
| 109 void UpdateButtonBarStatus(); | 109 void UpdateButtonBarStatus(); |
| 110 void EnableCloseAllIfAppropriate(); |
| 110 void SetNotificationViewForTest(MessageView* view); | 111 void SetNotificationViewForTest(MessageView* view); |
| 111 | 112 |
| 112 MessageCenter* message_center_; // Weak reference. | 113 MessageCenter* message_center_; // Weak reference. |
| 113 MessageCenterTray* tray_; // Weak reference. | 114 MessageCenterTray* tray_; // Weak reference. |
| 114 | 115 |
| 115 // Map notification_id->MessageView*. It contains all MessageViews currently | 116 // Map notification_id->MessageView*. It contains all MessageViews currently |
| 116 // displayed in MessageCenter. | 117 // displayed in MessageCenter. |
| 117 typedef std::map<std::string, MessageView*> NotificationViewsMap; | 118 typedef std::map<std::string, MessageView*> NotificationViewsMap; |
| 118 NotificationViewsMap notification_views_; // Weak. | 119 NotificationViewsMap notification_views_; // Weak. |
| 119 | 120 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 148 Mode mode_ = Mode::BUTTONS_ONLY; | 149 Mode mode_ = Mode::BUTTONS_ONLY; |
| 149 | 150 |
| 150 std::unique_ptr<MessageViewContextMenuController> context_menu_controller_; | 151 std::unique_ptr<MessageViewContextMenuController> context_menu_controller_; |
| 151 | 152 |
| 152 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); | 153 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 } // namespace message_center | 156 } // namespace message_center |
| 156 | 157 |
| 157 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 158 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| OLD | NEW |