Index: content/browser/frame_host/navigator_impl.cc |
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc |
index b2533a84e915e1e3650933c5f2ec1a26d4289824..bf4a5fb8cb4341ed7e716060efd66bab9965dbaa 100644 |
--- a/content/browser/frame_host/navigator_impl.cc |
+++ b/content/browser/frame_host/navigator_impl.cc |
@@ -1008,7 +1008,7 @@ void NavigatorImpl::OnBeginNavigation( |
RenderFrameHost* current_frame_host = |
frame_tree_node->render_manager()->current_frame_host(); |
current_frame_host->Send( |
- new FrameMsg_Stop(current_frame_host->GetRoutingID())); |
+ new FrameMsg_DroppedNavigation(current_frame_host->GetRoutingID())); |
return; |
} |
@@ -1043,6 +1043,20 @@ void NavigatorImpl::OnBeginNavigation( |
navigation_request->BeginNavigation(); |
} |
+void NavigatorImpl::OnAbortNavigation(FrameTreeNode* frame_tree_node) { |
+ DCHECK(frame_tree_node); |
+ |
+ NavigationRequest* ongoing_navigation_request = |
+ frame_tree_node->navigation_request(); |
+ if (!ongoing_navigation_request || |
+ ongoing_navigation_request->browser_initiated()) { |
+ return; |
+ } |
+ |
+ // Abort the renderer-initiated navigation request. |
+ CancelNavigation(frame_tree_node); |
+} |
+ |
// PlzNavigate |
void NavigatorImpl::CancelNavigation(FrameTreeNode* frame_tree_node) { |
CHECK(IsBrowserSideNavigationEnabled()); |