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

Unified Diff: ash/wm/window_animations.cc

Issue 80323002: Restores maximized browser before dragging a tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restores maximized browser before dragging a tab (ash only) Created 7 years, 1 month 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 13abd4a8c2307b640cd2e3c58b1a17da6cd1046c..3edcc0848c2a1488e26309406ce669bba6385629 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -324,7 +324,8 @@ base::TimeDelta CrossFadeImpl(aura::Window* window,
const bool old_on_top = (old_bounds.width() > new_bounds.width());
// Shorten the animation if there's not much visual movement.
- const base::TimeDelta duration = GetCrossFadeDuration(old_bounds, new_bounds);
+ const base::TimeDelta duration = GetCrossFadeDuration(window,
+ old_bounds, new_bounds);
// Scale up the old layer while translating to new position.
{
@@ -430,9 +431,10 @@ void CrossFadeWindowBetweenWorkspaces(aura::Window* new_workspace,
CrossFadeImpl(window, old_layer, kCrossFadeTweenType);
}
-base::TimeDelta GetCrossFadeDuration(const gfx::Rect& old_bounds,
+base::TimeDelta GetCrossFadeDuration(aura::Window* window,
+ const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
- if (views::corewm::WindowAnimationsDisabled(NULL))
+ if (views::corewm::WindowAnimationsDisabled(window))
return base::TimeDelta();
int old_area = old_bounds.width() * old_bounds.height();

Powered by Google App Engine
This is Rietveld 408576698