| 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/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace message_center { | 24 namespace message_center { |
| 25 | 25 |
| 26 class MessageCenter; | 26 class MessageCenter; |
| 27 class MessageCenterBubble; | 27 class MessageCenterBubble; |
| 28 class NotificationCenterButton; | 28 class NotificationCenterButton; |
| 29 class MessageCenterButtonBar; | 29 class MessageCenterButtonBar; |
| 30 class MessageCenterTray; | 30 class MessageCenterTray; |
| 31 class MessageCenterView; | 31 class MessageCenterView; |
| 32 class MessageView; | 32 class MessageView; |
| 33 class MessageListView; | 33 class MessageListView; |
| 34 class NotificationView; |
| 34 class NotifierSettingsView; | 35 class NotifierSettingsView; |
| 35 | 36 |
| 36 // MessageCenterView /////////////////////////////////////////////////////////// | 37 // MessageCenterView /////////////////////////////////////////////////////////// |
| 37 | 38 |
| 38 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, | 39 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, |
| 39 public MessageCenterObserver, | 40 public MessageCenterObserver, |
| 40 public gfx::AnimationDelegate { | 41 public gfx::AnimationDelegate { |
| 41 public: | 42 public: |
| 42 MessageCenterView(MessageCenter* message_center, | 43 MessageCenterView(MessageCenter* message_center, |
| 43 MessageCenterTray* tray, | 44 MessageCenterTray* tray, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // Overridden from gfx::AnimationDelegate: | 77 // Overridden from gfx::AnimationDelegate: |
| 77 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; | 78 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE; |
| 78 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; | 79 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; |
| 79 virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE; | 80 virtual void AnimationCanceled(const gfx::Animation* animation) OVERRIDE; |
| 80 | 81 |
| 81 private: | 82 private: |
| 82 friend class MessageCenterViewTest; | 83 friend class MessageCenterViewTest; |
| 83 | 84 |
| 84 void AddNotificationAt(const Notification& notification, int index); | 85 void AddNotificationAt(const Notification& notification, int index); |
| 85 void NotificationsChanged(); | 86 void NotificationsChanged(); |
| 86 void SetNotificationViewForTest(views::View* view); | 87 void SetNotificationViewForTest(MessageView* view); |
| 87 | 88 |
| 88 MessageCenter* message_center_; // Weak reference. | 89 MessageCenter* message_center_; // Weak reference. |
| 89 MessageCenterTray* tray_; // Weak reference. | 90 MessageCenterTray* tray_; // Weak reference. |
| 90 std::vector<MessageView*> message_views_; // Weak references. | 91 // Map notification_id->NotificationView*. It contains all NotificaitonViews |
| 92 // currently displayed in MessageCenter. |
| 93 typedef std::map<std::string, NotificationView*> NotificationViewsMap; |
| 94 NotificationViewsMap notification_views_; // Weak. |
| 91 | 95 |
| 92 // Child views. | 96 // Child views. |
| 93 views::ScrollView* scroller_; | 97 views::ScrollView* scroller_; |
| 94 scoped_ptr<MessageListView> message_list_view_; | 98 scoped_ptr<MessageListView> message_list_view_; |
| 95 scoped_ptr<views::View> empty_list_view_; | 99 scoped_ptr<views::View> empty_list_view_; |
| 96 NotifierSettingsView* settings_view_; | 100 NotifierSettingsView* settings_view_; |
| 97 MessageCenterButtonBar* button_bar_; | 101 MessageCenterButtonBar* button_bar_; |
| 98 bool top_down_; | 102 bool top_down_; |
| 99 | 103 |
| 100 // Data for transition animation between settings view and message list. | 104 // Data for transition animation between settings view and message list. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 114 // True when the widget is closing so that further operations should be | 118 // True when the widget is closing so that further operations should be |
| 115 // ignored. | 119 // ignored. |
| 116 bool is_closing_; | 120 bool is_closing_; |
| 117 | 121 |
| 118 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); | 122 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); |
| 119 }; | 123 }; |
| 120 | 124 |
| 121 } // namespace message_center | 125 } // namespace message_center |
| 122 | 126 |
| 123 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ | 127 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ |
| OLD | NEW |