summaryrefslogtreecommitdiffstats
path: root/views/view.h
diff options
context:
space:
mode:
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 20:47:07 +0000
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 20:47:07 +0000
commit36de1cbdf69c7bfba95f5b7c200e8ca78f1b9f9d (patch)
treeccee046cec894e881cf41d5e997b5f583a7ce5bb /views/view.h
parentb063495d5d9e8da8bf09fcafa70e15ad4f703159 (diff)
downloadchromium_src-36de1cbdf69c7bfba95f5b7c200e8ca78f1b9f9d.zip
chromium_src-36de1cbdf69c7bfba95f5b7c200e8ca78f1b9f9d.tar.gz
chromium_src-36de1cbdf69c7bfba95f5b7c200e8ca78f1b9f9d.tar.bz2
Improvements to debugging code which prints the views hierarchy.
BUG=None TEST=None Review URL: http://codereview.chromium.org/7906015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r--views/view.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/views/view.h b/views/view.h
index a9cf33a..2ebd832 100644
--- a/views/view.h
+++ b/views/view.h
@@ -1078,6 +1078,22 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
static int GetHorizontalDragThreshold();
static int GetVerticalDragThreshold();
+ // Debugging -----------------------------------------------------------------
+
+#if !defined(NDEBUG)
+ // Returns string containing a graph of the views hierarchy in graphViz DOT
+ // language (http://graphviz.org/). Can be called within debugger and save
+ // to a file to compile/view.
+ // Note: Assumes initial call made with first = true.
+ virtual std::string PrintViewGraph(bool first);
+
+ // Some classes may own an object which contains the children to displayed in
+ // the views hierarchy. The above function gives the class the flexibility to
+ // decide which object should be used to obtain the children, but this
+ // function makes the decision explicit.
+ std::string DoPrintViewGraph(bool first, View* view_with_children);
+#endif
+
private:
friend class internal::NativeWidgetView;
friend class internal::RootView;
@@ -1296,16 +1312,6 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// supported drag operations. When done, OnDragDone is invoked.
void DoDrag(const MouseEvent& event, const gfx::Point& press_pt);
- // Debugging -----------------------------------------------------------------
-
-#if defined(TOUCH_DEBUG)
- // Returns string containing a graph of the views hierarchy in graphViz DOT
- // language (http://graphviz.org/). Can be called within debugger and save
- // to a file to compile/view.
- // Note: Assumes initial call made with first = true.
- std::string PrintViewGraph(bool first);
-#endif
-
//////////////////////////////////////////////////////////////////////////////
// Creation and lifetime -----------------------------------------------------