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

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 (rebase) 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/window_animations.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('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..2015ebd9afded889476dd36572fd592647422131 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -321,7 +321,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.
{
@@ -413,9 +414,10 @@ void CrossFadeToBounds(aura::Window* window, const gfx::Rect& new_bounds) {
CrossFadeImpl(window, old_layer, gfx::Tween::EASE_OUT);
}
-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();
« no previous file with comments | « ash/wm/window_animations.h ('k') | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698