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