Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 1412623006: Developer Feature: Add Debug Accelerators to Toggle Touchscreen/Touchpad On or Off (CrOS) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sadrul's comment Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | ui/events/base_event_utils.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 return CanHandleSwitchIme(ime_control_delegate_.get(), accelerator); 979 return CanHandleSwitchIme(ime_control_delegate_.get(), accelerator);
980 case TOGGLE_APP_LIST: 980 case TOGGLE_APP_LIST:
981 return CanHandleToggleAppList(accelerator, previous_accelerator); 981 return CanHandleToggleAppList(accelerator, previous_accelerator);
982 case WINDOW_CYCLE_SNAP_DOCK_LEFT: 982 case WINDOW_CYCLE_SNAP_DOCK_LEFT:
983 case WINDOW_CYCLE_SNAP_DOCK_RIGHT: 983 case WINDOW_CYCLE_SNAP_DOCK_RIGHT:
984 return CanHandleWindowSnapOrDock(); 984 return CanHandleWindowSnapOrDock();
985 case WINDOW_POSITION_CENTER: 985 case WINDOW_POSITION_CENTER:
986 return CanHandlePositionCenter(); 986 return CanHandlePositionCenter();
987 #if defined(OS_CHROMEOS) 987 #if defined(OS_CHROMEOS)
988 case DEBUG_ADD_REMOVE_DISPLAY: 988 case DEBUG_ADD_REMOVE_DISPLAY:
989 case DEBUG_TOGGLE_TOUCH_PAD:
990 case DEBUG_TOGGLE_TOUCH_SCREEN:
989 case DEBUG_TOGGLE_UNIFIED_DESKTOP: 991 case DEBUG_TOGGLE_UNIFIED_DESKTOP:
990 return debug::DebugAcceleratorsEnabled(); 992 return debug::DebugAcceleratorsEnabled();
991 case DISABLE_CAPS_LOCK: 993 case DISABLE_CAPS_LOCK:
992 return CanHandleDisableCapsLock(previous_accelerator); 994 return CanHandleDisableCapsLock(previous_accelerator);
993 case LOCK_SCREEN: 995 case LOCK_SCREEN:
994 return CanHandleLock(); 996 return CanHandleLock();
995 case SILENCE_SPOKEN_FEEDBACK: 997 case SILENCE_SPOKEN_FEEDBACK:
996 return CanHandleSilenceSpokenFeedback(); 998 return CanHandleSilenceSpokenFeedback();
997 case SWITCH_TO_PREVIOUS_USER: 999 case SWITCH_TO_PREVIOUS_USER:
998 case SWITCH_TO_NEXT_USER: 1000 case SWITCH_TO_NEXT_USER:
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 HandlePositionCenter(); 1237 HandlePositionCenter();
1236 break; 1238 break;
1237 #if defined(OS_CHROMEOS) 1239 #if defined(OS_CHROMEOS)
1238 case BRIGHTNESS_DOWN: 1240 case BRIGHTNESS_DOWN:
1239 HandleBrightnessDown(brightness_control_delegate_.get(), accelerator); 1241 HandleBrightnessDown(brightness_control_delegate_.get(), accelerator);
1240 break; 1242 break;
1241 case BRIGHTNESS_UP: 1243 case BRIGHTNESS_UP:
1242 HandleBrightnessUp(brightness_control_delegate_.get(), accelerator); 1244 HandleBrightnessUp(brightness_control_delegate_.get(), accelerator);
1243 break; 1245 break;
1244 case DEBUG_ADD_REMOVE_DISPLAY: 1246 case DEBUG_ADD_REMOVE_DISPLAY:
1245 debug::PerformDebugActionIfEnabled(action); 1247 case DEBUG_TOGGLE_TOUCH_PAD:
1246 break; 1248 case DEBUG_TOGGLE_TOUCH_SCREEN:
1247 case DEBUG_TOGGLE_UNIFIED_DESKTOP: 1249 case DEBUG_TOGGLE_UNIFIED_DESKTOP:
1248 debug::PerformDebugActionIfEnabled(action); 1250 debug::PerformDebugActionIfEnabled(action);
1249 break; 1251 break;
1250 case DISABLE_CAPS_LOCK: 1252 case DISABLE_CAPS_LOCK:
1251 HandleDisableCapsLock(); 1253 HandleDisableCapsLock();
1252 break; 1254 break;
1253 case DISABLE_GPU_WATCHDOG: 1255 case DISABLE_GPU_WATCHDOG:
1254 Shell::GetInstance()->gpu_support()->DisableGpuWatchdog(); 1256 Shell::GetInstance()->gpu_support()->DisableGpuWatchdog();
1255 break; 1257 break;
1256 case KEYBOARD_BRIGHTNESS_DOWN: 1258 case KEYBOARD_BRIGHTNESS_DOWN:
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 } 1394 }
1393 1395
1394 void AcceleratorController::SetKeyboardBrightnessControlDelegate( 1396 void AcceleratorController::SetKeyboardBrightnessControlDelegate(
1395 scoped_ptr<KeyboardBrightnessControlDelegate> 1397 scoped_ptr<KeyboardBrightnessControlDelegate>
1396 keyboard_brightness_control_delegate) { 1398 keyboard_brightness_control_delegate) {
1397 keyboard_brightness_control_delegate_ = 1399 keyboard_brightness_control_delegate_ =
1398 keyboard_brightness_control_delegate.Pass(); 1400 keyboard_brightness_control_delegate.Pass();
1399 } 1401 }
1400 1402
1401 } // namespace ash 1403 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | ui/events/base_event_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698