| 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 <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 } | 502 } |
| 503 | 503 |
| 504 void HandleToggleFullscreen(const ui::Accelerator& accelerator) { | 504 void HandleToggleFullscreen(const ui::Accelerator& accelerator) { |
| 505 if (accelerator.key_code() == ui::VKEY_MEDIA_LAUNCH_APP2) | 505 if (accelerator.key_code() == ui::VKEY_MEDIA_LAUNCH_APP2) |
| 506 base::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); | 506 base::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); |
| 507 accelerators::ToggleFullscreen(); | 507 accelerators::ToggleFullscreen(); |
| 508 } | 508 } |
| 509 | 509 |
| 510 void HandleToggleOverview() { | 510 void HandleToggleOverview() { |
| 511 base::RecordAction(base::UserMetricsAction("Accel_Overview_F5")); | 511 base::RecordAction(base::UserMetricsAction("Accel_Overview_F5")); |
| 512 Shell::GetInstance()->window_selector_controller()->ToggleOverview(); | 512 WmShell::Get()->window_selector_controller()->ToggleOverview(); |
| 513 } | 513 } |
| 514 | 514 |
| 515 bool CanHandleWindowSnapOrDock() { | 515 bool CanHandleWindowSnapOrDock() { |
| 516 wm::WindowState* window_state = wm::GetActiveWindowState(); | 516 wm::WindowState* window_state = wm::GetActiveWindowState(); |
| 517 // Disable window snapping shortcut key for full screen window due to | 517 // Disable window snapping shortcut key for full screen window due to |
| 518 // http://crbug.com/135487. | 518 // http://crbug.com/135487. |
| 519 return (window_state && window_state->IsUserPositionable() && | 519 return (window_state && window_state->IsUserPositionable() && |
| 520 !window_state->IsFullscreen()); | 520 !window_state->IsFullscreen()); |
| 521 } | 521 } |
| 522 | 522 |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 void AcceleratorController::SetKeyboardBrightnessControlDelegate( | 1463 void AcceleratorController::SetKeyboardBrightnessControlDelegate( |
| 1464 std::unique_ptr<KeyboardBrightnessControlDelegate> | 1464 std::unique_ptr<KeyboardBrightnessControlDelegate> |
| 1465 keyboard_brightness_control_delegate) { | 1465 keyboard_brightness_control_delegate) { |
| 1466 keyboard_brightness_control_delegate_ = | 1466 keyboard_brightness_control_delegate_ = |
| 1467 std::move(keyboard_brightness_control_delegate); | 1467 std::move(keyboard_brightness_control_delegate); |
| 1468 } | 1468 } |
| 1469 | 1469 |
| 1470 } // namespace ash | 1470 } // namespace ash |
| OLD | NEW |