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

Unified Diff: content/browser/frame_host/frame_tree_node.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/bad_message.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 7dfb6dd52c23871b4275f1a275289cfbc645da11..542adfe6dbdc8713dc13844508f36953d0441d27 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -313,6 +313,7 @@ void FrameTreeNode::ResetNavigationRequest(bool keep_state) {
CHECK(IsBrowserSideNavigationEnabled());
if (!navigation_request_)
return;
+ bool was_renderer_initiated = !navigation_request_->browser_initiated();
navigation_request_.reset();
if (keep_state)
@@ -322,6 +323,14 @@ void FrameTreeNode::ResetNavigationRequest(bool keep_state) {
// it created for the navigation. Also register that the load stopped.
DidStopLoading();
render_manager_.CleanUpNavigation();
+
+ // If the navigation is renderer-initiated, the renderer should also be
+ // informed that the navigation stopped.
+ if (was_renderer_initiated) {
+ current_frame_host()->Send(
+ new FrameMsg_Stop(current_frame_host()->GetRoutingID()));
+ }
+
}
bool FrameTreeNode::has_started_loading() const {
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698