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

Unified Diff: chrome/browser/apps/app_browsertest_util.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: rebased 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: chrome/browser/apps/app_browsertest_util.cc
diff --git a/chrome/browser/apps/app_browsertest_util.cc b/chrome/browser/apps/app_browsertest_util.cc
index 3cfc59465ea2614220cf723fc7be5e23d77edeba..f4821f08c2538a639f98d469c13679f5dda3ad8e 100644
--- a/chrome/browser/apps/app_browsertest_util.cc
+++ b/chrome/browser/apps/app_browsertest_util.cc
@@ -195,18 +195,22 @@ size_t PlatformAppBrowserTest::GetAppWindowCountForApp(
.size();
}
-AppWindow* PlatformAppBrowserTest::CreateAppWindow(const Extension* extension) {
- return CreateAppWindowFromParams(extension, AppWindow::CreateParams());
+AppWindow* PlatformAppBrowserTest::CreateAppWindow(
+ const Extension* extension,
+ content::WebContents* creator_contents) {
+ return CreateAppWindowFromParams(extension, creator_contents,
+ AppWindow::CreateParams());
}
AppWindow* PlatformAppBrowserTest::CreateAppWindowFromParams(
const Extension* extension,
+ content::WebContents* creator_contents,
const AppWindow::CreateParams& params) {
- AppWindow* window =
- new AppWindow(browser()->profile(),
- new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)),
- extension);
- window->Init(GURL(std::string()), new AppWindowContentsImpl(window), params);
+ AppWindow* window = new AppWindow(
+ browser()->profile(),
+ new ChromeAppDelegate(make_scoped_ptr(new ScopedKeepAlive)), extension);
+ window->Init(GURL(std::string()), new AppWindowContentsImpl(window),
+ creator_contents->GetMainFrame(), params);
return window;
}

Powered by Google App Engine
This is Rietveld 408576698