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

Unified Diff: content/shell/shell_render_view_host_observer.cc

Issue 9289045: Add option --dump-render-tree to content_shell to dump the render tree as text. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 11 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 | « content/shell/shell_render_view_host_observer.h ('k') | content/shell/shell_render_view_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_render_view_host_observer.cc
diff --git a/content/shell/shell_render_view_host_observer.cc b/content/shell/shell_render_view_host_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f6138514f10ecc729c32d575e0ccbbcdc841a43e
--- /dev/null
+++ b/content/shell/shell_render_view_host_observer.cc
@@ -0,0 +1,35 @@
+// 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.
+
+#include "content/shell/shell_render_view_host_observer.h"
+
+#include <iostream>
+
+#include "content/shell/shell_messages.h"
+
+namespace content {
+
+ShellRenderViewHostObserver::ShellRenderViewHostObserver(
+ RenderViewHost* render_view_host)
+ : RenderViewHostObserver(render_view_host) {
+}
+
+ShellRenderViewHostObserver::~ShellRenderViewHostObserver() {
+}
+
+bool ShellRenderViewHostObserver::OnMessageReceived(
+ const IPC::Message& message) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(ShellRenderViewHostObserver, message)
+ IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+void ShellRenderViewHostObserver::OnTextDump(const std::string& dump) {
+ std::cout << dump;
+}
+
+} // namespace content
« no previous file with comments | « content/shell/shell_render_view_host_observer.h ('k') | content/shell/shell_render_view_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698