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

Unified Diff: chrome/browser/background/background_contents.cc

Issue 2882513005: Propagate opener to BackgroundsContents. (Closed)
Patch Set: Tweaked the comment in DriveWebContentsManager::ShouldCreateWebContents Created 3 years, 6 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: chrome/browser/background/background_contents.cc
diff --git a/chrome/browser/background/background_contents.cc b/chrome/browser/background/background_contents.cc
index 3624e9eb4231c2bcefe73e18934ee2e96d0c95cc..a419a5471ad2ea05fa84e208c68419d68a793feb 100644
--- a/chrome/browser/background/background_contents.cc
+++ b/chrome/browser/background/background_contents.cc
@@ -17,6 +17,8 @@
#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/session_storage_namespace.h"
#include "content/public/browser/site_instance.h"
@@ -33,6 +35,7 @@ using content::WebContents;
BackgroundContents::BackgroundContents(
scoped_refptr<SiteInstance> site_instance,
+ content::RenderFrameHost* opener,
int32_t routing_id,
int32_t main_frame_routing_id,
int32_t main_frame_widget_routing_id,
@@ -46,6 +49,10 @@ BackgroundContents::BackgroundContents(
site_instance->GetBrowserContext());
WebContents::CreateParams create_params(profile_, std::move(site_instance));
+ create_params.opener_render_process_id =
+ opener ? opener->GetProcess()->GetID() : MSG_ROUTING_NONE;
+ create_params.opener_render_frame_id =
+ opener ? opener->GetRoutingID() : MSG_ROUTING_NONE;
create_params.routing_id = routing_id;
create_params.main_frame_routing_id = main_frame_routing_id;
create_params.main_frame_widget_routing_id = main_frame_widget_routing_id;
« no previous file with comments | « chrome/browser/background/background_contents.h ('k') | chrome/browser/background/background_contents_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698