| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void ClickOnSettingsButton(const std::string& notification_id) override; | 70 void ClickOnSettingsButton(const std::string& notification_id) override; |
| 71 | 71 |
| 72 void MarkAllPopupsShown(); | 72 void MarkAllPopupsShown(); |
| 73 | 73 |
| 74 // Since these events are really coming from individual toast widgets, | 74 // Since these events are really coming from individual toast widgets, |
| 75 // it helps to be able to keep track of the sender. | 75 // it helps to be able to keep track of the sender. |
| 76 void OnMouseEntered(ToastContentsView* toast_entered); | 76 void OnMouseEntered(ToastContentsView* toast_entered); |
| 77 void OnMouseExited(ToastContentsView* toast_exited); | 77 void OnMouseExited(ToastContentsView* toast_exited); |
| 78 | 78 |
| 79 // Invoked by toasts when they start/finish their animations. | 79 // Invoked by toasts when they start/finish their animations. |
| 80 // While "defer counter" is greater then zero, the popup collection does | 80 // While "defer counter" is greater than zero, the popup collection does |
| 81 // not perform updates. It is used to wait for various animations and user | 81 // not perform updates. It is used to wait for various animations and user |
| 82 // actions like serial closing of the toasts, when the remaining toasts "flow | 82 // actions like serial closing of the toasts, when the remaining toasts "flow |
| 83 // under the mouse". | 83 // under the mouse". |
| 84 void IncrementDeferCounter(); | 84 void IncrementDeferCounter(); |
| 85 void DecrementDeferCounter(); | 85 void DecrementDeferCounter(); |
| 86 | 86 |
| 87 // Runs the next step in update/animate sequence, if the defer counter is not | 87 // Runs the next step in update/animate sequence, if the defer counter is not |
| 88 // zero. Otherwise, simply waits when it becomes zero. | 88 // zero. Otherwise, simply waits when it becomes zero. |
| 89 void DoUpdateIfPossible(); | 89 void DoUpdateIfPossible(); |
| 90 | 90 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // Gives out weak pointers to toast contents views which have an unrelated | 172 // Gives out weak pointers to toast contents views which have an unrelated |
| 173 // lifetime. Must remain the last member variable. | 173 // lifetime. Must remain the last member variable. |
| 174 base::WeakPtrFactory<MessagePopupCollection> weak_factory_; | 174 base::WeakPtrFactory<MessagePopupCollection> weak_factory_; |
| 175 | 175 |
| 176 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); | 176 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 } // namespace message_center | 179 } // namespace message_center |
| 180 | 180 |
| 181 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ | 181 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
| OLD | NEW |