Commit a5a00728 authored by yoshiki iguchi's avatar yoshiki iguchi Committed by Commit Bot

Hide a toast correctly just after unlocking

There was the bug that a toast didn't get hidden if it was removed
just after unlocking the screen. This bug had been introduced by
http://crrev.com/b7c2ea2a2ca1fa8b7eb8aece0bee0a965735dcda.

Toast changes the window container which it belongs to referring
the current device lock status: locked or unlocked, because chrome
os has different window containers for locked and unlocked desktop.

That commit had changed the timing of changing the window container and
that had caused the bug. We had the code not to hide a toast on animation,
but that change had added an animation on the changing.

This CL removes the code, since it is no longer necessary because the
change timing was changed.

Bug: 887800
Test: manual

Change-Id: I2942227af9bc9eebb8c5881920341f25d68e91d5
Reviewed-on: https://chromium-review.googlesource.com/1235513
Commit-Queue: Yoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593059}
parent 7c55fd65
......@@ -236,13 +236,6 @@ void ToastOverlay::Show(bool visible) {
ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator();
DCHECK(animator);
if (animator->is_animating()) {
// Showing during hiding animation doesn't happen since, ToastOverlay should
// be one-time-use and not be reused.
DCHECK(!visible);
return;
}
base::TimeDelta original_duration = animator->GetTransitionDuration();
ui::ScopedLayerAnimationSettings animation_settings(animator);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment