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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 16032007: Create RenderFrame/RenderFrameHost for the main frame of a page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing routing ID expectations. Created 7 years, 7 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0f8b1df5ef3e43a7c29d77a5445f81b074bb5f21..97b82be42b620adcf7a7a59046de2ff3d22ea82b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1162,7 +1162,8 @@ void WebContentsImpl::Observe(int type,
void WebContentsImpl::Init(const WebContents::CreateParams& params) {
render_manager_.Init(
- params.browser_context, params.site_instance, params.routing_id);
+ params.browser_context, params.site_instance, params.routing_id,
+ params.main_frame_routing_id);
view_.reset(GetContentClient()->browser()->
OverrideCreateWebContentsView(this, &render_view_host_delegate_view_));
@@ -1378,12 +1379,15 @@ void WebContentsImpl::LostMouseLock() {
void WebContentsImpl::CreateNewWindow(
int route_id,
+ int main_frame_route_id,
const ViewHostMsg_CreateWindow_Params& params,
SessionStorageNamespace* session_storage_namespace) {
if (delegate_ && !delegate_->ShouldCreateWebContents(
this, route_id, params.window_container_type, params.frame_name,
params.target_url)) {
GetRenderViewHost()->GetProcess()->ResumeRequestsForView(route_id);
+ GetRenderViewHost()->GetProcess()->ResumeRequestsForView(
+ main_frame_route_id);
return;
}
@@ -1424,6 +1428,7 @@ void WebContentsImpl::CreateNewWindow(
session_storage_namespace);
CreateParams create_params(GetBrowserContext(), site_instance);
create_params.routing_id = route_id;
+ create_params.main_frame_routing_id = main_frame_route_id;
if (!is_guest) {
create_params.context = view_->GetNativeView();
create_params.initial_size = view_->GetContainerSize();
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698