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

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

Issue 790423002: Add the main frame routing ID to WebContentsDelegate, use it in BackgroundContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content shell Created 6 years 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 ca9112af81bc56e40d79e9f6ff6dc120c11d0977..085b7637fa9a30118816cfdfbf194bbc1d005c03 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1148,6 +1148,11 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
// it should be hidden.
should_normally_be_visible_ = !params.initially_hidden;
+ // Either both routing ids can be given, or neither can be.
+ DCHECK((params.routing_id == MSG_ROUTING_NONE &&
+ params.main_frame_routing_id == MSG_ROUTING_NONE) ||
+ (params.routing_id != MSG_ROUTING_NONE &&
+ params.main_frame_routing_id != MSG_ROUTING_NONE));
GetRenderManager()->Init(
params.browser_context, params.site_instance, params.routing_id,
params.main_frame_routing_id);
@@ -1505,6 +1510,7 @@ void WebContentsImpl::CreateNewWindow(
if (delegate_ &&
!delegate_->ShouldCreateWebContents(this,
route_id,
+ main_frame_route_id,
params.window_container_type,
params.frame_name,
params.target_url,
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_browsertest.cc ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698