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

Side by Side Diff: ash/accelerators/debug_commands.cc

Issue 2906803002: Rename MaximizeMode to TabletMode (Closed)
Patch Set: updated filter Created 3 years, 7 months 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/accelerators/debug_commands.h" 5 #include "ash/accelerators/debug_commands.h"
6 6
7 #include "ash/accelerators/accelerator_commands.h" 7 #include "ash/accelerators/accelerator_commands.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "ash/shell_delegate.h" 11 #include "ash/shell_delegate.h"
12 #include "ash/system/toast/toast_data.h" 12 #include "ash/system/toast/toast_data.h"
13 #include "ash/system/toast/toast_manager.h" 13 #include "ash/system/toast/toast_manager.h"
14 #include "ash/wallpaper/wallpaper_controller.h" 14 #include "ash/wallpaper/wallpaper_controller.h"
15 #include "ash/wallpaper/wallpaper_delegate.h" 15 #include "ash/wallpaper/wallpaper_delegate.h"
16 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 16 #include "ash/wm/tablet_mode/tablet_mode_controller.h"
17 #include "ash/wm/widget_finder.h" 17 #include "ash/wm/widget_finder.h"
18 #include "ash/wm/window_properties.h" 18 #include "ash/wm/window_properties.h"
19 #include "ash/wm/window_util.h" 19 #include "ash/wm/window_util.h"
20 #include "base/command_line.h" 20 #include "base/command_line.h"
21 #include "base/metrics/user_metrics.h" 21 #include "base/metrics/user_metrics.h"
22 #include "base/metrics/user_metrics_action.h" 22 #include "base/metrics/user_metrics_action.h"
23 #include "base/strings/utf_string_conversions.h" 23 #include "base/strings/utf_string_conversions.h"
24 #include "ui/compositor/debug_utils.h" 24 #include "ui/compositor/debug_utils.h"
25 #include "ui/compositor/layer.h" 25 #include "ui/compositor/layer.h"
26 #include "ui/gfx/canvas.h" 26 #include "ui/gfx/canvas.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void HandleToggleTouchscreen() { 139 void HandleToggleTouchscreen() {
140 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen")); 140 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen"));
141 ShellDelegate* delegate = Shell::Get()->shell_delegate(); 141 ShellDelegate* delegate = Shell::Get()->shell_delegate();
142 delegate->SetTouchscreenEnabledInPrefs( 142 delegate->SetTouchscreenEnabledInPrefs(
143 !delegate->IsTouchscreenEnabledInPrefs(false /* use_local_state */), 143 !delegate->IsTouchscreenEnabledInPrefs(false /* use_local_state */),
144 false /* use_local_state */); 144 false /* use_local_state */);
145 delegate->UpdateTouchscreenStatusFromPrefs(); 145 delegate->UpdateTouchscreenStatusFromPrefs();
146 } 146 }
147 147
148 void HandleToggleTouchView() { 148 void HandleToggleTouchView() {
149 MaximizeModeController* controller = Shell::Get()->maximize_mode_controller(); 149 TabletModeController* controller = Shell::Get()->tablet_mode_controller();
150 controller->EnableMaximizeModeWindowManager( 150 controller->EnableTabletModeWindowManager(
151 !controller->IsMaximizeModeWindowManagerEnabled()); 151 !controller->IsTabletModeWindowManagerEnabled());
152 } 152 }
153 153
154 void HandleTriggerCrash() { 154 void HandleTriggerCrash() {
155 CHECK(false) << "Intentional crash via debug accelerator."; 155 CHECK(false) << "Intentional crash via debug accelerator.";
156 } 156 }
157 157
158 } // namespace 158 } // namespace
159 159
160 void PrintUIHierarchies() { 160 void PrintUIHierarchies() {
161 // This is a separate command so the user only has to hit one key to generate 161 // This is a separate command so the user only has to hit one key to generate
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 case DEBUG_TRIGGER_CRASH: 210 case DEBUG_TRIGGER_CRASH:
211 HandleTriggerCrash(); 211 HandleTriggerCrash();
212 break; 212 break;
213 default: 213 default:
214 break; 214 break;
215 } 215 }
216 } 216 }
217 217
218 } // namespace debug 218 } // namespace debug
219 } // namespace ash 219 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698