| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 bool HandleToggleRootWindowFullScreen() { | 573 bool HandleToggleRootWindowFullScreen() { |
| 574 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->ToggleFullScreen(); | 574 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->ToggleFullScreen(); |
| 575 return true; | 575 return true; |
| 576 } | 576 } |
| 577 | 577 |
| 578 bool HandleWindowSnap(int action) { | 578 bool HandleWindowSnap(int action) { |
| 579 wm::WindowState* window_state = wm::GetActiveWindowState(); | 579 wm::WindowState* window_state = wm::GetActiveWindowState(); |
| 580 // Disable window snapping shortcut key for full screen window due to | 580 // Disable window snapping shortcut key for full screen window due to |
| 581 // http://crbug.com/135487. | 581 // http://crbug.com/135487. |
| 582 if (!window_state || | 582 if (!window_state || |
| 583 window_state->window()->type() != aura::client::WINDOW_TYPE_NORMAL || | 583 window_state->window()->type() != ui::wm::WINDOW_TYPE_NORMAL || |
| 584 window_state->IsFullscreen()) { | 584 window_state->IsFullscreen()) { |
| 585 return false; | 585 return false; |
| 586 } | 586 } |
| 587 | 587 |
| 588 if (action == WINDOW_SNAP_LEFT) { | 588 if (action == WINDOW_SNAP_LEFT) { |
| 589 content::RecordAction(UserMetricsAction("Accel_Window_Snap_Left")); | 589 content::RecordAction(UserMetricsAction("Accel_Window_Snap_Left")); |
| 590 } else { | 590 } else { |
| 591 content::RecordAction(UserMetricsAction("Accel_Window_Snap_Right")); | 591 content::RecordAction(UserMetricsAction("Accel_Window_Snap_Right")); |
| 592 } | 592 } |
| 593 | 593 |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 keyboard_brightness_control_delegate) { | 1206 keyboard_brightness_control_delegate) { |
| 1207 keyboard_brightness_control_delegate_ = | 1207 keyboard_brightness_control_delegate_ = |
| 1208 keyboard_brightness_control_delegate.Pass(); | 1208 keyboard_brightness_control_delegate.Pass(); |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 bool AcceleratorController::CanHandleAccelerators() const { | 1211 bool AcceleratorController::CanHandleAccelerators() const { |
| 1212 return true; | 1212 return true; |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 } // namespace ash | 1215 } // namespace ash |
| OLD | NEW |