Upstream version 5.34.104.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 class GamepadController;
29 class TextInputController;
30 }
31
32 namespace WebTestRunner {
33
34 class AccessibilityController;
35 class EventSender;
36 class TestRunner;
37 class WebTestDelegate;
38 class WebTestProxyBase;
39
40 class TestInterfaces {
41 public:
42     TestInterfaces();
43     ~TestInterfaces();
44
45     void setWebView(blink::WebView*, WebTestProxyBase*);
46     void setDelegate(WebTestDelegate*);
47     void bindTo(blink::WebFrame*);
48     void resetTestHelperControllers();
49     void resetAll();
50     void setTestIsRunning(bool);
51     void configureForTestWithURL(const blink::WebURL&, bool generatePixels);
52
53     void windowOpened(WebTestProxyBase*);
54     void windowClosed(WebTestProxyBase*);
55
56     AccessibilityController* accessibilityController();
57     EventSender* eventSender();
58     TestRunner* testRunner();
59     WebTestDelegate* delegate();
60     WebTestProxyBase* proxy();
61     const std::vector<WebTestProxyBase*>& windowList();
62     blink::WebThemeEngine* themeEngine();
63
64 private:
65     scoped_ptr<AccessibilityController> m_accessibilityController;
66     scoped_ptr<EventSender> m_eventSender;
67     scoped_ptr<content::GamepadController> m_gamepadController;
68     scoped_ptr<content::TextInputController> m_textInputController;
69     scoped_ptr<TestRunner> m_testRunner;
70     WebTestDelegate* m_delegate;
71     WebTestProxyBase* m_proxy;
72
73     std::vector<WebTestProxyBase*> m_windowList;
74 #if defined(__APPLE__)
75     scoped_ptr<WebTestThemeEngineMac> m_themeEngine;
76 #else
77     scoped_ptr<WebTestThemeEngineMock> m_themeEngine;
78 #endif
79
80     DISALLOW_COPY_AND_ASSIGN(TestInterfaces);
81 };
82
83 }
84
85 #endif  // CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTINTERFACES_H_