| OLD | NEW |
| 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" |
| 6 |
| 5 #include "ash/accelerators/accelerator_commands.h" | 7 #include "ash/accelerators/accelerator_commands.h" |
| 6 | |
| 7 #include "ash/accelerators/accelerator_table.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" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 HandlePrintLayerHierarchy(); | 132 HandlePrintLayerHierarchy(); |
| 133 HandlePrintWindowHierarchy(); | 133 HandlePrintWindowHierarchy(); |
| 134 HandlePrintViewHierarchy(); | 134 HandlePrintViewHierarchy(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool DebugAcceleratorsEnabled() { | 137 bool DebugAcceleratorsEnabled() { |
| 138 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 138 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 139 switches::kAshDebugShortcuts); | 139 switches::kAshDebugShortcuts); |
| 140 } | 140 } |
| 141 | 141 |
| 142 bool PerformDebugAction(int action) { | 142 bool PerformDebugAction(AcceleratorAction action) { |
| 143 if (!DebugAcceleratorsEnabled()) | 143 if (!DebugAcceleratorsEnabled()) |
| 144 return false; | 144 return false; |
| 145 | 145 |
| 146 switch (action) { | 146 switch (action) { |
| 147 #if defined(OS_CHROMEOS) | 147 #if defined(OS_CHROMEOS) |
| 148 case DEBUG_ADD_REMOVE_DISPLAY: | 148 case DEBUG_ADD_REMOVE_DISPLAY: |
| 149 Shell::GetInstance()->display_manager()->AddRemoveDisplay(); | 149 Shell::GetInstance()->display_manager()->AddRemoveDisplay(); |
| 150 break; | 150 break; |
| 151 #endif | 151 #endif |
| 152 case DEBUG_PRINT_LAYER_HIERARCHY: | 152 case DEBUG_PRINT_LAYER_HIERARCHY: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 177 ToggleShowPaintRects(); | 177 ToggleShowPaintRects(); |
| 178 break; | 178 break; |
| 179 default: | 179 default: |
| 180 return false; | 180 return false; |
| 181 } | 181 } |
| 182 return true; | 182 return true; |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace debug | 185 } // namespace debug |
| 186 } // namespace ash | 186 } // namespace ash |
| OLD | NEW |