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

Unified Diff: ui/message_center/views/message_popup_collection.h

Issue 14817004: Makes mouse-hover prevent notification toasts from moving. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: name constant Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/message_center/views/message_popup_collection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_popup_collection.h
diff --git a/ui/message_center/views/message_popup_collection.h b/ui/message_center/views/message_popup_collection.h
index 0d3d5075a3684da150a610923a123960f24bb8e8..e0af09c03832408ff28b7aeb8e3987a8cba35104 100644
--- a/ui/message_center/views/message_popup_collection.h
+++ b/ui/message_center/views/message_popup_collection.h
@@ -58,8 +58,10 @@ class MESSAGE_CENTER_EXPORT MessagePopupCollection
// Called by ToastContentsView when its window is closed.
void RemoveToast(ToastContentsView* toast);
- void OnMouseEntered();
- void OnMouseExited();
+ // Since these events are really coming from individual toast widgets,
+ // it helps to be able to keep track of the sender.
+ void OnMouseEntered(ToastContentsView* toast_entered);
+ void OnMouseExited(ToastContentsView* toast_exited);
// Invoked by toasts when they start/finish their animations.
// While "defer counter" is greater then zero, the popup collection does
@@ -129,6 +131,10 @@ class MESSAGE_CENTER_EXPORT MessagePopupCollection
int defer_counter_;
+ // This is only used to compare with incoming events, do not assume that
+ // the toast will be valid if this pointer is non-NULL.
+ ToastContentsView* latest_toast_entered_;
+
// Denotes a mode when user is clicking the Close button of toasts in a
// sequence, w/o moving the mouse. We reposition the toasts so the next one
// happens to be right under the mouse, and the user can just dispose of
« no previous file with comments | « no previous file | ui/message_center/views/message_popup_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698