| 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/accelerator_commands.h" | 5 #include "ash/accelerators/accelerator_commands.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_table.h" | 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" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 void PrintUIHierarchies() { | 128 void PrintUIHierarchies() { |
| 129 // This is a separate command so the user only has to hit one key to generate | 129 // This is a separate command so the user only has to hit one key to generate |
| 130 // all the logs. Developers use the individual dumps repeatedly, so keep | 130 // all the logs. Developers use the individual dumps repeatedly, so keep |
| 131 // those as separate commands to avoid spamming their logs. | 131 // those as separate commands to avoid spamming their logs. |
| 132 HandlePrintLayerHierarchy(); | 132 HandlePrintLayerHierarchy(); |
| 133 HandlePrintWindowHierarchy(); | 133 HandlePrintWindowHierarchy(); |
| 134 HandlePrintViewHierarchy(); | 134 HandlePrintViewHierarchy(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool DebugAcceleratorsEnabled() { | 137 bool DebugAcceleratorsEnabled() { |
| 138 return CommandLine::ForCurrentProcess()->HasSwitch( | 138 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 139 switches::kAshDebugShortcuts); | 139 switches::kAshDebugShortcuts); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void PerformDebugAction(int action) { | 142 void PerformDebugAction(int action) { |
| 143 if (!DebugAcceleratorsEnabled()) | 143 if (!DebugAcceleratorsEnabled()) |
| 144 return; | 144 return; |
| 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: |
| (...skipping 27 matching lines...) Expand all Loading... |
| 176 case DEBUG_TOGGLE_SHOW_PAINT_RECTS: | 176 case DEBUG_TOGGLE_SHOW_PAINT_RECTS: |
| 177 ToggleShowPaintRects(); | 177 ToggleShowPaintRects(); |
| 178 break; | 178 break; |
| 179 default: | 179 default: |
| 180 break; | 180 break; |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace debug | 184 } // namespace debug |
| 185 } // namespace ash | 185 } // namespace ash |
| OLD | NEW |