| 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 #ifndef CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_FRAME_OBSERVER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_FRAME_OBSERVER_H_ |
| 6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_FRAME_OBSERVER_H_ | 6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_FRAME_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/renderer/render_frame_observer.h" | 9 #include "content/public/renderer/render_frame_observer.h" |
| 10 #include "content/shell/common/layout_test.mojom.h" | 10 |
| 11 #include "mojo/public/cpp/bindings/associated_binding.h" | 11 namespace IPC { |
| 12 class Message; |
| 13 } // namespace IPC |
| 12 | 14 |
| 13 namespace content { | 15 namespace content { |
| 16 struct ShellTestConfiguration; |
| 17 class RenderFrame; |
| 18 struct ShellTestConfiguration; |
| 14 | 19 |
| 15 class LayoutTestRenderFrameObserver : public RenderFrameObserver, | 20 class LayoutTestRenderFrameObserver : public RenderFrameObserver { |
| 16 public mojom::LayoutTestControl { | |
| 17 public: | 21 public: |
| 18 explicit LayoutTestRenderFrameObserver(RenderFrame* render_frame); | 22 explicit LayoutTestRenderFrameObserver(RenderFrame* render_frame); |
| 19 ~LayoutTestRenderFrameObserver() override; | 23 ~LayoutTestRenderFrameObserver() override {} |
| 24 |
| 25 // RenderFrameObserver implementation. |
| 26 bool OnMessageReceived(const IPC::Message& message) override; |
| 20 | 27 |
| 21 private: | 28 private: |
| 22 // RenderFrameObserver implementation. | 29 // RenderFrameObserver implementation. |
| 23 void OnDestruct() override; | 30 void OnDestruct() override; |
| 24 | 31 |
| 25 void LayoutDumpRequest() override; | 32 void OnLayoutDumpRequest(); |
| 26 void SetTestConfiguration(mojom::ShellTestConfigurationPtr config) override; | 33 void OnSetTestConfiguration(const ShellTestConfiguration& test_config); |
| 27 void ReplicateTestConfiguration( | 34 void OnReplicateTestConfiguration(const ShellTestConfiguration& test_config); |
| 28 mojom::ShellTestConfigurationPtr config) override; | 35 void OnSetupSecondaryRenderer(); |
| 29 void SetupSecondaryRenderer() override; | |
| 30 void BindRequest(mojom::LayoutTestControlAssociatedRequest request); | |
| 31 | 36 |
| 32 mojo::AssociatedBinding<mojom::LayoutTestControl> binding_; | |
| 33 DISALLOW_COPY_AND_ASSIGN(LayoutTestRenderFrameObserver); | 37 DISALLOW_COPY_AND_ASSIGN(LayoutTestRenderFrameObserver); |
| 34 }; | 38 }; |
| 35 | 39 |
| 36 } // namespace content | 40 } // namespace content |
| 37 | 41 |
| 38 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_FRAME_OBSERVER_
H_ | 42 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_LAYOUT_TEST_RENDER_FRAME_OBSERVER_
H_ |
| OLD | NEW |