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

Unified Diff: content/browser/renderer_host/render_widget_helper.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/renderer_host/render_widget_helper.cc
diff --git a/content/browser/renderer_host/render_widget_helper.cc b/content/browser/renderer_host/render_widget_helper.cc
index d244da75383ef3f8d0f037ce8d2166579cab5b77..9d6a4beae8038535c26d0ff19a5cf5a5fa510ae1 100644
--- a/content/browser/renderer_host/render_widget_helper.cc
+++ b/content/browser/renderer_host/render_widget_helper.cc
@@ -250,6 +250,7 @@ void RenderWidgetHelper::CreateNewWindow(
bool no_javascript_access,
base::ProcessHandle render_process,
int* route_id,
+ int* main_frame_route_id,
int* surface_id,
SessionStorageNamespace* session_storage_namespace) {
if (params.opener_suppressed || no_javascript_access) {
@@ -259,32 +260,38 @@ void RenderWidgetHelper::CreateNewWindow(
// it. Because of this, we will immediately show and navigate the window
// in OnCreateWindowOnUI, using the params provided here.
*route_id = MSG_ROUTING_NONE;
+ *main_frame_route_id = MSG_ROUTING_NONE;
*surface_id = 0;
} else {
*route_id = GetNextRoutingID();
+ *main_frame_route_id = GetNextRoutingID();
*surface_id = GpuSurfaceTracker::Get()->AddSurfaceForRenderer(
render_process_id_, *route_id);
// Block resource requests until the view is created, since the HWND might
// be needed if a response ends up creating a plugin.
resource_dispatcher_host_->BlockRequestsForRoute(
render_process_id_, *route_id);
+ resource_dispatcher_host_->BlockRequestsForRoute(
+ render_process_id_, *main_frame_route_id);
}
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&RenderWidgetHelper::OnCreateWindowOnUI,
- this, params, *route_id,
+ this, params, *route_id, *main_frame_route_id,
make_scoped_refptr(session_storage_namespace)));
}
void RenderWidgetHelper::OnCreateWindowOnUI(
const ViewHostMsg_CreateWindow_Params& params,
int route_id,
+ int main_frame_route_id,
SessionStorageNamespace* session_storage_namespace) {
RenderViewHostImpl* host =
RenderViewHostImpl::FromID(render_process_id_, params.opener_id);
if (host)
- host->CreateNewWindow(route_id, params, session_storage_namespace);
+ host->CreateNewWindow(route_id, main_frame_route_id, params,
+ session_storage_namespace);
}
void RenderWidgetHelper::OnResumeRequestsForView(int route_id) {
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.h ('k') | content/browser/renderer_host/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698