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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1608283002: PlzNavigate: Use WebNavigationPolicyHandledByClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@change-did-start-loading-logic
Patch Set: Rebase Created 4 years, 10 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 | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 71b9e1262ec23eb9a62167bbeec4bfa715532d95..9d414bab0cfc24d82ef91b3dae1e2943d4e0a86a 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4616,7 +4616,11 @@ void RenderFrameImpl::didStartLoading(bool to_different_document) {
TRACE_EVENT1("navigation", "RenderFrameImpl::didStartLoading",
"id", routing_id_);
render_view_->FrameDidStartLoading(frame_);
- Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
+
+ // PlzNavigate: the browser is responsible for knowing the start of all
+ // non-synchronous navigations.
+ if (!IsBrowserSideNavigationEnabled() || !to_different_document)
+ Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
}
void RenderFrameImpl::didStopLoading() {
@@ -4912,7 +4916,7 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
ShouldMakeNetworkRequestForURL(url)) {
BeginNavigation(&info.urlRequest, info.replacesCurrentHistoryItem,
info.isClientRedirect);
- return blink::WebNavigationPolicyIgnore;
+ return blink::WebNavigationPolicyHandledByClient;
}
return info.defaultPolicy;
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698