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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/common/accelerators/debug_commands.h" 5 #include "ash/common/accelerators/debug_commands.h"
6 6
7 #include "ash/common/accelerators/accelerator_commands.h" 7 #include "ash/common/accelerators/accelerator_commands.h"
8 #include "ash/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/common/shell_delegate.h" 9 #include "ash/common/shell_delegate.h"
10 #include "ash/common/system/toast/toast_data.h" 10 #include "ash/common/system/toast/toast_data.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 #if defined(OS_CHROMEOS) 122 #if defined(OS_CHROMEOS)
123 123
124 void HandleToggleTouchpad() { 124 void HandleToggleTouchpad() {
125 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchpad")); 125 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchpad"));
126 ash::WmShell::Get()->delegate()->ToggleTouchpad(); 126 ash::WmShell::Get()->delegate()->ToggleTouchpad();
127 } 127 }
128 128
129 void HandleToggleTouchscreen() { 129 void HandleToggleTouchscreen() {
130 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen")); 130 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen"));
131 ash::WmShell::Get()->delegate()->ToggleTouchscreen(); 131 ShellDelegate* delegate = WmShell::Get()->delegate();
132 delegate->SetTouchscreenEnabledInPrefs(
133 !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.
134 delegate->UpdateTouchscreenStatusFromPrefs();
132 } 135 }
133 136
134 void HandleToggleTouchView() { 137 void HandleToggleTouchView() {
135 MaximizeModeController* controller = 138 MaximizeModeController* controller =
136 WmShell::Get()->maximize_mode_controller(); 139 WmShell::Get()->maximize_mode_controller();
137 controller->EnableMaximizeModeWindowManager( 140 controller->EnableMaximizeModeWindowManager(
138 !controller->IsMaximizeModeWindowManagerEnabled()); 141 !controller->IsMaximizeModeWindowManagerEnabled());
139 } 142 }
140 143
141 #endif // defined(OS_CHROMEOS) 144 #endif // defined(OS_CHROMEOS)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 case DEBUG_PRINT_WINDOW_HIERARCHY: 197 case DEBUG_PRINT_WINDOW_HIERARCHY:
195 HandlePrintWindowHierarchy(); 198 HandlePrintWindowHierarchy();
196 break; 199 break;
197 default: 200 default:
198 break; 201 break;
199 } 202 }
200 } 203 }
201 204
202 } // namespace debug 205 } // namespace debug
203 } // namespace ash 206 } // namespace ash
OLDNEW
« 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