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 #ifndef CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_H_ | 5 #ifndef CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_H_ |
6 #define CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_H_ | 6 #define CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_H_ |
7 #pragma once | |
8 | 7 |
9 #include "content/public/renderer/render_view_observer.h" | 8 #include "content/public/renderer/render_view_observer.h" |
10 | 9 |
11 namespace content { | 10 namespace content { |
12 | 11 |
13 // This is the renderer side of the layout test controller. | 12 // This is the renderer side of the layout test controller. |
14 class LayoutTestController : public RenderViewObserver { | 13 class LayoutTestController : public RenderViewObserver { |
15 public: | 14 public: |
16 explicit LayoutTestController(RenderView* render_view); | 15 explicit LayoutTestController(RenderView* render_view); |
17 virtual ~LayoutTestController(); | 16 virtual ~LayoutTestController(); |
18 | 17 |
19 // RenderViewObserver implementation. | 18 // RenderViewObserver implementation. |
20 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 19 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
21 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; | 20 virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; |
22 virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE; | 21 virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE; |
23 | 22 |
24 private: | 23 private: |
25 // Message handlers. | 24 // Message handlers. |
26 void OnCaptureTextDump(bool as_text, bool printing, bool recursive); | 25 void OnCaptureTextDump(bool as_text, bool printing, bool recursive); |
27 void OnCaptureImageDump(const std::string& expected_pixel_hash); | 26 void OnCaptureImageDump(const std::string& expected_pixel_hash); |
28 | 27 |
29 DISALLOW_COPY_AND_ASSIGN(LayoutTestController); | 28 DISALLOW_COPY_AND_ASSIGN(LayoutTestController); |
30 }; | 29 }; |
31 | 30 |
32 } // namespace content | 31 } // namespace content |
33 | 32 |
34 #endif // CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_H_ | 33 #endif // CONTENT_SHELL_LAYOUT_TEST_CONTROLLER_H_ |
OLD | NEW |