1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_INTERFACES_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_INTERFACES_H_
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
13 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
15 #if defined(OS_MACOSX)
16 #include "content/shell/renderer/test_runner/mock_web_theme_engine_mac.h"
18 #include "content/shell/renderer/test_runner/mock_web_theme_engine.h"
30 class AccessibilityController;
32 class GamepadController;
34 class TextInputController;
35 class WebTestDelegate;
36 class WebTestProxyBase;
38 class TestInterfaces {
43 void SetWebView(blink::WebView* web_view, WebTestProxyBase* proxy);
44 void SetDelegate(WebTestDelegate* delegate);
45 void BindTo(blink::WebFrame* frame);
46 void ResetTestHelperControllers();
48 void SetTestIsRunning(bool running);
49 void ConfigureForTestWithURL(const blink::WebURL& test_url,
50 bool generate_pixels);
52 void WindowOpened(WebTestProxyBase* proxy);
53 void WindowClosed(WebTestProxyBase* proxy);
55 AccessibilityController* GetAccessibilityController();
56 EventSender* GetEventSender();
57 TestRunner* GetTestRunner();
58 WebTestDelegate* GetDelegate();
59 WebTestProxyBase* GetProxy();
60 const std::vector<WebTestProxyBase*>& GetWindowList();
61 blink::WebThemeEngine* GetThemeEngine();
64 scoped_ptr<AccessibilityController> accessibility_controller_;
65 scoped_ptr<EventSender> event_sender_;
66 base::WeakPtr<GamepadController> gamepad_controller_;
67 scoped_ptr<TextInputController> text_input_controller_;
68 scoped_ptr<TestRunner> test_runner_;
69 WebTestDelegate* delegate_;
70 WebTestProxyBase* proxy_;
72 std::vector<WebTestProxyBase*> window_list_;
73 #if defined(OS_MACOSX)
74 scoped_ptr<MockWebThemeEngineMac> theme_engine_;
76 scoped_ptr<MockWebThemeEngine> theme_engine_;
79 DISALLOW_COPY_AND_ASSIGN(TestInterfaces);
82 } // namespace content
84 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_INTERFACES_H_