Index: chrome/browser/ui/window_sizer/window_sizer_ash.cc |
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash.cc b/chrome/browser/ui/window_sizer/window_sizer_ash.cc |
index 30093e6eec386d8089a80a05f355b465836adfc1..241f41718b35375e7098dbf0fb388d01be709403 100644 |
--- a/chrome/browser/ui/window_sizer/window_sizer_ash.cc |
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash.cc |
@@ -15,10 +15,17 @@ |
#include "ui/aura/root_window.h" |
#include "ui/aura/window.h" |
#include "ui/aura/window_delegate.h" |
+#include "ui/compositor/layer_animator.h" |
+#include "ui/compositor/scoped_layer_animation_settings.h" |
#include "ui/gfx/screen.h" |
namespace { |
+// The time which should be used to visually move a window through an automatic |
+// "intelligent" window management option. |
+const base::TimeDelta kWindowAutoMoveDuration = |
+ base::TimeDelta::FromMilliseconds(125); |
+ |
// Check if the given browser is 'valid': It is a tabbed, non minimized |
// window, which intersects with the |bounds_in_screen| area of a given screen. |
bool IsValidBrowser(Browser* browser, const gfx::Rect& bounds_in_screen) { |
@@ -156,22 +163,14 @@ bool WindowSizer::GetBoundsOverrideAsh(const gfx::Rect& specified_bounds, |
if (maximized) |
return true; |
- gfx::Rect other_bounds_in_screen = top_window->GetBoundsInScreen(); |
- bool move_right = |
- other_bounds_in_screen.CenterPoint().x() < work_area.CenterPoint().x(); |
- |
- // In case we have only one window, we move the other window fully to the |
- // "other side" - making room for this new window. |
- if (count == 1) { |
- gfx::Display display = ash::Shell::GetScreen()->GetDisplayMatching( |
- top_window->GetRootWindow()->GetBoundsInScreen()); |
- if (MoveRect(work_area, other_bounds_in_screen, !move_right)) |
- top_window->SetBoundsInScreen(other_bounds_in_screen, display); |
- } |
// Use the size of the other window, and mirror the location to the |
// opposite side. Then make sure that it is inside our work area |
// (if possible). |
- *bounds_in_screen = other_bounds_in_screen; |
+ *bounds_in_screen = top_window->GetBoundsInScreen(); |
+ |
+ bool move_right = |
+ bounds_in_screen->CenterPoint().x() < work_area.CenterPoint().x(); |
+ |
MoveRect(work_area, *bounds_in_screen, move_right); |
if (bounds_in_screen->bottom() > work_area.bottom()) |
bounds_in_screen->set_y(std::max(work_area.y(), |