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_POPUP_COLLECTION_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 // This is only used to compare with incoming events, do not assume that | 159 // This is only used to compare with incoming events, do not assume that |
160 // the toast will be valid if this pointer is non-NULL. | 160 // the toast will be valid if this pointer is non-NULL. |
161 ToastContentsView* latest_toast_entered_; | 161 ToastContentsView* latest_toast_entered_; |
162 | 162 |
163 // Denotes a mode when user is clicking the Close button of toasts in a | 163 // Denotes a mode when user is clicking the Close button of toasts in a |
164 // sequence, w/o moving the mouse. We reposition the toasts so the next one | 164 // sequence, w/o moving the mouse. We reposition the toasts so the next one |
165 // happens to be right under the mouse, and the user can just dispose of | 165 // happens to be right under the mouse, and the user can just dispose of |
166 // multipel toasts by clicking. The mode ends when defer_timer_ expires. | 166 // multipel toasts by clicking. The mode ends when defer_timer_ expires. |
167 bool user_is_closing_toasts_by_clicking_; | 167 bool user_is_closing_toasts_by_clicking_; |
168 scoped_ptr<base::OneShotTimer<MessagePopupCollection> > defer_timer_; | 168 scoped_ptr<base::OneShotTimer> defer_timer_; |
169 // The top edge to align the position of the next toast during 'close by | 169 // The top edge to align the position of the next toast during 'close by |
170 // clicking" mode. | 170 // clicking" mode. |
171 // Only to be used when user_is_closing_toasts_by_clicking_ is true. | 171 // Only to be used when user_is_closing_toasts_by_clicking_ is true. |
172 int target_top_edge_; | 172 int target_top_edge_; |
173 | 173 |
174 // Weak, only exists temporarily in tests. | 174 // Weak, only exists temporarily in tests. |
175 scoped_ptr<base::RunLoop> run_loop_for_test_; | 175 scoped_ptr<base::RunLoop> run_loop_for_test_; |
176 | 176 |
177 scoped_ptr<MessageViewContextMenuController> context_menu_controller_; | 177 scoped_ptr<MessageViewContextMenuController> context_menu_controller_; |
178 | 178 |
179 // Gives out weak pointers to toast contents views which have an unrelated | 179 // Gives out weak pointers to toast contents views which have an unrelated |
180 // lifetime. Must remain the last member variable. | 180 // lifetime. Must remain the last member variable. |
181 base::WeakPtrFactory<MessagePopupCollection> weak_factory_; | 181 base::WeakPtrFactory<MessagePopupCollection> weak_factory_; |
182 | 182 |
183 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); | 183 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); |
184 }; | 184 }; |
185 | 185 |
186 } // namespace message_center | 186 } // namespace message_center |
187 | 187 |
188 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ | 188 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
OLD | NEW |