From bba695021894b40a0873d3a38e9da3c1a64ab644 Mon Sep 17 00:00:00 2001 From: "wjmaclean@chromium.org" Date: Fri, 6 May 2011 12:58:57 +0000 Subject: Add method to print view tree in graphViz format. BUG=none TEST=none [Debug code, user assumes own risks.] Review URL: http://codereview.chromium.org/6930044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84434 0039d316-1c4b-4281-b951-d872f2087c98 --- views/view.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'views/view.h') diff --git a/views/view.h b/views/view.h index 3722e986..6c0b950 100644 --- a/views/view.h +++ b/views/view.h @@ -1295,6 +1295,16 @@ class View : public AcceleratorTarget { // 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 ----------------------------------------------------- -- cgit v1.1