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

Unified Diff: extensions/browser/app_window/app_window_contents.cc

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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: extensions/browser/app_window/app_window_contents.cc
diff --git a/extensions/browser/app_window/app_window_contents.cc b/extensions/browser/app_window/app_window_contents.cc
index 7f1a7a1d00484bccdc0bbe8ded1cff641dbdb9a5..3cb0cb850de3f289aa460fa311a7ea026df77995 100644
--- a/extensions/browser/app_window/app_window_contents.cc
+++ b/extensions/browser/app_window/app_window_contents.cc
@@ -27,12 +27,15 @@ AppWindowContentsImpl::AppWindowContentsImpl(AppWindow* host)
AppWindowContentsImpl::~AppWindowContentsImpl() {}
void AppWindowContentsImpl::Initialize(content::BrowserContext* context,
+ content::RenderFrameHost* creator_frame,
const GURL& url) {
url_ = url;
- web_contents_.reset(
- content::WebContents::Create(content::WebContents::CreateParams(
- context, content::SiteInstance::CreateForURL(context, url_))));
+ content::WebContents::CreateParams create_params(
+ context, creator_frame->GetSiteInstance());
+ create_params.opener_render_process_id = creator_frame->GetProcess()->GetID();
+ create_params.opener_render_frame_id = creator_frame->GetRoutingID();
+ web_contents_.reset(content::WebContents::Create(create_params));
Observe(web_contents_.get());
web_contents_->GetMutableRendererPrefs()->

Powered by Google App Engine
This is Rietveld 408576698