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

Unified Diff: chrome/browser/ui/browser.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: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 5e19246cdd0473dbe8662fc0afe54066b6bd7a05..577e5b339e7d1c8a4ceef3237fd7213b1ae9b1f1 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1549,6 +1549,7 @@ void Browser::ShowRepostFormWarningDialog(WebContents* source) {
bool Browser::ShouldCreateWebContents(
WebContents* web_contents,
int route_id,
+ int main_frame_route_id,
WindowContainerType window_container_type,
const base::string16& frame_name,
const GURL& target_url,
@@ -1557,6 +1558,7 @@ bool Browser::ShouldCreateWebContents(
if (window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND) {
// If a BackgroundContents is created, suppress the normal WebContents.
return !MaybeCreateBackgroundContents(route_id,
+ main_frame_route_id,
web_contents,
frame_name,
target_url,
@@ -2431,6 +2433,7 @@ bool Browser::ShouldHideUIForFullscreen() const {
bool Browser::MaybeCreateBackgroundContents(
int route_id,
+ int main_frame_route_id,
WebContents* opener_web_contents,
const base::string16& frame_name,
const GURL& target_url,
@@ -2496,6 +2499,7 @@ bool Browser::MaybeCreateBackgroundContents(
BackgroundContents* contents =
service->CreateBackgroundContents(site_instance.get(),
route_id,
+ main_frame_route_id,
profile_,
frame_name,
base::ASCIIToUTF16(extension->id()),
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | components/web_contents_delegate_android/web_contents_delegate_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698