| Index: ash/wm/window_animations.cc
|
| diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
|
| index f5328f94501e35b0041f30fd58fbe025f34f634b..2a92c1107a1eb07e29091650a6adf31ff2895251 100644
|
| --- a/ash/wm/window_animations.cc
|
| +++ b/ash/wm/window_animations.cc
|
| @@ -176,8 +176,9 @@ void AnimateHideWindow_Minimize(aura::Window* window) {
|
| base::TimeDelta duration = base::TimeDelta::FromMilliseconds(
|
| kLayerAnimationsForMinimizeDurationMS);
|
| settings.SetTransitionDuration(duration);
|
| - settings.AddObserver(
|
| - views::corewm::CreateHidingWindowAnimationObserver(window));
|
| + scoped_ptr<views::corewm::LayerDetacherForHidingAnimation> detacher =
|
| + views::corewm::DetachAndRecreateLayersForHidingAnimation(
|
| + window, &settings).Pass();
|
| window->layer()->SetVisible(false);
|
|
|
| AddLayerAnimationsForMinimize(window, false);
|
| @@ -209,8 +210,8 @@ void AnimateShowHideWindowCommon_BrightnessGrayscale(aura::Window* window,
|
| ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
|
| settings.SetTransitionDuration(duration);
|
| if (!show) {
|
| - settings.AddObserver(
|
| - views::corewm::CreateHidingWindowAnimationObserver(window));
|
| + views::corewm::DetachLayersForHidingAnimationWhenDestroyed(
|
| + window, &settings);
|
| }
|
|
|
| window->layer()->GetAnimator()->
|
|
|