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> |
11 | 11 |
12 #include "ash/accelerators/accelerator_commands.h" | 12 #include "ash/accelerators/accelerator_commands.h" |
13 #include "ash/accelerators/accelerator_table.h" | 13 #include "ash/accelerators/accelerator_table.h" |
14 #include "ash/accelerators/debug_commands.h" | 14 #include "ash/accelerators/debug_commands.h" |
15 #include "ash/ash_switches.h" | 15 #include "ash/ash_switches.h" |
16 #include "ash/caps_lock_delegate.h" | 16 #include "ash/caps_lock_delegate.h" |
17 #include "ash/debug.h" | 17 #include "ash/debug.h" |
18 #include "ash/display/display_controller.h" | 18 #include "ash/display/display_controller.h" |
19 #include "ash/display/display_manager.h" | 19 #include "ash/display/display_manager.h" |
20 #include "ash/focus_cycler.h" | 20 #include "ash/focus_cycler.h" |
| 21 #include "ash/gpu_support.h" |
21 #include "ash/ime_control_delegate.h" | 22 #include "ash/ime_control_delegate.h" |
22 #include "ash/magnifier/magnification_controller.h" | 23 #include "ash/magnifier/magnification_controller.h" |
23 #include "ash/magnifier/partial_magnification_controller.h" | 24 #include "ash/magnifier/partial_magnification_controller.h" |
24 #include "ash/media_delegate.h" | 25 #include "ash/media_delegate.h" |
25 #include "ash/multi_profile_uma.h" | 26 #include "ash/multi_profile_uma.h" |
26 #include "ash/new_window_delegate.h" | 27 #include "ash/new_window_delegate.h" |
27 #include "ash/root_window_controller.h" | 28 #include "ash/root_window_controller.h" |
28 #include "ash/rotator/screen_rotation.h" | 29 #include "ash/rotator/screen_rotation.h" |
29 #include "ash/screenshot_delegate.h" | 30 #include "ash/screenshot_delegate.h" |
30 #include "ash/session_state_delegate.h" | 31 #include "ash/session_state_delegate.h" |
(...skipping 17 matching lines...) Expand all Loading... |
48 #include "ash/wm/overview/window_selector_controller.h" | 49 #include "ash/wm/overview/window_selector_controller.h" |
49 #include "ash/wm/partial_screenshot_view.h" | 50 #include "ash/wm/partial_screenshot_view.h" |
50 #include "ash/wm/power_button_controller.h" | 51 #include "ash/wm/power_button_controller.h" |
51 #include "ash/wm/window_cycle_controller.h" | 52 #include "ash/wm/window_cycle_controller.h" |
52 #include "ash/wm/window_state.h" | 53 #include "ash/wm/window_state.h" |
53 #include "ash/wm/window_util.h" | 54 #include "ash/wm/window_util.h" |
54 #include "ash/wm/workspace/snap_sizer.h" | 55 #include "ash/wm/workspace/snap_sizer.h" |
55 #include "base/bind.h" | 56 #include "base/bind.h" |
56 #include "base/command_line.h" | 57 #include "base/command_line.h" |
57 #include "base/metrics/user_metrics.h" | 58 #include "base/metrics/user_metrics.h" |
58 #include "content/public/browser/gpu_data_manager.h" | |
59 #include "ui/aura/env.h" | 59 #include "ui/aura/env.h" |
60 #include "ui/aura/root_window.h" | 60 #include "ui/aura/root_window.h" |
61 #include "ui/base/accelerators/accelerator.h" | 61 #include "ui/base/accelerators/accelerator.h" |
62 #include "ui/base/accelerators/accelerator_manager.h" | 62 #include "ui/base/accelerators/accelerator_manager.h" |
63 #include "ui/compositor/debug_utils.h" | 63 #include "ui/compositor/debug_utils.h" |
64 #include "ui/compositor/layer.h" | 64 #include "ui/compositor/layer.h" |
65 #include "ui/compositor/layer_animation_sequence.h" | 65 #include "ui/compositor/layer_animation_sequence.h" |
66 #include "ui/compositor/layer_animator.h" | 66 #include "ui/compositor/layer_animator.h" |
67 #include "ui/events/event.h" | 67 #include "ui/events/event.h" |
68 #include "ui/events/keycodes/keyboard_codes.h" | 68 #include "ui/events/keycodes/keyboard_codes.h" |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 case TOGGLE_WIFI: | 961 case TOGGLE_WIFI: |
962 Shell::GetInstance()->system_tray_notifier()->NotifyRequestToggleWifi(); | 962 Shell::GetInstance()->system_tray_notifier()->NotifyRequestToggleWifi(); |
963 return true; | 963 return true; |
964 case TOUCH_HUD_CLEAR: | 964 case TOUCH_HUD_CLEAR: |
965 return HandleTouchHudClear(); | 965 return HandleTouchHudClear(); |
966 case TOUCH_HUD_MODE_CHANGE: | 966 case TOUCH_HUD_MODE_CHANGE: |
967 return HandleTouchHudModeChange(); | 967 return HandleTouchHudModeChange(); |
968 case TOUCH_HUD_PROJECTION_TOGGLE: | 968 case TOUCH_HUD_PROJECTION_TOGGLE: |
969 return HandleTouchHudProjectToggle(); | 969 return HandleTouchHudProjectToggle(); |
970 case DISABLE_GPU_WATCHDOG: | 970 case DISABLE_GPU_WATCHDOG: |
971 content::GpuDataManager::GetInstance()->DisableGpuWatchdog(); | 971 Shell::GetInstance()->gpu_support()->DisableGpuWatchdog(); |
972 return true; | 972 return true; |
973 #endif // OS_CHROMEOS | 973 #endif // OS_CHROMEOS |
974 case OPEN_FEEDBACK_PAGE: | 974 case OPEN_FEEDBACK_PAGE: |
975 return HandleOpenFeedbackPage(); | 975 return HandleOpenFeedbackPage(); |
976 case EXIT: | 976 case EXIT: |
977 // UMA metrics are recorded in the handler. | 977 // UMA metrics are recorded in the handler. |
978 exit_warning_handler_.HandleAccelerator(); | 978 exit_warning_handler_.HandleAccelerator(); |
979 return true; | 979 return true; |
980 case NEW_INCOGNITO_WINDOW: | 980 case NEW_INCOGNITO_WINDOW: |
981 return HandleNewIncognitoWindow(); | 981 return HandleNewIncognitoWindow(); |
(...skipping 224 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 |