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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/common/shell_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /* use_local_state */),
134 false /* use_local_state */);
135 delegate->UpdateTouchscreenStatusFromPrefs();
132 } 136 }
133 137
134 void HandleToggleTouchView() { 138 void HandleToggleTouchView() {
135 MaximizeModeController* controller = 139 MaximizeModeController* controller =
136 WmShell::Get()->maximize_mode_controller(); 140 WmShell::Get()->maximize_mode_controller();
137 controller->EnableMaximizeModeWindowManager( 141 controller->EnableMaximizeModeWindowManager(
138 !controller->IsMaximizeModeWindowManagerEnabled()); 142 !controller->IsMaximizeModeWindowManagerEnabled());
139 } 143 }
140 144
141 #endif // defined(OS_CHROMEOS) 145 #endif // defined(OS_CHROMEOS)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 case DEBUG_PRINT_WINDOW_HIERARCHY: 198 case DEBUG_PRINT_WINDOW_HIERARCHY:
195 HandlePrintWindowHierarchy(); 199 HandlePrintWindowHierarchy();
196 break; 200 break;
197 default: 201 default:
198 break; 202 break;
199 } 203 }
200 } 204 }
201 205
202 } // namespace debug 206 } // namespace debug
203 } // namespace ash 207 } // namespace ash
OLDNEW
« 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