| 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; | |
| 26 class AppBannerClient; | 25 class AppBannerClient; |
| 27 class GamepadController; | 26 class GamepadController; |
| 28 class TestRunner; | 27 class TestRunner; |
| 29 class WebTestDelegate; | 28 class WebTestDelegate; |
| 30 class WebTestProxyBase; | 29 class WebTestProxyBase; |
| 31 | 30 |
| 32 class TestInterfaces { | 31 class TestInterfaces { |
| 33 public: | 32 public: |
| 34 TestInterfaces(); | 33 TestInterfaces(); |
| 35 ~TestInterfaces(); | 34 ~TestInterfaces(); |
| 36 | 35 |
| 37 void SetWebView(blink::WebView* web_view, WebTestProxyBase* proxy); | 36 void SetWebView(blink::WebView* web_view, WebTestProxyBase* proxy); |
| 38 void SetDelegate(WebTestDelegate* delegate); | 37 void SetDelegate(WebTestDelegate* delegate); |
| 39 void BindTo(blink::WebFrame* frame); | 38 void BindTo(blink::WebFrame* frame); |
| 40 void ResetTestHelperControllers(); | 39 void ResetTestHelperControllers(); |
| 41 void ResetAll(); | 40 void ResetAll(); |
| 42 void SetTestIsRunning(bool running); | 41 void SetTestIsRunning(bool running); |
| 43 void ConfigureForTestWithURL(const blink::WebURL& test_url, | 42 void ConfigureForTestWithURL(const blink::WebURL& test_url, |
| 44 bool generate_pixels); | 43 bool generate_pixels); |
| 45 void SetAppBannerClient(AppBannerClient* app_banner_client); | 44 void SetAppBannerClient(AppBannerClient* app_banner_client); |
| 46 | 45 |
| 47 void WindowOpened(WebTestProxyBase* proxy); | 46 void WindowOpened(WebTestProxyBase* proxy); |
| 48 void WindowClosed(WebTestProxyBase* proxy); | 47 void WindowClosed(WebTestProxyBase* proxy); |
| 49 | 48 |
| 50 AccessibilityController* GetAccessibilityController(); | |
| 51 TestRunner* GetTestRunner(); | 49 TestRunner* GetTestRunner(); |
| 52 WebTestDelegate* GetDelegate(); | 50 WebTestDelegate* GetDelegate(); |
| 53 const std::vector<WebTestProxyBase*>& GetWindowList(); | 51 const std::vector<WebTestProxyBase*>& GetWindowList(); |
| 54 blink::WebThemeEngine* GetThemeEngine(); | 52 blink::WebThemeEngine* GetThemeEngine(); |
| 55 AppBannerClient* GetAppBannerClient(); | 53 AppBannerClient* GetAppBannerClient(); |
| 56 | 54 |
| 57 private: | 55 private: |
| 58 scoped_ptr<AccessibilityController> accessibility_controller_; | |
| 59 base::WeakPtr<GamepadController> gamepad_controller_; | 56 base::WeakPtr<GamepadController> gamepad_controller_; |
| 60 scoped_ptr<TestRunner> test_runner_; | 57 scoped_ptr<TestRunner> test_runner_; |
| 61 WebTestDelegate* delegate_; | 58 WebTestDelegate* delegate_; |
| 62 AppBannerClient* app_banner_client_; | 59 AppBannerClient* app_banner_client_; |
| 63 | 60 |
| 64 std::vector<WebTestProxyBase*> window_list_; | 61 std::vector<WebTestProxyBase*> window_list_; |
| 65 scoped_ptr<MockWebThemeEngine> theme_engine_; | 62 scoped_ptr<MockWebThemeEngine> theme_engine_; |
| 66 | 63 |
| 67 DISALLOW_COPY_AND_ASSIGN(TestInterfaces); | 64 DISALLOW_COPY_AND_ASSIGN(TestInterfaces); |
| 68 }; | 65 }; |
| 69 | 66 |
| 70 } // namespace test_runner | 67 } // namespace test_runner |
| 71 | 68 |
| 72 #endif // COMPONENTS_TEST_RUNNER_TEST_INTERFACES_H_ | 69 #endif // COMPONENTS_TEST_RUNNER_TEST_INTERFACES_H_ |
| OLD | NEW |