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

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

Issue 20066003: Update notification settings to allow for multiprofile situations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix message_center_unittests Created 7 years, 4 months 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/base/animation/animation_delegate.h" 10 #include "ui/base/animation/animation_delegate.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual ~MessageCenterView(); 47 virtual ~MessageCenterView();
48 48
49 void SetNotifications(const NotificationList::Notifications& notifications); 49 void SetNotifications(const NotificationList::Notifications& notifications);
50 50
51 void ClearAllNotifications(); 51 void ClearAllNotifications();
52 void OnAllNotificationsCleared(); 52 void OnAllNotificationsCleared();
53 53
54 size_t NumMessageViewsForTest() const; 54 size_t NumMessageViewsForTest() const;
55 55
56 void SetSettingsVisible(bool visible); 56 void SetSettingsVisible(bool visible);
57 void OnSettingsChanged();
57 bool settings_visible() const { return settings_visible_; } 58 bool settings_visible() const { return settings_visible_; }
58 59
59 protected: 60 protected:
60 // Overridden from views::View: 61 // Overridden from views::View:
61 virtual void Layout() OVERRIDE; 62 virtual void Layout() OVERRIDE;
62 virtual gfx::Size GetPreferredSize() OVERRIDE; 63 virtual gfx::Size GetPreferredSize() OVERRIDE;
63 virtual int GetHeightForWidth(int width) OVERRIDE; 64 virtual int GetHeightForWidth(int width) OVERRIDE;
64 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; 65 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
65 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 66 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
66 67
(...skipping 10 matching lines...) Expand all
77 78
78 private: 79 private:
79 friend class MessageCenterViewTest; 80 friend class MessageCenterViewTest;
80 81
81 void AddNotificationAt(const Notification& notification, int index); 82 void AddNotificationAt(const Notification& notification, int index);
82 void NotificationsChanged(); 83 void NotificationsChanged();
83 void SetNotificationViewForTest(views::View* view); 84 void SetNotificationViewForTest(views::View* view);
84 85
85 MessageCenter* message_center_; // Weak reference. 86 MessageCenter* message_center_; // Weak reference.
86 MessageCenterTray* tray_; // Weak reference. 87 MessageCenterTray* tray_; // Weak reference.
87 std::vector<MessageView*> message_views_; 88 std::vector<MessageView*> message_views_; // Weak references.
89
90 // Child views.
88 views::ScrollView* scroller_; 91 views::ScrollView* scroller_;
89 MessageListView* message_list_view_; 92 MessageListView* message_list_view_;
90 NotifierSettingsView* settings_view_; 93 NotifierSettingsView* settings_view_;
91 MessageCenterButtonBar* button_bar_; 94 MessageCenterButtonBar* button_bar_;
92 views::View* no_notifications_message_view_; 95 views::View* no_notifications_message_view_;
93 bool top_down_; 96 bool top_down_;
94 97
95 // Data for transition animation between settings view and message list. 98 // Data for transition animation between settings view and message list.
96 bool settings_visible_; 99 bool settings_visible_;
100
101 // Animation managing transition between message center and settings (and vice
102 // versa).
103 scoped_ptr<ui::MultiAnimation> settings_transition_animation_;
104
105 // Helper data to keep track of the transition between settings and
106 // message center views.
97 views::View* source_view_; 107 views::View* source_view_;
108 int source_height_;
98 views::View* target_view_; 109 views::View* target_view_;
99 int source_height_;
100 int target_height_; 110 int target_height_;
101 scoped_ptr<ui::MultiAnimation> settings_transition_animation_;
102 111
103 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); 112 DISALLOW_COPY_AND_ASSIGN(MessageCenterView);
104 }; 113 };
105 114
106 } // namespace message_center 115 } // namespace message_center
107 116
108 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ 117 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698