summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 15:11:56 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 15:11:56 +0000
commitd3d5f7043959d5f74b350edad300e71f437da3e6 (patch)
tree88c885bbcf6ae03376347739347dc2010fb14776 /ui
parentddbf2053813d3238cb72d84108815965747ba1f5 (diff)
downloadchromium_src-d3d5f7043959d5f74b350edad300e71f437da3e6.zip
chromium_src-d3d5f7043959d5f74b350edad300e71f437da3e6.tar.gz
chromium_src-d3d5f7043959d5f74b350edad300e71f437da3e6.tar.bz2
Enable debug logging for views::View
Enables the alt-ctrl-shift-V accelerator for dumping views::View hierarchy to console. BUG=none TEST=Bring up Aura build on Linux, type alt-ctrl-shift-V and check logs. R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10736061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146575 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/views/debug_utils.cc7
-rw-r--r--ui/views/debug_utils.h8
-rw-r--r--ui/views/views.gyp4
3 files changed, 10 insertions, 9 deletions
diff --git a/ui/views/debug_utils.cc b/ui/views/debug_utils.cc
index ad00563..8259d62 100644
--- a/ui/views/debug_utils.cc
+++ b/ui/views/debug_utils.cc
@@ -12,10 +12,9 @@
#include <iostream>
#endif
-namespace views {
-
#ifndef NDEBUG
+namespace views {
namespace {
void PrintViewHierarchyImp(const View* view, int indent) {
std::wostringstream buf;
@@ -35,7 +34,7 @@ void PrintViewHierarchyImp(const View* view, int indent) {
std::cout << buf.str() << std::endl;
for (int i = 0, count = view->child_count(); i < count; ++i)
- PrintViewHierarchyImp(view->GetChildViewAt(i), indent + 2);
+ PrintViewHierarchyImp(view->child_at(i), indent + 2);
}
void PrintFocusHierarchyImp(const View* view, int indent) {
@@ -55,7 +54,7 @@ void PrintFocusHierarchyImp(const View* view, int indent) {
std::cout << buf.str() << std::endl;
if (view->child_count() > 0)
- PrintFocusHierarchyImp(view->GetChildViewAt(0), indent + 2);
+ PrintFocusHierarchyImp(view->child_at(0), indent + 2);
const View* next_focusable = view->GetNextFocusableView();
if (next_focusable)
diff --git a/ui/views/debug_utils.h b/ui/views/debug_utils.h
index 4b998ce..2f574a1 100644
--- a/ui/views/debug_utils.h
+++ b/ui/views/debug_utils.h
@@ -1,10 +1,12 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_VIEWS_DEBUG_UTILS_H_
#define UI_VIEWS_DEBUG_UTILS_H_
+#include "ui/views/views_export.h"
+
namespace views {
class View;
@@ -12,10 +14,10 @@ class View;
#ifndef NDEBUG
// Log the view hierarchy.
-void PrintViewHierarchy(const View* view);
+VIEWS_EXPORT void PrintViewHierarchy(const View* view);
// Log the focus traversal hierarchy.
-void PrintFocusHierarchy(const View* view);
+VIEWS_EXPORT void PrintFocusHierarchy(const View* view);
#endif // NDEBUG
diff --git a/ui/views/views.gyp b/ui/views/views.gyp
index 395ca85..50d7298 100644
--- a/ui/views/views.gyp
+++ b/ui/views/views.gyp
@@ -235,8 +235,8 @@
'controls/tree/tree_view_win.h',
'controls/webview/webview.cc',
'controls/webview/webview.h',
- #'debug_utils.cc',
- #'debug_utils.h',
+ 'debug_utils.cc',
+ 'debug_utils.h',
'drag_controller.h',
'drag_utils.cc',
'drag_utils.h',