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

Unified Diff: ui/message_center/views/toast_contents_view.cc

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 | « ui/message_center/views/message_popup_collection.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/toast_contents_view.cc
diff --git a/ui/message_center/views/toast_contents_view.cc b/ui/message_center/views/toast_contents_view.cc
index d3e72e4184192b6bba9f4b91238ea21b264839c0..03ef309f511c46bb6e8289817b3596f7423b54c8 100644
--- a/ui/message_center/views/toast_contents_view.cc
+++ b/ui/message_center/views/toast_contents_view.cc
@@ -106,7 +106,7 @@ void ToastContentsView::ResetTimeout(int priority) {
}
void ToastContentsView::SuspendTimer() {
- if (!timer_.get())
+ if (!timer_.get() || !timer_->IsRunning())
return;
timer_->Stop();
passed_ += base::Time::Now() - start_time_;
@@ -261,12 +261,12 @@ bool ToastContentsView::CanActivate() const {
// views::View
void ToastContentsView::OnMouseEntered(const ui::MouseEvent& event) {
if (collection_)
- collection_->OnMouseEntered();
+ collection_->OnMouseEntered(this);
}
void ToastContentsView::OnMouseExited(const ui::MouseEvent& event) {
if (collection_)
- collection_->OnMouseExited();
+ collection_->OnMouseExited(this);
}
void ToastContentsView::Layout() {
« no previous file with comments | « ui/message_center/views/message_popup_collection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698