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

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

Issue 2118593002: mash: Migrate ShellDelegate ownership and access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 5 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/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/common/shell_delegate.h"
9 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
10 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
11 #include "ash/debug.h" 12 #include "ash/debug.h"
12 #include "ash/desktop_background/desktop_background_controller.h" 13 #include "ash/desktop_background/desktop_background_controller.h"
13 #include "ash/desktop_background/user_wallpaper_delegate.h" 14 #include "ash/desktop_background/user_wallpaper_delegate.h"
14 #include "ash/display/display_manager.h" 15 #include "ash/display/display_manager.h"
15 #include "ash/host/ash_window_tree_host.h" 16 #include "ash/host/ash_window_tree_host.h"
16 #include "ash/root_window_controller.h" 17 #include "ash/root_window_controller.h"
17 #include "ash/shell.h" 18 #include "ash/shell.h"
18 #include "ash/shell_delegate.h"
19 #include "ash/system/toast/toast_data.h" 19 #include "ash/system/toast/toast_data.h"
20 #include "ash/system/toast/toast_manager.h" 20 #include "ash/system/toast/toast_manager.h"
21 #include "ash/wm/window_util.h" 21 #include "ash/wm/window_util.h"
22 #include "base/command_line.h" 22 #include "base/command_line.h"
23 #include "base/metrics/user_metrics.h" 23 #include "base/metrics/user_metrics.h"
24 #include "base/metrics/user_metrics_action.h" 24 #include "base/metrics/user_metrics_action.h"
25 #include "third_party/skia/include/core/SkColor.h" 25 #include "third_party/skia/include/core/SkColor.h"
26 #include "third_party/skia/include/core/SkPaint.h" 26 #include "third_party/skia/include/core/SkPaint.h"
27 #include "ui/aura/window.h" 27 #include "ui/aura/window.h"
28 #include "ui/aura/window_event_dispatcher.h" 28 #include "ui/aura/window_event_dispatcher.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 CreateWallpaperImage(SK_ColorGREEN, SK_ColorRED), 127 CreateWallpaperImage(SK_ColorGREEN, SK_ColorRED),
128 wallpaper::WALLPAPER_LAYOUT_CENTER_CROPPED); 128 wallpaper::WALLPAPER_LAYOUT_CENTER_CROPPED);
129 break; 129 break;
130 } 130 }
131 } 131 }
132 132
133 #if defined(OS_CHROMEOS) 133 #if defined(OS_CHROMEOS)
134 134
135 void HandleToggleTouchpad() { 135 void HandleToggleTouchpad() {
136 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchpad")); 136 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchpad"));
137 137 ash::WmShell::Get()->delegate()->ToggleTouchpad();
138 ash::Shell::GetInstance()->delegate()->ToggleTouchpad();
139 } 138 }
140 139
141 void HandleToggleTouchscreen() { 140 void HandleToggleTouchscreen() {
142 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen")); 141 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen"));
143 142 ash::WmShell::Get()->delegate()->ToggleTouchscreen();
144 ash::Shell::GetInstance()->delegate()->ToggleTouchscreen();
145 } 143 }
146 144
147 void HandleToggleToggleTouchView() { 145 void HandleToggleToggleTouchView() {
148 MaximizeModeController* controller = 146 MaximizeModeController* controller =
149 WmShell::Get()->maximize_mode_controller(); 147 WmShell::Get()->maximize_mode_controller();
150 controller->EnableMaximizeModeWindowManager( 148 controller->EnableMaximizeModeWindowManager(
151 !controller->IsMaximizeModeWindowManagerEnabled()); 149 !controller->IsMaximizeModeWindowManagerEnabled());
152 } 150 }
153 151
154 #endif // defined(OS_CHROMEOS) 152 #endif // defined(OS_CHROMEOS)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 case DEBUG_TOGGLE_SHOW_PAINT_RECTS: 221 case DEBUG_TOGGLE_SHOW_PAINT_RECTS:
224 ToggleShowPaintRects(); 222 ToggleShowPaintRects();
225 break; 223 break;
226 default: 224 default:
227 break; 225 break;
228 } 226 }
229 } 227 }
230 228
231 } // namespace debug 229 } // namespace debug
232 } // namespace ash 230 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698