PlzNavigate: stop navigations when opening a document for write
This CL ensures that we stop renderer-initiated navigations when
attempting to do a document write. In order to do this in PlzNavigate,
we introduce a new IPC where the RenderFrame asks the browser process to
drop its renderer-initiated request. The CL also fixes an issue with the
cancellation of renderer-initiated navigations in PlzNavigate. We issued
a Stop IPC that would stop all loaders. Instead, we now have a new IPC
that will only cancel the dummy provisional DocumentLoader that keeps
track of navigations handled by the browser process.
BUG=576261
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2735183003
Cr-Commit-Position: refs/heads/master@{#459081}
diff --git a/content/browser/frame_host/navigator_impl.h b/content/browser/frame_host/navigator_impl.h
index c461bcf..e59fa4e 100644
--- a/content/browser/frame_host/navigator_impl.h
+++ b/content/browser/frame_host/navigator_impl.h
@@ -88,12 +88,14 @@
void OnBeginNavigation(FrameTreeNode* frame_tree_node,
const CommonNavigationParams& common_params,
const BeginNavigationParams& begin_params) override;
+ void OnAbortNavigation(FrameTreeNode* frame_tree_node) override;
void LogResourceRequestTime(base::TimeTicks timestamp,
const GURL& url) override;
void LogBeforeUnloadTime(
const base::TimeTicks& renderer_before_unload_start_time,
const base::TimeTicks& renderer_before_unload_end_time) override;
- void CancelNavigation(FrameTreeNode* frame_tree_node) override;
+ void CancelNavigation(FrameTreeNode* frame_tree_node,
+ bool inform_renderer) override;
void DiscardPendingEntryIfNeeded(NavigationHandleImpl* handle) override;
private: