Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / shell / renderer / test_runner / test_interfaces.h
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.
4
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_INTERFACES_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_INTERFACES_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
13 #include "content/shell/renderer/test_runner/mock_web_theme_engine.h"
14 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
15
16 namespace blink {
17 class WebFrame;
18 class WebThemeEngine;
19 class WebURL;
20 class WebView;
21 }
22
23 namespace content {
24
25 class AccessibilityController;
26 class EventSender;
27 class GamepadController;
28 class TestRunner;
29 class TextInputController;
30 class WebTestDelegate;
31 class WebTestProxyBase;
32
33 class TestInterfaces {
34  public:
35   TestInterfaces();
36   ~TestInterfaces();
37
38   void SetWebView(blink::WebView* web_view, WebTestProxyBase* proxy);
39   void SetDelegate(WebTestDelegate* delegate);
40   void BindTo(blink::WebFrame* frame);
41   void ResetTestHelperControllers();
42   void ResetAll();
43   void SetTestIsRunning(bool running);
44   void ConfigureForTestWithURL(const blink::WebURL& test_url,
45                                bool generate_pixels);
46
47   void WindowOpened(WebTestProxyBase* proxy);
48   void WindowClosed(WebTestProxyBase* proxy);
49
50   AccessibilityController* GetAccessibilityController();
51   EventSender* GetEventSender();
52   TestRunner* GetTestRunner();
53   WebTestDelegate* GetDelegate();
54   WebTestProxyBase* GetProxy();
55   const std::vector<WebTestProxyBase*>& GetWindowList();
56   blink::WebThemeEngine* GetThemeEngine();
57
58  private:
59   scoped_ptr<AccessibilityController> accessibility_controller_;
60   scoped_ptr<EventSender> event_sender_;
61   base::WeakPtr<GamepadController> gamepad_controller_;
62   scoped_ptr<TextInputController> text_input_controller_;
63   scoped_ptr<TestRunner> test_runner_;
64   WebTestDelegate* delegate_;
65   WebTestProxyBase* proxy_;
66
67   std::vector<WebTestProxyBase*> window_list_;
68   scoped_ptr<MockWebThemeEngine> theme_engine_;
69
70   DISALLOW_COPY_AND_ASSIGN(TestInterfaces);
71 };
72
73 }  // namespace content
74
75 #endif  // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_INTERFACES_H_