Chromium Code Reviews| Index: ash/wm/base_layout_manager.cc |
| diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc |
| index d5bb54fa66f3462a9a21c82b16a819cef06cd604..e6fc8333960f4e2f6f869ec112b5ceacb1c8c0d5 100644 |
| --- a/ash/wm/base_layout_manager.cc |
| +++ b/ash/wm/base_layout_manager.cc |
| @@ -4,6 +4,7 @@ |
| #include "ash/wm/base_layout_manager.h" |
| +#include "ash/ash_switches.h" |
| #include "ash/screen_ash.h" |
| #include "ash/shelf/shelf_layout_manager.h" |
| #include "ash/shell.h" |
| @@ -11,6 +12,7 @@ |
| #include "ash/wm/window_properties.h" |
| #include "ash/wm/window_util.h" |
| #include "ash/wm/workspace/workspace_window_resizer.h" |
| +#include "base/command_line.h" |
| #include "ui/aura/client/activation_client.h" |
| #include "ui/aura/client/aura_constants.h" |
| #include "ui/aura/root_window.h" |
| @@ -52,10 +54,13 @@ gfx::Rect BaseLayoutManager::BoundsWithScreenEdgeVisible( |
| const gfx::Rect& restore_bounds) { |
| gfx::Rect max_bounds = |
| ash::ScreenAsh::GetMaximizedWindowBoundsInParent(window); |
| - // If the restore_bounds are more than 1 grid step away from the size the |
| - // window would be when maximized, inset it. |
| - max_bounds.Inset(ash::internal::WorkspaceWindowResizer::kScreenEdgeInset, |
| - ash::internal::WorkspaceWindowResizer::kScreenEdgeInset); |
| + if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kAshEnableStickyEdges)) { |
|
varkha
2013/04/16 02:12:12
This changes the behavior of restore after a norma
stevenjb
2013/04/16 20:08:20
I'm going to revert this until discussing with UX.
|
| + // If the restore_bounds are more than 1 grid step away from the size the |
| + // window would be when maximized, inset it. |
| + max_bounds.Inset(ash::internal::WorkspaceWindowResizer::kScreenEdgeInset, |
| + ash::internal::WorkspaceWindowResizer::kScreenEdgeInset); |
| + } |
| if (restore_bounds.Contains(max_bounds)) |
| return max_bounds; |
| return restore_bounds; |