Index: ash/wm/window_util.cc |
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc |
index 19028b848dd352686a07f6ca991eeb037a3391ad..6d85c833dd4d6df3cfeb806c026d91fa4bf5ded7 100644 |
--- a/ash/wm/window_util.cc |
+++ b/ash/wm/window_util.cc |
@@ -7,16 +7,12 @@ |
#include <vector> |
#include "ash/ash_constants.h" |
-#include "ash/root_window_controller.h" |
#include "ash/shell.h" |
-#include "ash/shell_window_ids.h" |
#include "ash/wm/window_properties.h" |
#include "ui/aura/client/activation_client.h" |
#include "ui/aura/client/aura_constants.h" |
#include "ui/aura/root_window.h" |
#include "ui/aura/window.h" |
-#include "ui/aura/window_delegate.h" |
-#include "ui/compositor/layer.h" |
#include "ui/gfx/display.h" |
#include "ui/gfx/rect.h" |
#include "ui/gfx/screen.h" |
@@ -53,79 +49,11 @@ bool CanActivateWindow(aura::Window* window) { |
return views::corewm::CanActivateWindow(window); |
} |
-bool CanMaximizeWindow(const aura::Window* window) { |
- return window->GetProperty(aura::client::kCanMaximizeKey); |
-} |
- |
-bool CanMinimizeWindow(const aura::Window* window) { |
- internal::RootWindowController* controller = |
- internal::RootWindowController::ForWindow(window); |
- if (!controller) |
- return false; |
- aura::Window* lockscreen = controller->GetContainer( |
- internal::kShellWindowId_LockScreenContainersContainer); |
- if (lockscreen->Contains(window)) |
- return false; |
- |
- return true; |
-} |
- |
-bool CanResizeWindow(const aura::Window* window) { |
- return window->GetProperty(aura::client::kCanResizeKey); |
-} |
- |
-bool CanSnapWindow(aura::Window* window) { |
- if (!CanResizeWindow(window)) |
- return false; |
- if (window->type() == aura::client::WINDOW_TYPE_PANEL) |
- return false; |
- // If a window has a maximum size defined, snapping may make it too big. |
- return window->delegate() ? window->delegate()->GetMaximumSize().IsEmpty() : |
- true; |
-} |
- |
-bool IsWindowNormal(const aura::Window* window) { |
- return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey)); |
-} |
- |
-bool IsWindowStateNormal(ui::WindowShowState state) { |
- return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT; |
-} |
- |
-bool IsWindowMaximized(const aura::Window* window) { |
- return window->GetProperty(aura::client::kShowStateKey) == |
- ui::SHOW_STATE_MAXIMIZED; |
-} |
- |
-bool IsWindowMinimized(const aura::Window* window) { |
+bool IsWindowMinimized(aura::Window* window) { |
return window->GetProperty(aura::client::kShowStateKey) == |
ui::SHOW_STATE_MINIMIZED; |
} |
-bool IsWindowFullscreen(const aura::Window* window) { |
- return window->GetProperty(aura::client::kShowStateKey) == |
- ui::SHOW_STATE_FULLSCREEN; |
-} |
- |
-void MaximizeWindow(aura::Window* window) { |
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); |
-} |
- |
-void MinimizeWindow(aura::Window* window) { |
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); |
-} |
- |
-void RestoreWindow(aura::Window* window) { |
- window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
-} |
- |
-void ToggleMaximizedWindow(aura::Window* window) { |
- if (ash::wm::IsWindowMaximized(window)) |
- ash::wm::RestoreWindow(window); |
- else if (ash::wm::CanMaximizeWindow(window)) |
- ash::wm::MaximizeWindow(window); |
-} |
- |
void CenterWindow(aura::Window* window) { |
const gfx::Display display = |
Shell::GetScreen()->GetDisplayNearestWindow(window); |
@@ -138,16 +66,6 @@ void SetAnimateToFullscreen(aura::Window* window, bool animate) { |
window->SetProperty(ash::internal::kAnimateToFullscreenKey, animate); |
} |
-const gfx::Rect* GetPreAutoManageWindowBounds(const aura::Window* window) { |
- return window->GetProperty(ash::internal::kPreAutoManagedWindowBoundsKey); |
-} |
- |
-void SetPreAutoManageWindowBounds(aura::Window* window, |
- const gfx::Rect& bounds) { |
- window->SetProperty(ash::internal::kPreAutoManagedWindowBoundsKey, |
- new gfx::Rect(bounds)); |
-} |
- |
void AdjustBoundsToEnsureMinimumWindowVisibility(const gfx::Rect& visible_area, |
gfx::Rect* bounds) { |
AdjustBoundsToEnsureWindowVisibility( |