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

Unified Diff: chrome/browser/ui/extensions/application_launch.cc

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 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/ui/extensions/application_launch.cc
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc
index 56d65659524e51895ab3aeefa1e0ba79fa853206..e159943eb9f42fccb970b141da7240ed155d44a5 100644
--- a/chrome/browser/ui/extensions/application_launch.cc
+++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -194,8 +194,10 @@ WebContents* OpenApplicationWindow(const AppLaunchParams& params,
extensions::AppLaunchInfo::GetLaunchHeight(extension));
}
+ // TODO(erg): AppLaunchParams should pass through the user_gesture from the
+ // extension system here.
Browser::CreateParams browser_params(Browser::CreateParams::CreateForApp(
- app_name, true /* trusted_source */, initial_bounds, profile));
+ app_name, true /* trusted_source */, initial_bounds, profile, true));
browser_params.initial_show_state = DetermineWindowShowState(profile,
params.container,
@@ -230,7 +232,11 @@ WebContents* OpenApplicationTab(const AppLaunchParams& launch_params,
WebContents* contents = NULL;
if (!browser) {
// No browser for this profile, need to open a new one.
- browser = new Browser(Browser::CreateParams(Browser::TYPE_TABBED, profile));
+ //
+ // TODO(erg): AppLaunchParams should pass user_gesture from the extension
+ // system to here.
+ browser =
+ new Browser(Browser::CreateParams(Browser::TYPE_TABBED, profile, true));
browser->window()->Show();
// There's no current tab in this browser window, so add a new one.
disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;

Powered by Google App Engine
This is Rietveld 408576698