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 |