Chromium Code Reviews| 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/common/accelerators/debug_commands.h" | 5 #include "ash/common/accelerators/debug_commands.h" |
| 6 | 6 |
| 7 #include "ash/common/accelerators/accelerator_commands.h" | 7 #include "ash/common/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/shell_delegate.h" |
| 10 #include "ash/common/system/toast/toast_data.h" | 10 #include "ash/common/system/toast/toast_data.h" |
| 11 #include "ash/common/system/toast/toast_manager.h" | 11 #include "ash/common/system/toast/toast_manager.h" |
| 12 #include "ash/common/wallpaper/wallpaper_controller.h" | 12 #include "ash/common/wallpaper/wallpaper_controller.h" |
| 13 #include "ash/common/wallpaper/wallpaper_delegate.h" | 13 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 14 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 14 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
| 15 #include "ash/common/wm_shell.h" | 15 #include "ash/common/wm_shell.h" |
| 16 #include "ash/common/wm_window.h" | 16 #include "ash/common/wm_window.h" |
| 17 #include "ash/common/wm_window_property.h" | 17 #include "ash/common/wm_window_property.h" |
| 18 #include "ash/root_window_controller.h" | 18 #include "ash/root_window_controller.h" |
| 19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
| 20 #include "base/debug/crash_logging.h" | |
| 20 #include "base/metrics/user_metrics.h" | 21 #include "base/metrics/user_metrics.h" |
| 21 #include "base/metrics/user_metrics_action.h" | 22 #include "base/metrics/user_metrics_action.h" |
| 22 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
| 23 #include "ui/compositor/debug_utils.h" | 24 #include "ui/compositor/debug_utils.h" |
| 24 #include "ui/compositor/layer.h" | 25 #include "ui/compositor/layer.h" |
| 25 #include "ui/gfx/canvas.h" | 26 #include "ui/gfx/canvas.h" |
| 26 #include "ui/gfx/image/image_skia.h" | 27 #include "ui/gfx/image/image_skia.h" |
| 27 #include "ui/views/debug_utils.h" | 28 #include "ui/views/debug_utils.h" |
| 28 #include "ui/views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
| 29 | 30 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 } | 143 } |
| 143 | 144 |
| 144 void HandleToggleTouchView() { | 145 void HandleToggleTouchView() { |
| 145 MaximizeModeController* controller = | 146 MaximizeModeController* controller = |
| 146 WmShell::Get()->maximize_mode_controller(); | 147 WmShell::Get()->maximize_mode_controller(); |
| 147 controller->EnableMaximizeModeWindowManager( | 148 controller->EnableMaximizeModeWindowManager( |
| 148 !controller->IsMaximizeModeWindowManagerEnabled()); | 149 !controller->IsMaximizeModeWindowManagerEnabled()); |
| 149 } | 150 } |
| 150 | 151 |
| 151 void HandleTriggerCrash() { | 152 void HandleTriggerCrash() { |
| 153 // Allow manual testing of crash keys. | |
| 154 base::debug::SetCrashKeyValue("url-chunk", "crash-url-chunk-for-testing"); | |
|
hashimoto
2017/03/02 07:42:22
This line depends on chrome/common/crash_keys.cc t
| |
| 152 CHECK(false) << "Intentional crash via debug accelerator."; | 155 CHECK(false) << "Intentional crash via debug accelerator."; |
| 153 } | 156 } |
| 154 | 157 |
| 155 } // namespace | 158 } // namespace |
| 156 | 159 |
| 157 void PrintUIHierarchies() { | 160 void PrintUIHierarchies() { |
| 158 // 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 |
| 159 // all the logs. Developers use the individual dumps repeatedly, so keep | 162 // all the logs. Developers use the individual dumps repeatedly, so keep |
| 160 // those as separate commands to avoid spamming their logs. | 163 // those as separate commands to avoid spamming their logs. |
| 161 HandlePrintLayerHierarchy(); | 164 HandlePrintLayerHierarchy(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 case DEBUG_TRIGGER_CRASH: | 210 case DEBUG_TRIGGER_CRASH: |
| 208 HandleTriggerCrash(); | 211 HandleTriggerCrash(); |
| 209 break; | 212 break; |
| 210 default: | 213 default: |
| 211 break; | 214 break; |
| 212 } | 215 } |
| 213 } | 216 } |
| 214 | 217 |
| 215 } // namespace debug | 218 } // namespace debug |
| 216 } // namespace ash | 219 } // namespace ash |
| OLD | NEW |