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

Unified Diff: third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp

Issue 2940863005: Move loading methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Fixing build problems introduced by rebasing... Created 3 years, 6 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/core/frame/FrameTestHelpers.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp b/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp
index c1922e8d245c86b2c2b923a4eb5a6d707675c779..fb1b3b9d74f69a4ee25de836287d12fd4c5d07df 100644
--- a/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp
@@ -97,7 +97,7 @@ std::unique_ptr<T> CreateDefaultClientIfNeeded(T*& client) {
} // namespace
-void LoadFrame(WebFrame* frame, const std::string& url) {
+void LoadFrame(WebLocalFrame* frame, const std::string& url) {
WebURLRequest url_request(URLTestHelpers::ToKURL(url));
frame->LoadRequest(url_request);
PumpPendingRequestsForFrameToLoad(frame);
@@ -110,22 +110,21 @@ void LoadHTMLString(WebLocalFrame* frame,
PumpPendingRequestsForFrameToLoad(frame);
}
-void LoadHistoryItem(WebFrame* frame,
+void LoadHistoryItem(WebLocalFrame* frame,
const WebHistoryItem& item,
WebHistoryLoadType load_type,
WebCachePolicy cache_policy) {
- WebURLRequest request =
- frame->ToWebLocalFrame()->RequestFromHistoryItem(item, cache_policy);
- frame->ToWebLocalFrame()->Load(request, WebFrameLoadType::kBackForward, item);
+ WebURLRequest request = frame->RequestFromHistoryItem(item, cache_policy);
+ frame->Load(request, WebFrameLoadType::kBackForward, item);
PumpPendingRequestsForFrameToLoad(frame);
}
-void ReloadFrame(WebFrame* frame) {
+void ReloadFrame(WebLocalFrame* frame) {
frame->Reload(WebFrameLoadType::kReload);
PumpPendingRequestsForFrameToLoad(frame);
}
-void ReloadFrameBypassingCache(WebFrame* frame) {
+void ReloadFrameBypassingCache(WebLocalFrame* frame) {
frame->Reload(WebFrameLoadType::kReloadBypassingCache);
PumpPendingRequestsForFrameToLoad(frame);
}
@@ -294,7 +293,7 @@ WebViewBase* WebViewHelper::InitializeAndLoad(
Initialize(web_frame_client, web_view_client, web_widget_client,
update_settings_func);
- LoadFrame(WebView()->MainFrame(), url);
+ LoadFrame(WebView()->MainFrameImpl(), url);
return WebView();
}

Powered by Google App Engine
This is Rietveld 408576698