Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 10736061: Enable debug logging for views::View (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile glitch in release Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698