Commit 3d526d34 authored by yoshiki iguchi's avatar yoshiki iguchi Committed by Commit Bot

Show WindowStateType in the ash window tree for debugging by shortcut

If the flag is enabled, when pressing Ctrl-Shift-Alt-W, an ash window
tree is dumped to the UI log. This CL adds WindowStateType of each
window to that log.

Bug: none
Test: Press Ctrl-Shift-Alt-W and see the type is correctly dumped in log

Change-Id: I813539a02378800fb124e133fadd850853b04059
Reviewed-on: https://chromium-review.googlesource.com/c/1322259
Commit-Queue: Yoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606339}
parent 77e3d644
......@@ -13,8 +13,10 @@
#include "ash/system/toast/toast_manager.h"
#include "ash/touch/touch_devices_controller.h"
#include "ash/wallpaper/wallpaper_controller.h"
#include "ash/wm/focus_rules.h"
#include "ash/wm/tablet_mode/tablet_mode_controller.h"
#include "ash/wm/widget_finder.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "ash/ws/window_service_owner.h"
#include "base/command_line.h"
......@@ -72,8 +74,10 @@ void PrintWindowHierarchy(ws::WindowService* window_service,
const gfx::Vector2dF& subpixel_position_offset =
window->layer()->subpixel_position_offset();
*out << indent_str << name << " (" << window << ")"
<< " type=" << window->type()
<< ((window == active_window) ? " [active]" : "")
<< " type=" << window->type();
if (ash::IsToplevelWindow(window))
*out << " " << wm::GetWindowState(window)->GetStateType();
*out << ((window == active_window) ? " [active]" : "")
<< ((window == focused_window) ? " [focused]" : "")
<< (window->IsVisible() ? " visible" : "") << " "
<< window->bounds().ToString();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment