OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/layout_test/layout_test_render_frame_observer.h
" | 5 #include "content/shell/renderer/layout_test/layout_test_render_frame_observer.h
" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "components/test_runner/layout_dump.h" | 9 #include "components/test_runner/layout_dump.h" |
10 #include "components/test_runner/layout_dump_flags.h" | 10 #include "components/test_runner/layout_dump_flags.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 bool handled = true; | 33 bool handled = true; |
34 IPC_BEGIN_MESSAGE_MAP(LayoutTestRenderFrameObserver, message) | 34 IPC_BEGIN_MESSAGE_MAP(LayoutTestRenderFrameObserver, message) |
35 IPC_MESSAGE_HANDLER(ShellViewMsg_LayoutDumpRequest, OnLayoutDumpRequest) | 35 IPC_MESSAGE_HANDLER(ShellViewMsg_LayoutDumpRequest, OnLayoutDumpRequest) |
36 IPC_MESSAGE_UNHANDLED(handled = false) | 36 IPC_MESSAGE_UNHANDLED(handled = false) |
37 IPC_END_MESSAGE_MAP() | 37 IPC_END_MESSAGE_MAP() |
38 | 38 |
39 return handled; | 39 return handled; |
40 } | 40 } |
41 | 41 |
42 void LayoutTestRenderFrameObserver::OnLayoutDumpRequest( | 42 void LayoutTestRenderFrameObserver::OnLayoutDumpRequest( |
43 test_runner::LayoutDumpFlags layout_dump_flags) { | 43 const test_runner::LayoutDumpFlags& layout_dump_flags) { |
44 std::string dump = | 44 std::string dump = |
45 test_runner::DumpLayout(render_frame()->GetWebFrame(), layout_dump_flags); | 45 test_runner::DumpLayout(render_frame()->GetWebFrame(), layout_dump_flags); |
46 Send(new ShellViewHostMsg_LayoutDumpResponse(routing_id(), dump)); | 46 Send(new ShellViewHostMsg_LayoutDumpResponse(routing_id(), dump)); |
47 } | 47 } |
48 | 48 |
49 } // namespace content | 49 } // namespace content |
OLD | NEW |