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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2860673002: Change all test cases to use WebViewBase instead of WebViewImpl. (Closed)
Patch Set: Created 3 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
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 769863756ac14764bdeb425d5473cd465f638f14..6b4d63b1ef6bec11e06ba0b2375b0ca6acd1685c 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -273,11 +273,15 @@ class ColorOverlay final : public PageOverlay::Delegate {
WebView* WebView::Create(WebViewClient* client,
WebPageVisibilityState visibility_state) {
- // Pass the WebViewImpl's self-reference to the caller.
+ return WebViewBase::Create(client, visibility_state);
+}
+
+WebViewBase* WebViewBase::Create(WebViewClient* client,
+ WebPageVisibilityState visibility_state) {
return WebViewImpl::Create(client, visibility_state);
}
-WebViewImpl* WebViewImpl::Create(WebViewClient* client,
+WebViewBase* WebViewImpl::Create(WebViewClient* client,
WebPageVisibilityState visibility_state) {
// Pass the WebViewImpl's self-reference to the caller.
return AdoptRef(new WebViewImpl(client, visibility_state)).LeakRef();
@@ -1774,8 +1778,8 @@ WebViewBase* WebViewBase::FromPage(Page* page) {
return WebViewImpl::FromPage(page);
}
-WebViewImpl* WebViewImpl::FromPage(Page* page) {
- return page ? static_cast<WebViewImpl*>(page->GetChromeClient().WebView())
+WebViewBase* WebViewImpl::FromPage(Page* page) {
+ return page ? static_cast<WebViewBase*>(page->GetChromeClient().WebView())
: nullptr;
}
@@ -2160,6 +2164,10 @@ bool WebViewImpl::HasVerticalScrollbar() {
const WebInputEvent* WebViewImpl::current_input_event_ = nullptr;
+void WebViewBase::SetCurrentInputEventForTest(const WebInputEvent* event) {
haraken 2017/05/04 05:30:42 It looks a bit strange that WebViewBase's method i
slangley 2017/05/04 09:15:34 This is the same as WebView::Create(), the other o
haraken 2017/05/04 15:14:31 Can we make current_input_event_ a non-static memb
+ WebViewImpl::SetCurrentInputEventForTest(event);
+}
+
WebInputEventResult WebViewImpl::HandleInputEvent(
const WebCoalescedInputEvent& coalesced_event) {
const WebInputEvent& input_event = coalesced_event.Event();

Powered by Google App Engine
This is Rietveld 408576698