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

Unified Diff: ash/common/accelerators/debug_commands.cc

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: add local pref for TouchScreenEnabled Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/shell_delegate.h » ('j') | chrome/browser/chromeos/system/input_device_settings.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/debug_commands.cc
diff --git a/ash/common/accelerators/debug_commands.cc b/ash/common/accelerators/debug_commands.cc
index fc5270b015784f5002af85dd09cfb479a2b87dbf..397a3be46c273494441891675e83116511cb3464 100644
--- a/ash/common/accelerators/debug_commands.cc
+++ b/ash/common/accelerators/debug_commands.cc
@@ -128,7 +128,10 @@ void HandleToggleTouchpad() {
void HandleToggleTouchscreen() {
base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen"));
- ash::WmShell::Get()->delegate()->ToggleTouchscreen();
+ ShellDelegate* delegate = WmShell::Get()->delegate();
+ delegate->SetTouchscreenEnabledInPrefs(
+ !delegate->IsTouchscreenEnabledInPrefs(false), false);
afakhry 2016/12/02 20:04:27 Nit: false /* is_local */.
Qiang(Joe) Xu 2016/12/02 21:23:13 Done.
+ delegate->UpdateTouchscreenStatusFromPrefs();
}
void HandleToggleTouchView() {
« no previous file with comments | « no previous file | ash/common/shell_delegate.h » ('j') | chrome/browser/chromeos/system/input_device_settings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698