| 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 26 matching lines...) Expand all Loading... |
| 37 // center. | 37 // center. |
| 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 MessageCenterController, | 40 public MessageCenterController, |
| 41 public gfx::AnimationDelegate { | 41 public gfx::AnimationDelegate { |
| 42 public: | 42 public: |
| 43 MessageCenterView(MessageCenter* message_center, | 43 MessageCenterView(MessageCenter* message_center, |
| 44 MessageCenterTray* tray, | 44 MessageCenterTray* tray, |
| 45 int max_height, | 45 int max_height, |
| 46 bool initially_settings_visible, | 46 bool initially_settings_visible, |
| 47 bool top_down, | 47 bool top_down); |
| 48 const base::string16& title); | |
| 49 ~MessageCenterView() override; | 48 ~MessageCenterView() override; |
| 50 | 49 |
| 51 void SetNotifications(const NotificationList::Notifications& notifications); | 50 void SetNotifications(const NotificationList::Notifications& notifications); |
| 52 | 51 |
| 53 void ClearAllClosableNotifications(); | 52 void ClearAllClosableNotifications(); |
| 54 void OnAllNotificationsCleared(); | 53 void OnAllNotificationsCleared(); |
| 55 | 54 |
| 56 size_t NumMessageViewsForTest() const; | 55 size_t NumMessageViewsForTest() const; |
| 57 | 56 |
| 58 void SetSettingsVisible(bool visible); | 57 void SetSettingsVisible(bool visible); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Overridden from gfx::AnimationDelegate: | 89 // Overridden from gfx::AnimationDelegate: |
| 91 void AnimationEnded(const gfx::Animation* animation) override; | 90 void AnimationEnded(const gfx::Animation* animation) override; |
| 92 void AnimationProgressed(const gfx::Animation* animation) override; | 91 void AnimationProgressed(const gfx::Animation* animation) override; |
| 93 void AnimationCanceled(const gfx::Animation* animation) override; | 92 void AnimationCanceled(const gfx::Animation* animation) override; |
| 94 | 93 |
| 95 private: | 94 private: |
| 96 friend class MessageCenterViewTest; | 95 friend class MessageCenterViewTest; |
| 97 | 96 |
| 98 void AddNotificationAt(const Notification& notification, int index); | 97 void AddNotificationAt(const Notification& notification, int index); |
| 99 void NotificationsChanged(); | 98 void NotificationsChanged(); |
| 99 base::string16 GetButtonBarTitle() const; |
| 100 void SetNotificationViewForTest(MessageView* view); | 100 void SetNotificationViewForTest(MessageView* view); |
| 101 | 101 |
| 102 MessageCenter* message_center_; // Weak reference. | 102 MessageCenter* message_center_; // Weak reference. |
| 103 MessageCenterTray* tray_; // Weak reference. | 103 MessageCenterTray* tray_; // Weak reference. |
| 104 | 104 |
| 105 // Map notification_id->NotificationView*. It contains all NotificationViews | 105 // Map notification_id->NotificationView*. It contains all NotificationViews |
| 106 // currently displayed in MessageCenter. | 106 // currently displayed in MessageCenter. |
| 107 typedef std::map<std::string, NotificationView*> NotificationViewsMap; | 107 typedef std::map<std::string, NotificationView*> NotificationViewsMap; |
| 108 NotificationViewsMap notification_views_; // Weak. | 108 NotificationViewsMap notification_views_; // Weak. |
| 109 | 109 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 134 bool is_closing_; | 134 bool is_closing_; |
| 135 | 135 |
| 136 std::unique_ptr<MessageViewContextMenuController> context_menu_controller_; | 136 std::unique_ptr<MessageViewContextMenuController> context_menu_controller_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); | 138 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace message_center | 141 } // namespace message_center |
| 142 | 142 |
| 143 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 143 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| OLD | NEW |