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