Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / shell / renderer / test_runner / TestInterfaces.h
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTINTERFACES_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTINTERFACES_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
13
14 #if defined(__APPLE__)
15 #include "content/shell/renderer/test_runner/WebTestThemeEngineMac.h"
16 #else
17 #include "content/shell/renderer/test_runner/WebTestThemeEngineMock.h"
18 #endif
19
20 namespace blink {
21 class WebFrame;
22 class WebThemeEngine;
23 class WebURL;
24 class WebView;
25 }
26
27 namespace content {
28
29 class AccessibilityController;
30 class EventSender;
31 class GamepadController;
32 class TestRunner;
33 class TextInputController;
34 class WebTestDelegate;
35 class WebTestProxyBase;
36
37 class TestInterfaces {
38 public:
39     TestInterfaces();
40     ~TestInterfaces();
41
42     void setWebView(blink::WebView*, WebTestProxyBase*);
43     void setDelegate(WebTestDelegate*);
44     void bindTo(blink::WebFrame*);
45     void resetTestHelperControllers();
46     void resetAll();
47     void setTestIsRunning(bool);
48     void configureForTestWithURL(const blink::WebURL&, bool generatePixels);
49
50     void windowOpened(WebTestProxyBase*);
51     void windowClosed(WebTestProxyBase*);
52
53     AccessibilityController* accessibilityController();
54     EventSender* eventSender();
55     TestRunner* testRunner();
56     WebTestDelegate* delegate();
57     WebTestProxyBase* proxy();
58     const std::vector<WebTestProxyBase*>& windowList();
59     blink::WebThemeEngine* themeEngine();
60
61 private:
62     scoped_ptr<AccessibilityController> m_accessibilityController;
63     scoped_ptr<EventSender> m_eventSender;
64     scoped_ptr<GamepadController> m_gamepadController;
65     scoped_ptr<TextInputController> m_textInputController;
66     scoped_ptr<TestRunner> m_testRunner;
67     WebTestDelegate* m_delegate;
68     WebTestProxyBase* m_proxy;
69
70     std::vector<WebTestProxyBase*> m_windowList;
71 #if defined(__APPLE__)
72     scoped_ptr<WebTestThemeEngineMac> m_themeEngine;
73 #else
74     scoped_ptr<WebTestThemeEngineMock> m_themeEngine;
75 #endif
76
77     DISALLOW_COPY_AND_ASSIGN(TestInterfaces);
78 };
79
80 }  // namespace content
81
82 #endif  // CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTINTERFACES_H_