Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: ui/message_center/views/message_center_view.h

Issue 75133006: Move knowledge about MessageCenter out of MessageView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remover types Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(views::View* 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 // Set of NotificationView objects, each corresponding to a single
92 // notification.
93 typedef std::map<std::string, NotificationView*> NotificationViewsMap;
94 NotificationViewsMap notification_views_; // Weak.
dewittj 2013/11/22 00:33:55 The comment here is confusing since notification_v
Dmitry Titov 2013/11/22 01:13:51 Done.
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
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_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/message_center_view.cc » ('j') | ui/message_center/views/message_center_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698