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

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: Created 4 years, 11 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: 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 b8415a7e4a3caa409d67953de399c65bf72d43e8..5c0c5a79228ee73003823c1e6b03d6d31ce85eba 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 | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | content/browser/frame_host/render_frame_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698