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

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

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: add SetTouchscreenEnabled and OnLoginStateChanged 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') | ash/common/shell_delegate.h » ('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..e5869e4565b849655a615ea4fc520fc9f0cd19fa 100644
--- a/ash/common/accelerators/debug_commands.cc
+++ b/ash/common/accelerators/debug_commands.cc
@@ -128,7 +128,9 @@ void HandleToggleTouchpad() {
void HandleToggleTouchscreen() {
base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen"));
- ash::WmShell::Get()->delegate()->ToggleTouchscreen();
+ ShellDelegate* delegate = WmShell::Get()->delegate();
+ const bool touch_screen_status = delegate->IsTouchscreenEnabled();
+ delegate->SetTouchscreenEnabled(!touch_screen_status);
Daniel Erat 2016/11/30 22:58:07 nit: i'd just inline this, e.g. delegate->SetTo
Qiang(Joe) Xu 2016/12/02 17:42:51 Done.
}
void HandleToggleTouchView() {
« no previous file with comments | « no previous file | ash/common/shell_delegate.h » ('j') | ash/common/shell_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698