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..7806a13a666f1d4f75e1d3d6139ac169cc36d119 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 || |
| @@ -870,8 +870,10 @@ bool AcceleratorController::PerformAction(int action, |
| return true; |
| } |
| case WINDOW_POSITION_CENTER: { |
| + content::RecordAction(content::UserMetricsAction("Accel_Center")); |
|
varkha
2013/11/22 03:43:38
I have already added UMA count for this. I moved i
|
| aura::Window* window = wm::GetActiveWindow(); |
| - if (window) { |
| + // Docked windows do not support centering and ignore accelerator. |
| + if (window && !wm::GetWindowState(window)->IsDocked()) { |
| wm::CenterWindow(window); |
| return true; |
| } |