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

Unified Diff: ash/wm/window_animations.cc

Issue 180273025: Keep dedicated layers for hiding animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months 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 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()->

Powered by Google App Engine
This is Rietveld 408576698