Chromium Code Reviews| 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 "content/public/common/associated_interface_registry.h" | 9 #include "content/public/common/associated_interface_registry.h" |
| 10 #include "content/public/renderer/render_frame.h" | 10 #include "content/public/renderer/render_frame.h" |
| 11 #include "content/shell/common/shell_messages.h" | 11 #include "content/shell/common/shell_messages.h" |
|
alexmos
2017/06/27 21:35:48
nit: is this still needed?
Łukasz Anforowicz
2017/06/27 22:17:41
Good catch - this is no longer needed (together wi
| |
| 12 #include "content/shell/renderer/layout_test/blink_test_runner.h" | 12 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 13 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer. h" | 13 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer. h" |
| 14 #include "content/shell/test_runner/web_test_interfaces.h" | 14 #include "content/shell/test_runner/web_test_interfaces.h" |
| 15 #include "content/shell/test_runner/web_test_runner.h" | 15 #include "content/shell/test_runner/web_test_runner.h" |
| 16 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
| 17 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 17 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 LayoutTestRenderFrameObserver::LayoutTestRenderFrameObserver( | 21 LayoutTestRenderFrameObserver::LayoutTestRenderFrameObserver( |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 37 | 37 |
| 38 void LayoutTestRenderFrameObserver::BindRequest( | 38 void LayoutTestRenderFrameObserver::BindRequest( |
| 39 mojom::LayoutTestControlAssociatedRequest request) { | 39 mojom::LayoutTestControlAssociatedRequest request) { |
| 40 binding_.Bind(std::move(request)); | 40 binding_.Bind(std::move(request)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void LayoutTestRenderFrameObserver::OnDestruct() { | 43 void LayoutTestRenderFrameObserver::OnDestruct() { |
| 44 delete this; | 44 delete this; |
| 45 } | 45 } |
| 46 | 46 |
| 47 void LayoutTestRenderFrameObserver::LayoutDumpRequest() { | 47 void LayoutTestRenderFrameObserver::DumpFrameLayout( |
| 48 DumpFrameLayoutCallback callback) { | |
| 48 std::string dump = | 49 std::string dump = |
| 49 LayoutTestRenderThreadObserver::GetInstance() | 50 LayoutTestRenderThreadObserver::GetInstance() |
| 50 ->test_interfaces() | 51 ->test_interfaces() |
| 51 ->TestRunner() | 52 ->TestRunner() |
| 52 ->DumpLayout(render_frame()->GetWebFrame()); | 53 ->DumpLayout(render_frame()->GetWebFrame()); |
| 53 Send(new ShellViewHostMsg_LayoutDumpResponse(routing_id(), dump)); | 54 std::move(callback).Run(dump); |
| 54 } | 55 } |
| 55 | 56 |
| 56 void LayoutTestRenderFrameObserver::ReplicateTestConfiguration( | 57 void LayoutTestRenderFrameObserver::ReplicateTestConfiguration( |
| 57 mojom::ShellTestConfigurationPtr config) { | 58 mojom::ShellTestConfigurationPtr config) { |
| 58 BlinkTestRunner::Get(render_frame()->GetRenderView()) | 59 BlinkTestRunner::Get(render_frame()->GetRenderView()) |
| 59 ->OnReplicateTestConfiguration(std::move(config)); | 60 ->OnReplicateTestConfiguration(std::move(config)); |
| 60 } | 61 } |
| 61 | 62 |
| 62 void LayoutTestRenderFrameObserver::SetTestConfiguration( | 63 void LayoutTestRenderFrameObserver::SetTestConfiguration( |
| 63 mojom::ShellTestConfigurationPtr config) { | 64 mojom::ShellTestConfigurationPtr config) { |
| 64 BlinkTestRunner::Get(render_frame()->GetRenderView()) | 65 BlinkTestRunner::Get(render_frame()->GetRenderView()) |
| 65 ->OnSetTestConfiguration(std::move(config)); | 66 ->OnSetTestConfiguration(std::move(config)); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void LayoutTestRenderFrameObserver::SetupSecondaryRenderer() { | 69 void LayoutTestRenderFrameObserver::SetupSecondaryRenderer() { |
| 69 BlinkTestRunner::Get(render_frame()->GetRenderView()) | 70 BlinkTestRunner::Get(render_frame()->GetRenderView()) |
| 70 ->OnSetupSecondaryRenderer(); | 71 ->OnSetupSecondaryRenderer(); |
| 71 } | 72 } |
| 72 | 73 |
| 73 } // namespace content | 74 } // namespace content |
| OLD | NEW |