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

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

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: nits 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') | no next file with comments »
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..b3ea038a0058b82204576ff1267e2e99de58ab39 100644
--- a/ash/common/accelerators/debug_commands.cc
+++ b/ash/common/accelerators/debug_commands.cc
@@ -128,7 +128,11 @@ 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 /* use_local_state */),
+ false /* use_local_state */);
+ delegate->UpdateTouchscreenStatusFromPrefs();
}
void HandleToggleTouchView() {
« no previous file with comments | « no previous file | ash/common/shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698