Add docs and checks to RenderFrameHostManager::CreateRenderFrameHost.

Split RenderFrameHostManager::Init into InitRoot and InitChild.

Add CreateRenderFrameHost::CreateFrameEnum and pass it to
CreateRenderFrameHost to capture the context in which creation is done,
to allow validation of expectations.

Change-Id: Ic23c40d62f5cd1f461ab2e8fccd6a9fe9024d8b9
Bug: 1059678
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2084038
Commit-Queue: Fergal Daly <[email protected]>
Reviewed-by: Alex Moshchuk <[email protected]>
Reviewed-by: Alexander Timin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#750478}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index b57520fe..a3417490 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2057,9 +2057,8 @@
         ->PreventAssociationWithSpareProcess();
   }
 
-  GetRenderManager()->Init(site_instance.get(),
-                           /*frame_routing_id=*/MSG_ROUTING_NONE,
-                           params.renderer_initiated_creation);
+  GetRenderManager()->InitRoot(site_instance.get(),
+                               params.renderer_initiated_creation);
 
   // blink::FrameTree::setName always keeps |unique_name| empty in case of a
   // main frame - let's do the same thing here.