Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1256)

Unified Diff: components/test_runner/web_test_interfaces.cc

Issue 1840823002: Extract WebViewClient implementation out of WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@separate-pixel-dump-code
Patch Set: Expanding a comment + an IWYU fix. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/test_runner/web_test_interfaces.h ('k') | components/test_runner/web_test_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/web_test_interfaces.cc
diff --git a/components/test_runner/web_test_interfaces.cc b/components/test_runner/web_test_interfaces.cc
index 7875804246c9e7fafdfb919e0e10f91398582a0c..4df7bd293350b89c596afb0634d0268fb398302d 100644
--- a/components/test_runner/web_test_interfaces.cc
+++ b/components/test_runner/web_test_interfaces.cc
@@ -15,6 +15,7 @@
#include "components/test_runner/test_interfaces.h"
#include "components/test_runner/test_runner.h"
#include "components/test_runner/web_frame_test_client.h"
+#include "components/test_runner/web_view_test_client.h"
using namespace blink;
@@ -98,15 +99,19 @@ AppBannerClient* WebTestInterfaces::GetAppBannerClient() {
return interfaces_->GetAppBannerClient();
}
-blink::WebFrameClient* WebTestInterfaces::GetWebFrameTestClient() {
- if (!web_frame_test_client_) {
- web_frame_test_client_.reset(new WebFrameTestClient(
+scoped_ptr<WebFrameTestClient> WebTestInterfaces::CreateWebFrameTestClient() {
+ return make_scoped_ptr(new WebFrameTestClient(
interfaces_->GetTestRunner(),
interfaces_->GetDelegate(),
interfaces_->GetAccessibilityController(),
interfaces_->GetEventSender()));
- }
- return web_frame_test_client_.get();
+}
+
+scoped_ptr<WebViewTestClient> WebTestInterfaces::CreateWebViewTestClient(
+ WebTestProxyBase* web_test_proxy_base) {
+ return make_scoped_ptr(new WebViewTestClient(
+ interfaces_->GetTestRunner(), interfaces_->GetDelegate(),
+ interfaces_->GetEventSender(), web_test_proxy_base));
}
} // namespace test_runner
« no previous file with comments | « components/test_runner/web_test_interfaces.h ('k') | components/test_runner/web_test_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698