summaryrefslogtreecommitdiffstats
path: root/ash/wm/window_util.cc
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-26 19:29:16 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-26 19:29:16 +0000
commitf3dfc8fabad76466cde4c48ff44f729a3b0c773f (patch)
tree2421915803dea92cc3ef20d447cfe88d5bb7b607 /ash/wm/window_util.cc
parentf09d17e64714d328bf91d5bb50b860092f762afa (diff)
downloadchromium_src-f3dfc8fabad76466cde4c48ff44f729a3b0c773f.zip
chromium_src-f3dfc8fabad76466cde4c48ff44f729a3b0c773f.tar.gz
chromium_src-f3dfc8fabad76466cde4c48ff44f729a3b0c773f.tar.bz2
Revert 164352 - Re-vamped the entire window auto positioning logic
As long as the user did not move / resize the window: A single visible window (browser / app) on the screen will always be centered. When a second visible (browser / app) window joins in, both will be pushed into opposite corners. When more windows get piled up, they go every time into the opposite side of the currently active window. When the user has resized / moved a window, it will be treated as a visible (browser / app) window, but it will not get moved - the others will however. Addressing bug: Moving last remaining tabbed window back into screen center BUG=153431, 150879, 153302 TEST=unit-tests & visual Review URL: https://chromiumcodereview.appspot.com/11085053 TBR=skuhne@chromium.org Review URL: https://codereview.chromium.org/11313012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/window_util.cc')
-rw-r--r--ash/wm/window_util.cc29
1 files changed, 5 insertions, 24 deletions
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc
index 58546a6..55513af 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -6,7 +6,6 @@
#include <vector>
-#include "ash/ash_constants.h"
#include "ash/shell.h"
#include "ash/wm/activation_controller.h"
#include "ash/wm/window_properties.h"
@@ -62,11 +61,11 @@ bool CanActivateWindow(aura::Window* window) {
return client && client->CanActivateWindow(window);
}
-bool CanMaximizeWindow(const aura::Window* window) {
+bool CanMaximizeWindow(aura::Window* window) {
return window->GetProperty(aura::client::kCanMaximizeKey);
}
-bool IsWindowNormal(const aura::Window* window) {
+bool IsWindowNormal(aura::Window* window) {
return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey));
}
@@ -74,17 +73,17 @@ bool IsWindowStateNormal(ui::WindowShowState state) {
return state == ui::SHOW_STATE_NORMAL || state == ui::SHOW_STATE_DEFAULT;
}
-bool IsWindowMaximized(const aura::Window* window) {
+bool IsWindowMaximized(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) {
+bool IsWindowFullscreen(aura::Window* window) {
return window->GetProperty(aura::client::kShowStateKey) ==
ui::SHOW_STATE_FULLSCREEN;
}
@@ -142,23 +141,5 @@ void DeepDeleteLayers(ui::Layer* layer) {
delete layer;
}
-bool IsWindowPositionManaged(const aura::Window* window) {
- return window->GetProperty(ash::internal::kWindowPositionManagedKey);
-}
-
-void SetWindowPositionManaged(aura::Window* window, bool managed) {
- window->SetProperty(ash::internal::kWindowPositionManagedKey, managed);
-}
-
-bool HasUserChangedWindowPositionOrSize(const aura::Window* window) {
- return window->GetProperty(
- ash::internal::kUserChangedWindowPositionOrSizeKey);
-}
-
-void SetUserHasChangedWindowPositionOrSize(aura::Window* window, bool changed) {
- window->SetProperty(ash::internal::kUserChangedWindowPositionOrSizeKey,
- changed);
-}
-
} // namespace wm
} // namespace ash