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

Side by Side Diff: content/shell/shell_render_view_host_observer.cc

Issue 10413050: Make content_shell talk to run_webkit_tests.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_browser_main.cc ('k') | content/shell/shell_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/shell_render_view_host_observer.h" 5 #include "content/shell/shell_render_view_host_observer.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 20 matching lines...) Expand all
31 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DumpAsText, OnDumpAsText) 31 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DumpAsText, OnDumpAsText)
32 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DumpChildFramesAsText, 32 IPC_MESSAGE_HANDLER(ShellViewHostMsg_DumpChildFramesAsText,
33 OnDumpChildFramesAsText) 33 OnDumpChildFramesAsText)
34 IPC_MESSAGE_HANDLER(ShellViewHostMsg_WaitUntilDone, OnWaitUntilDone) 34 IPC_MESSAGE_HANDLER(ShellViewHostMsg_WaitUntilDone, OnWaitUntilDone)
35 IPC_MESSAGE_UNHANDLED(handled = false) 35 IPC_MESSAGE_UNHANDLED(handled = false)
36 IPC_END_MESSAGE_MAP() 36 IPC_END_MESSAGE_MAP()
37 return handled; 37 return handled;
38 } 38 }
39 39
40 void ShellRenderViewHostObserver::OnTextDump(const std::string& dump) { 40 void ShellRenderViewHostObserver::OnTextDump(const std::string& dump) {
41 std::cout << "Content-Type: text/plain\n";
41 std::cout << dump; 42 std::cout << dump;
43 std::cout << "#EOF\n";
44 std::cerr << "#EOF\n";
45
42 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); 46 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
43 } 47 }
44 48
45 void ShellRenderViewHostObserver::OnNotifyDone() { 49 void ShellRenderViewHostObserver::OnNotifyDone() {
46 render_view_host()->Send( 50 render_view_host()->Send(
47 new ShellViewMsg_CaptureTextDump(render_view_host()->GetRoutingID(), 51 new ShellViewMsg_CaptureTextDump(render_view_host()->GetRoutingID(),
48 dump_child_frames_)); 52 dump_child_frames_));
49 } 53 }
50 54
51 void ShellRenderViewHostObserver::OnDumpAsText() { 55 void ShellRenderViewHostObserver::OnDumpAsText() {
52 } 56 }
53 57
54 void ShellRenderViewHostObserver::OnDumpChildFramesAsText() { 58 void ShellRenderViewHostObserver::OnDumpChildFramesAsText() {
55 dump_child_frames_ = true; 59 dump_child_frames_ = true;
56 } 60 }
57 61
58 void ShellRenderViewHostObserver::OnWaitUntilDone() { 62 void ShellRenderViewHostObserver::OnWaitUntilDone() {
59 Shell* shell = Shell::FromRenderViewHost(render_view_host()); 63 Shell* shell = Shell::FromRenderViewHost(render_view_host());
60 shell->set_wait_until_done(); 64 shell->set_wait_until_done();
61 } 65 }
62 66
63 } // namespace content 67 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_browser_main.cc ('k') | content/shell/shell_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698