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

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

Issue 2800923005: Pause close timer of notification while it's active (Closed)
Patch Set: Created 3 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 fa0068dec844f35dc776705d10837d76e2d6aaf4..eff6cc5981abdc3bd1eb98c4fad21f8c9649c603 100644
--- a/ui/message_center/views/message_popup_collection.h
+++ b/ui/message_center/views/message_popup_collection.h
@@ -72,6 +72,11 @@ class MESSAGE_CENTER_EXPORT MessagePopupCollection
void MarkAllPopupsShown();
+ // Inclement the timer counter, and pause the popup timer if necessary.
+ void PausePopupTimers();
+ // Declement the timer counter, and restart the popup timer if necessary.
+ void RestartPopupTimers();
+
// 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);
@@ -165,6 +170,10 @@ class MESSAGE_CENTER_EXPORT MessagePopupCollection
// Only to be used when user_is_closing_toasts_by_clicking_ is true.
int target_top_edge_;
+ // This is the number of pause request for timer. If it's more than zero, the
+ // timer is paused. If zero, the timer is not paused.
+ int timer_pause_counter_ = 0;
+
// Weak, only exists temporarily in tests.
std::unique_ptr<base::RunLoop> run_loop_for_test_;
« 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