| Index: ash/accelerators/accelerator_controller.cc
|
| diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
|
| index afaaf9a197b536751199db1db9304b925a0dcd73..e0f9b4ce9a052a67606498cdda413580043c01aa 100644
|
| --- a/ash/accelerators/accelerator_controller.cc
|
| +++ b/ash/accelerators/accelerator_controller.cc
|
| @@ -21,8 +21,10 @@
|
| #include "ash/system/brightness/brightness_control_delegate.h"
|
| #include "ash/system/tray/system_tray.h"
|
| #include "ash/volume_control_delegate.h"
|
| +#include "ash/wm/property_util.h"
|
| #include "ash/wm/window_cycle_controller.h"
|
| #include "ash/wm/window_util.h"
|
| +#include "ash/wm/workspace/snap_sizer.h"
|
| #include "base/command_line.h"
|
| #include "ui/aura/event.h"
|
| #include "ui/aura/root_window.h"
|
| @@ -388,6 +390,19 @@ bool AcceleratorController::AcceleratorPressed(
|
| if (shell->tray())
|
| return shell->focus_cycler()->FocusWidget(shell->tray()->GetWidget());
|
| break;
|
| + case SNAP_WINDOW_LEFT:
|
| + case SNAP_WINDOW_RIGHT: {
|
| + aura::Window* window = wm::GetActiveWindow();
|
| + if (!window)
|
| + break;
|
| + internal::SnapSizer sizer(window,
|
| + gfx::Point(),
|
| + action == SNAP_WINDOW_LEFT ? internal::SnapSizer::LEFT_EDGE :
|
| + internal::SnapSizer::RIGHT_EDGE,
|
| + shell->GetGridSize());
|
| + window->SetBounds(sizer.target_bounds());
|
| + break;
|
| + }
|
| case SHOW_OAK:
|
| if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshEnableOak))
|
| oak::ShowOakWindow();
|
|
|