Chromium Code Reviews| Index: ash/accelerators/accelerator_controller.cc |
| diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc |
| index f761acb721e26ca11f9439431a32ed91097fc1cf..94494123619ffa08744dedc554b9097636b23652 100644 |
| --- a/ash/accelerators/accelerator_controller.cc |
| +++ b/ash/accelerators/accelerator_controller.cc |
| @@ -842,7 +842,7 @@ bool AcceleratorController::PerformAction(int action, |
| case WINDOW_SNAP_LEFT: |
| case WINDOW_SNAP_RIGHT: { |
| wm::WindowState* window_state = wm::GetActiveWindowState(); |
| - // Disable window docking shortcut key for full screen window due to |
| + // Disable window snapping shortcut key for full screen window due to |
| // http://crbug.com/135487. |
| if (!window_state || |
| window_state->window()->type() != aura::client::WINDOW_TYPE_NORMAL || |
| @@ -871,7 +871,10 @@ bool AcceleratorController::PerformAction(int action, |
| } |
| case WINDOW_POSITION_CENTER: { |
| aura::Window* window = wm::GetActiveWindow(); |
| - if (window) { |
| + // Centering a window does not maintain state and state change |
| + // notifications are not sent. Disable centering for docked windows. |
|
pkotwicz
2013/11/21 23:46:50
I find it hard to understand the comment. This may
varkha
2013/11/22 03:43:38
Done.
|
| + content::RecordAction(content::UserMetricsAction("Accel_Center")); |
| + if (window && !wm::GetWindowState(window)->IsDocked()) { |
| wm::CenterWindow(window); |
| return true; |
| } |