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

Unified Diff: ash/common/system/toast/toast_overlay.cc

Issue 2150603003: Prevent hiding a toast during animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/toast/toast_overlay.cc
diff --git a/ash/common/system/toast/toast_overlay.cc b/ash/common/system/toast/toast_overlay.cc
index 87d49c687e703ab71e236c569190dc65a394d786..2e0f5452b0bbddfeaf74e8d7d9731dce9d4f0818 100644
--- a/ash/common/system/toast/toast_overlay.cc
+++ b/ash/common/system/toast/toast_overlay.cc
@@ -253,6 +253,8 @@ void ToastOverlay::Show(bool visible) {
ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator();
DCHECK(animator);
+ if (animator->is_animating())
+ return;
oshima 2016/07/14 13:18:31 won't his also prevent showing during hiding anima
yoshiki 2016/07/15 02:38:30 It doesn't happen, since a toast overlay instance
base::TimeDelta original_duration = animator->GetTransitionDuration();
ui::ScopedLayerAnimationSettings animation_settings(animator);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698