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

Unified Diff: ash/wm/window_animations.cc

Issue 82573002: Changes sequence of docked animations when evicting windows from dock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes sequence of docked animations (added test) Created 7 years, 1 month 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
Index: ash/wm/window_animations.cc
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 13abd4a8c2307b640cd2e3c58b1a17da6cd1046c..f6ef8748bdf93818dfaddb00a0659ac9ab255e70 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -108,8 +108,8 @@ void AddLayerAnimationsForMinimize(aura::Window* window, bool show) {
rotation_about_pivot->SetReversed(show);
- base::TimeDelta duration = base::TimeDelta::FromMilliseconds(
- kLayerAnimationsForMinimizeDurationMS);
+ base::TimeDelta duration = window->layer()->GetAnimator()->
+ GetTransitionDuration();
scoped_ptr<ui::LayerAnimationElement> transition(
ui::LayerAnimationElement::CreateInterpolatedTransformElement(
@@ -139,6 +139,10 @@ void AddLayerAnimationsForMinimize(aura::Window* window, bool show) {
void AnimateShowWindow_Minimize(aura::Window* window) {
window->layer()->set_delegate(window);
window->layer()->SetOpacity(kWindowAnimation_HideOpacity);
+ ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
+ base::TimeDelta duration = base::TimeDelta::FromMilliseconds(
+ kLayerAnimationsForMinimizeDurationMS);
+ settings.SetTransitionDuration(duration);
AddLayerAnimationsForMinimize(window, true);
// Now that the window has been restored, we need to clear its animation style

Powered by Google App Engine
This is Rietveld 408576698