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

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

Issue 1022333002: Initial CL for Data Saver (Flywheel) prompt when cellular network detected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from two reviewers Created 5 years, 9 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/debug.h" 9 #include "ash/debug.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
11 #include "ash/desktop_background/user_wallpaper_delegate.h" 11 #include "ash/desktop_background/user_wallpaper_delegate.h"
12 #include "ash/display/display_manager.h" 12 #include "ash/display/display_manager.h"
13 #include "ash/host/ash_window_tree_host.h" 13 #include "ash/host/ash_window_tree_host.h"
14 #include "ash/root_window_controller.h" 14 #include "ash/root_window_controller.h"
15 #include "ash/shell.h" 15 #include "ash/shell.h"
16 #include "ash/wm/window_util.h" 16 #include "ash/wm/window_util.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "chromeos/network/network_state_handler.h"
18 #include "third_party/skia/include/core/SkColor.h" 19 #include "third_party/skia/include/core/SkColor.h"
19 #include "third_party/skia/include/core/SkPaint.h" 20 #include "third_party/skia/include/core/SkPaint.h"
20 #include "ui/aura/window.h" 21 #include "ui/aura/window.h"
21 #include "ui/aura/window_event_dispatcher.h" 22 #include "ui/aura/window_event_dispatcher.h"
22 #include "ui/compositor/debug_utils.h" 23 #include "ui/compositor/debug_utils.h"
23 #include "ui/compositor/layer.h" 24 #include "ui/compositor/layer.h"
24 #include "ui/gfx/canvas.h" 25 #include "ui/gfx/canvas.h"
25 #include "ui/gfx/image/image_skia.h" 26 #include "ui/gfx/image/image_skia.h"
26 #include "ui/views/debug_utils.h" 27 #include "ui/views/debug_utils.h"
27 #include "ui/views/widget/widget.h" 28 #include "ui/views/widget/widget.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 break; 161 break;
161 case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE: 162 case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE:
162 HandleToggleDesktopBackgroundMode(); 163 HandleToggleDesktopBackgroundMode();
163 break; 164 break;
164 case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR: 165 case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR:
165 Shell::GetInstance()->display_manager()->ToggleDisplayScaleFactor(); 166 Shell::GetInstance()->display_manager()->ToggleDisplayScaleFactor();
166 break; 167 break;
167 case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN: 168 case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN:
168 Shell::GetPrimaryRootWindowController()->ash_host()->ToggleFullScreen(); 169 Shell::GetPrimaryRootWindowController()->ash_host()->ToggleFullScreen();
169 break; 170 break;
171 case DEBUG_TOGGLE_SHOW_DATASAVER_PROMPT:
172 chromeos::NetworkHandler::Get()->network_state_handler()
173 ->DebugNotifyNetworkPropertiesUpdated();
stevenjb 2015/03/25 17:57:08 The correlation between "show dataserver prompt" a
Greg Levin 2015/04/03 18:28:37 All hotkey code deleted.
174 break;
170 case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS: 175 case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS:
171 ToggleShowDebugBorders(); 176 ToggleShowDebugBorders();
172 break; 177 break;
173 case DEBUG_TOGGLE_SHOW_FPS_COUNTER: 178 case DEBUG_TOGGLE_SHOW_FPS_COUNTER:
174 ToggleShowFpsCounter(); 179 ToggleShowFpsCounter();
175 break; 180 break;
176 case DEBUG_TOGGLE_SHOW_PAINT_RECTS: 181 case DEBUG_TOGGLE_SHOW_PAINT_RECTS:
177 ToggleShowPaintRects(); 182 ToggleShowPaintRects();
178 break; 183 break;
179 default: 184 default:
180 break; 185 break;
181 } 186 }
182 } 187 }
183 188
184 } // namespace debug 189 } // namespace debug
185 } // namespace ash 190 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698