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

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 (nits) Created 7 years 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 | « ash/wm/dock/docked_window_layout_manager.cc ('k') | ash/wm/window_animations_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_animations.cc
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 5d02758d0b6c9f324d1b49905b970b454a3e88a9..0daa4f346baf1dda679e57921a0b22d7eae275a1 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -105,8 +105,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(
@@ -136,6 +136,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
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.cc ('k') | ash/wm/window_animations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698