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

Unified Diff: third_party/WebKit/Source/web/tests/FrameTestHelpers.h

Issue 1924043002: Switch the inheritance of WebViewClient from WebWidgetClient to protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix new test 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
Index: third_party/WebKit/Source/web/tests/FrameTestHelpers.h
diff --git a/third_party/WebKit/Source/web/tests/FrameTestHelpers.h b/third_party/WebKit/Source/web/tests/FrameTestHelpers.h
index adba60b772bb802390f1611a581d987b0db876b4..be5c57b913e580e1ef953cd5ed1545568d6920e0 100644
--- a/third_party/WebKit/Source/web/tests/FrameTestHelpers.h
+++ b/third_party/WebKit/Source/web/tests/FrameTestHelpers.h
@@ -59,6 +59,7 @@ enum class WebCachePolicy;
namespace FrameTestHelpers {
class TestWebFrameClient;
+using TestWebWidgetClient = WebWidgetClient;
// Loads a url into the specified WebFrame for testing purposes. Pumps any
// pending resource requests, as well as waiting for the threaded parser to
@@ -127,6 +128,11 @@ public:
bool animationScheduled() { return m_animationScheduled; }
void clearAnimationScheduled() { m_animationScheduled = false; }
+ // TODO(lfg): This is a temporary method to retrieve the WebWidgetClient,
+ // while we refactor WebView to not inherit from Webwidget.
+ // Returns the WebWidgetClient.
+ WebWidgetClient* widgetClient() { return this; }
+
private:
OwnPtr<WebLayerTreeView> m_layerTreeView;
bool m_animationScheduled;
@@ -142,14 +148,14 @@ public:
// Creates and initializes the WebView. Implicitly calls reset() first. If
// a WebFrameClient or a WebViewClient are passed in, they must outlive the
// WebViewHelper.
- WebViewImpl* initializeWithOpener(WebFrame* opener, bool enableJavascript = false, TestWebFrameClient* = nullptr, TestWebViewClient* = nullptr, void (*updateSettingsFunc)(WebSettings*) = nullptr);
+ WebViewImpl* initializeWithOpener(WebFrame* opener, bool enableJavascript = false, TestWebFrameClient* = nullptr, TestWebViewClient* = nullptr, TestWebWidgetClient* = nullptr, void (*updateSettingsFunc)(WebSettings*) = nullptr);
// Same as initializeWithOpener(), but always sets the opener to null.
- WebViewImpl* initialize(bool enableJavascript = false, TestWebFrameClient* = 0, TestWebViewClient* = 0, void (*updateSettingsFunc)(WebSettings*) = 0);
+ WebViewImpl* initialize(bool enableJavascript = false, TestWebFrameClient* = nullptr, TestWebViewClient* = nullptr, TestWebWidgetClient* = nullptr, void (*updateSettingsFunc)(WebSettings*) = 0);
// Same as initialize() but also performs the initial load of the url. Only
// returns once the load is complete.
- WebViewImpl* initializeAndLoad(const std::string& url, bool enableJavascript = false, TestWebFrameClient* = 0, TestWebViewClient* = 0, void (*updateSettingsFunc)(WebSettings*) = 0);
+ WebViewImpl* initializeAndLoad(const std::string& url, bool enableJavascript = false, TestWebFrameClient* = nullptr, TestWebViewClient* = nullptr, TestWebWidgetClient* = nullptr, void (*updateSettingsFunc)(WebSettings*) = 0);
void resize(WebSize);

Powered by Google App Engine
This is Rietveld 408576698