| Index: ash/accelerators/accelerator_controller.cc
|
| diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
|
| index 85c70e362bd17f55242ead3cc02355ea59d6734a..83d18628c288136c2031b3f9c363876fead8ac78 100644
|
| --- a/ash/accelerators/accelerator_controller.cc
|
| +++ b/ash/accelerators/accelerator_controller.cc
|
| @@ -43,6 +43,8 @@
|
| #include "ui/compositor/layer_animation_sequence.h"
|
| #include "ui/compositor/layer_animator.h"
|
| #include "ui/oak/oak.h"
|
| +#include "ui/views/debug_utils.h"
|
| +#include "ui/views/widget/widget.h"
|
|
|
| #if defined(OS_CHROMEOS)
|
| #include "chromeos/display/output_configurator.h"
|
| @@ -247,6 +249,19 @@ bool HandlePrintLayerHierarchy() {
|
| return true;
|
| }
|
|
|
| +bool HandlePrintViewHierarchy() {
|
| + aura::Window* default_container =
|
| + Shell::GetPrimaryRootWindowController()->GetContainer(
|
| + internal::kShellWindowId_DefaultContainer);
|
| + if (default_container->children().empty())
|
| + return true;
|
| + aura::Window* browser_frame = default_container->children()[0];
|
| + views::Widget* browser_widget =
|
| + views::Widget::GetWidgetForNativeWindow(browser_frame);
|
| + views::PrintViewHierarchy(browser_widget->GetRootView());
|
| + return true;
|
| +}
|
| +
|
| void PrintWindowHierarchy(aura::Window* window, int indent) {
|
| std::string indent_str(indent, ' ');
|
| DLOG(INFO) << indent_str << window->name() << " type " << window->type()
|
| @@ -617,6 +632,8 @@ bool AcceleratorController::PerformAction(int action,
|
| #if !defined(NDEBUG)
|
| case PRINT_LAYER_HIERARCHY:
|
| return HandlePrintLayerHierarchy();
|
| + case PRINT_VIEW_HIERARCHY:
|
| + return HandlePrintViewHierarchy();
|
| case PRINT_WINDOW_HIERARCHY:
|
| return HandlePrintWindowHierarchy();
|
| #endif
|
|
|