| 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 #include "components/test_runner/test_interfaces.h" | 5 #include "components/test_runner/test_interfaces.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 accessibility_controller_->SetDelegate(0); | 52 accessibility_controller_->SetDelegate(0); |
| 53 event_sender_->SetDelegate(0); | 53 event_sender_->SetDelegate(0); |
| 54 // gamepad_controller_ ignores SetDelegate(0) | 54 // gamepad_controller_ ignores SetDelegate(0) |
| 55 // text_input_controller_ doesn't depend on WebTestDelegate. | 55 // text_input_controller_ doesn't depend on WebTestDelegate. |
| 56 test_runner_->SetDelegate(0); | 56 test_runner_->SetDelegate(0); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void TestInterfaces::SetWebView(blink::WebView* web_view, | 59 void TestInterfaces::SetWebView(blink::WebView* web_view, |
| 60 WebTestProxyBase* proxy) { | 60 WebTestProxyBase* proxy) { |
| 61 proxy_ = proxy; | |
| 62 accessibility_controller_->SetWebView(web_view); | 61 accessibility_controller_->SetWebView(web_view); |
| 63 event_sender_->SetWebView(web_view); | 62 event_sender_->SetWebView(web_view); |
| 64 // gamepad_controller_ doesn't depend on WebView. | 63 // gamepad_controller_ doesn't depend on WebView. |
| 65 text_input_controller_->SetWebView(web_view); | 64 text_input_controller_->SetWebView(web_view); |
| 66 test_runner_->SetWebView(web_view, proxy); | 65 test_runner_->SetWebView(web_view, proxy); |
| 67 } | 66 } |
| 68 | 67 |
| 69 void TestInterfaces::SetDelegate(WebTestDelegate* delegate) { | 68 void TestInterfaces::SetDelegate(WebTestDelegate* delegate) { |
| 70 accessibility_controller_->SetDelegate(delegate); | 69 accessibility_controller_->SetDelegate(delegate); |
| 71 event_sender_->SetDelegate(delegate); | 70 event_sender_->SetDelegate(delegate); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 } | 161 } |
| 163 | 162 |
| 164 TestRunner* TestInterfaces::GetTestRunner() { | 163 TestRunner* TestInterfaces::GetTestRunner() { |
| 165 return test_runner_.get(); | 164 return test_runner_.get(); |
| 166 } | 165 } |
| 167 | 166 |
| 168 WebTestDelegate* TestInterfaces::GetDelegate() { | 167 WebTestDelegate* TestInterfaces::GetDelegate() { |
| 169 return delegate_; | 168 return delegate_; |
| 170 } | 169 } |
| 171 | 170 |
| 172 WebTestProxyBase* TestInterfaces::GetProxy() { | |
| 173 return proxy_; | |
| 174 } | |
| 175 | |
| 176 const std::vector<WebTestProxyBase*>& TestInterfaces::GetWindowList() { | 171 const std::vector<WebTestProxyBase*>& TestInterfaces::GetWindowList() { |
| 177 return window_list_; | 172 return window_list_; |
| 178 } | 173 } |
| 179 | 174 |
| 180 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { | 175 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { |
| 181 if (!test_runner_->UseMockTheme()) | 176 if (!test_runner_->UseMockTheme()) |
| 182 return 0; | 177 return 0; |
| 183 if (!theme_engine_.get()) | 178 if (!theme_engine_.get()) |
| 184 theme_engine_.reset(new MockWebThemeEngine()); | 179 theme_engine_.reset(new MockWebThemeEngine()); |
| 185 return theme_engine_.get(); | 180 return theme_engine_.get(); |
| 186 } | 181 } |
| 187 | 182 |
| 188 AppBannerClient* TestInterfaces::GetAppBannerClient() { | 183 AppBannerClient* TestInterfaces::GetAppBannerClient() { |
| 189 return app_banner_client_; | 184 return app_banner_client_; |
| 190 } | 185 } |
| 191 | 186 |
| 192 } // namespace test_runner | 187 } // namespace test_runner |
| OLD | NEW |