| Index: ash/wm/window_animations.cc
|
| diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
|
| index 4dce8476da8b93d63d864063c5b14cf95e022449..94e0c5b748e488d32fcb6cc03abaaa978684a0aa 100644
|
| --- a/ash/wm/window_animations.cc
|
| +++ b/ash/wm/window_animations.cc
|
| @@ -177,8 +177,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);
|
| @@ -210,8 +211,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()->
|
|
|