OLD | NEW |
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/browser/renderer_host/render_view_host.h" | 10 #include "content/browser/renderer_host/render_view_host.h" |
(...skipping 26 matching lines...) Expand all Loading... |
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 << dump; | 41 std::cout << dump; |
42 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); | 42 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
43 } | 43 } |
44 | 44 |
45 void ShellRenderViewHostObserver::OnNotifyDone() { | 45 void ShellRenderViewHostObserver::OnNotifyDone() { |
46 render_view_host()->Send( | 46 render_view_host()->Send( |
47 new ShellViewMsg_CaptureTextDump(render_view_host()->routing_id(), | 47 new ShellViewMsg_CaptureTextDump(render_view_host()->GetRoutingID(), |
48 dump_child_frames_)); | 48 dump_child_frames_)); |
49 } | 49 } |
50 | 50 |
51 void ShellRenderViewHostObserver::OnDumpAsText() { | 51 void ShellRenderViewHostObserver::OnDumpAsText() { |
52 } | 52 } |
53 | 53 |
54 void ShellRenderViewHostObserver::OnDumpChildFramesAsText() { | 54 void ShellRenderViewHostObserver::OnDumpChildFramesAsText() { |
55 dump_child_frames_ = true; | 55 dump_child_frames_ = true; |
56 } | 56 } |
57 | 57 |
58 void ShellRenderViewHostObserver::OnWaitUntilDone() { | 58 void ShellRenderViewHostObserver::OnWaitUntilDone() { |
59 Shell* shell = Shell::FromRenderViewHost(render_view_host()); | 59 Shell* shell = Shell::FromRenderViewHost(render_view_host()); |
60 shell->set_wait_until_done(); | 60 shell->set_wait_until_done(); |
61 } | 61 } |
62 | 62 |
63 } // namespace content | 63 } // namespace content |
OLD | NEW |