| 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" | |
| 18 #include "ash/root_window_controller.h" | 17 #include "ash/root_window_controller.h" |
| 18 #include "ash/wm/window_properties.h" |
| 19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
| 20 #include "base/metrics/user_metrics.h" | 20 #include "base/metrics/user_metrics.h" |
| 21 #include "base/metrics/user_metrics_action.h" | 21 #include "base/metrics/user_metrics_action.h" |
| 22 #include "base/strings/utf_string_conversions.h" | 22 #include "base/strings/utf_string_conversions.h" |
| 23 #include "ui/compositor/debug_utils.h" | 23 #include "ui/compositor/debug_utils.h" |
| 24 #include "ui/compositor/layer.h" | 24 #include "ui/compositor/layer.h" |
| 25 #include "ui/gfx/canvas.h" | 25 #include "ui/gfx/canvas.h" |
| 26 #include "ui/gfx/image/image_skia.h" | 26 #include "ui/gfx/image/image_skia.h" |
| 27 #include "ui/views/debug_utils.h" | 27 #include "ui/views/debug_utils.h" |
| 28 #include "ui/views/widget/widget.h" | 28 #include "ui/views/widget/widget.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 56 std::ostringstream* out) { | 56 std::ostringstream* out) { |
| 57 std::string indent_str(indent, ' '); | 57 std::string indent_str(indent, ' '); |
| 58 std::string name(window->GetName()); | 58 std::string name(window->GetName()); |
| 59 if (name.empty()) | 59 if (name.empty()) |
| 60 name = "\"\""; | 60 name = "\"\""; |
| 61 *out << indent_str << name << " (" << window << ")" | 61 *out << indent_str << name << " (" << window << ")" |
| 62 << " type=" << window->GetType() | 62 << " type=" << window->GetType() |
| 63 << ((window == active_window) ? " [active] " : " ") | 63 << ((window == active_window) ? " [active] " : " ") |
| 64 << (window->IsVisible() ? " visible " : " ") | 64 << (window->IsVisible() ? " visible " : " ") |
| 65 << window->GetBounds().ToString() | 65 << window->GetBounds().ToString() |
| 66 << (window->GetBoolProperty( | 66 << (window->aura_window()->GetProperty(kSnapChildrenToPixelBoundary) |
| 67 WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUNDARY) | |
| 68 ? " [snapped] " | 67 ? " [snapped] " |
| 69 : "") | 68 : "") |
| 70 << ", subpixel offset=" | 69 << ", subpixel offset=" |
| 71 << window->GetLayer()->subpixel_position_offset().ToString() << '\n'; | 70 << window->GetLayer()->subpixel_position_offset().ToString() << '\n'; |
| 72 | 71 |
| 73 for (WmWindow* child : window->GetChildren()) | 72 for (WmWindow* child : window->GetChildren()) |
| 74 PrintWindowHierarchy(active_window, child, indent + 3, out); | 73 PrintWindowHierarchy(active_window, child, indent + 3, out); |
| 75 } | 74 } |
| 76 | 75 |
| 77 void HandlePrintWindowHierarchy() { | 76 void HandlePrintWindowHierarchy() { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 case DEBUG_TRIGGER_CRASH: | 206 case DEBUG_TRIGGER_CRASH: |
| 208 HandleTriggerCrash(); | 207 HandleTriggerCrash(); |
| 209 break; | 208 break; |
| 210 default: | 209 default: |
| 211 break; | 210 break; |
| 212 } | 211 } |
| 213 } | 212 } |
| 214 | 213 |
| 215 } // namespace debug | 214 } // namespace debug |
| 216 } // namespace ash | 215 } // namespace ash |
| OLD | NEW |