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

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

Issue 2558083005: Remove "top_down" flag in the message center code (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_LIST_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 10
(...skipping 20 matching lines...) Expand all
31 // repositioning. 31 // repositioning.
32 class MESSAGE_CENTER_EXPORT MessageListView 32 class MESSAGE_CENTER_EXPORT MessageListView
33 : public views::View, 33 : public views::View,
34 public views::BoundsAnimatorObserver { 34 public views::BoundsAnimatorObserver {
35 public: 35 public:
36 class Observer { 36 class Observer {
37 public: 37 public:
38 virtual void OnAllNotificationsCleared() = 0; 38 virtual void OnAllNotificationsCleared() = 0;
39 }; 39 };
40 40
41 explicit MessageListView(bool top_down); 41 MessageListView();
42 ~MessageListView() override; 42 ~MessageListView() override;
43 43
44 void AddNotificationAt(MessageView* view, int i); 44 void AddNotificationAt(MessageView* view, int i);
45 void RemoveNotification(MessageView* view); 45 void RemoveNotification(MessageView* view);
46 void UpdateNotification(MessageView* view, const Notification& notification); 46 void UpdateNotification(MessageView* view, const Notification& notification);
47 void SetRepositionTarget(const gfx::Rect& target_rect); 47 void SetRepositionTarget(const gfx::Rect& target_rect);
48 void ResetRepositionSession(); 48 void ResetRepositionSession();
49 void ClearAllClosableNotifications(const gfx::Rect& visible_scroll_rect); 49 void ClearAllClosableNotifications(const gfx::Rect& visible_scroll_rect);
50 50
51 void AddObserver(Observer* observer); 51 void AddObserver(Observer* observer);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void AnimateClearingOneNotification(); 91 void AnimateClearingOneNotification();
92 92
93 // List of MessageListView::Observer 93 // List of MessageListView::Observer
94 base::ObserverList<Observer> observers_; 94 base::ObserverList<Observer> observers_;
95 95
96 // The top position of the reposition target rectangle. 96 // The top position of the reposition target rectangle.
97 int reposition_top_; 97 int reposition_top_;
98 int fixed_height_; 98 int fixed_height_;
99 bool has_deferred_task_; 99 bool has_deferred_task_;
100 bool clear_all_started_; 100 bool clear_all_started_;
101 bool top_down_;
102 std::set<views::View*> adding_views_; 101 std::set<views::View*> adding_views_;
103 std::set<views::View*> deleting_views_; 102 std::set<views::View*> deleting_views_;
104 std::set<views::View*> deleted_when_done_; 103 std::set<views::View*> deleted_when_done_;
105 std::list<views::View*> clearing_all_views_; 104 std::list<views::View*> clearing_all_views_;
106 views::BoundsAnimator animator_; 105 views::BoundsAnimator animator_;
107 106
108 // If true, the message loop will be quitted after the animation finishes. 107 // If true, the message loop will be quitted after the animation finishes.
109 // This is just for tests and has no setter. 108 // This is just for tests and has no setter.
110 bool quit_message_loop_after_animation_for_test_; 109 bool quit_message_loop_after_animation_for_test_;
111 110
112 base::WeakPtrFactory<MessageListView> weak_ptr_factory_; 111 base::WeakPtrFactory<MessageListView> weak_ptr_factory_;
113 DISALLOW_COPY_AND_ASSIGN(MessageListView); 112 DISALLOW_COPY_AND_ASSIGN(MessageListView);
114 }; 113 };
115 114
116 } // namespace message_center 115 } // namespace message_center
117 116
118 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_ 117 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_view_unittest.cc ('k') | ui/message_center/views/message_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698