diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-29 01:28:45 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-29 01:28:45 +0000 |
commit | dd040cab9330c2618ee2ffb108e3a1e259c8afe8 (patch) | |
tree | 808b46f238a163bc7d88265393d5cf2cdd3d33ad /ash/accelerators/accelerator_controller.cc | |
parent | 9298cbc65bfd6e464548a42402f66da1ad3c82c8 (diff) | |
download | chromium_src-dd040cab9330c2618ee2ffb108e3a1e259c8afe8.zip chromium_src-dd040cab9330c2618ee2ffb108e3a1e259c8afe8.tar.gz chromium_src-dd040cab9330c2618ee2ffb108e3a1e259c8afe8.tar.bz2 |
Introduce WindowShowType which specifies the ash specific window show state.
* define separate file for WindowStateObserver.
Next step.
* Change auto placing code to update the state.
* Notify observers when ash specific state has changed.
Fix code and tests.
BUG=272460
R=jamescook@chromium.org
Review URL: https://codereview.chromium.org/23736012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators/accelerator_controller.cc')
-rw-r--r-- | ash/accelerators/accelerator_controller.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc index bf9a812..a6d0d49 100644 --- a/ash/accelerators/accelerator_controller.cc +++ b/ash/accelerators/accelerator_controller.cc @@ -826,16 +826,16 @@ bool AcceleratorController::PerformAction(int action, return true; case WINDOW_SNAP_LEFT: case WINDOW_SNAP_RIGHT: { - aura::Window* window = wm::GetActiveWindow(); + wm::WindowState* window_state = wm::GetActiveWindowState(); // Disable window docking shortcut key for full screen window due to // http://crbug.com/135487. - if (!window || - window->type() != aura::client::WINDOW_TYPE_NORMAL || - wm::GetWindowState(window)->IsFullscreen()) { + if (!window_state || + window_state->window()->type() != aura::client::WINDOW_TYPE_NORMAL || + window_state->IsFullscreen()) { break; } - internal::SnapSizer::SnapWindow(window, + internal::SnapSizer::SnapWindow(window_state, action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE : internal::SnapSizer::RIGHT_EDGE); return true; |