PlzNavigate: provide the FrameTreeNode ID to the network stack
This CL adds the FrameTreeNode ID to the
NavigationRequestInfo that is passed to the ResourceDispatcherHost. This allows
a proper DownloadTabInfo to be created, and downloads to start with
browser-side navigation enabled.
BUG=475027
Review URL: https://codereview.chromium.org/1079163008
Cr-Commit-Position: refs/heads/master@{#331351}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2a8a92c..e5c61bb 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -463,6 +463,13 @@
return result;
}
+// static
+WebContentsImpl* WebContentsImpl::FromFrameTreeNode(
+ FrameTreeNode* frame_tree_node) {
+ return static_cast<WebContentsImpl*>(
+ WebContents::FromRenderFrameHost(frame_tree_node->current_frame_host()));
+}
+
RenderFrameHostManager* WebContentsImpl::GetRenderManagerForTesting() {
return GetRenderManager();
}