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