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

Unified Diff: chrome/browser/ui/browser.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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 873a47e4b7821e7a50f9a19abc0675a7194e70c9..973cdb80a2a3e74347e573d280e48eacfeaa6305 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -250,8 +250,8 @@ namespace {
// How long we wait before updating the browser chrome while loading a page.
const int kUIUpdateCoalescingTimeMS = 200;
-BrowserWindow* CreateBrowserWindow(Browser* browser) {
- return BrowserWindow::CreateBrowserWindow(browser);
+BrowserWindow* CreateBrowserWindow(Browser* browser, bool user_gesture) {
+ return BrowserWindow::CreateBrowserWindow(browser, user_gesture);
}
// Is the fast tab unload experiment enabled?
@@ -288,6 +288,7 @@ Browser::CreateParams::CreateParams(Profile* profile)
trusted_source(false),
initial_show_state(ui::SHOW_STATE_DEFAULT),
is_session_restore(false),
+ user_gesture(true),
window(NULL) {}
Browser::CreateParams::CreateParams(Type type, Profile* profile)
@@ -296,6 +297,7 @@ Browser::CreateParams::CreateParams(Type type, Profile* profile)
trusted_source(false),
initial_show_state(ui::SHOW_STATE_DEFAULT),
is_session_restore(false),
+ user_gesture(true),
window(NULL) {}
Browser::CreateParams::CreateParams(const CreateParams& other) = default;
@@ -438,7 +440,8 @@ Browser::Browser(const CreateParams& params)
ProfileMetrics::LogProfileLaunch(profile_);
- window_ = params.window ? params.window : CreateBrowserWindow(this);
+ window_ = params.window ? params.window
+ : CreateBrowserWindow(this, params.user_gesture);
if (hosted_app_controller_)
hosted_app_controller_->UpdateLocationBarVisibility(false);

Powered by Google App Engine
This is Rietveld 408576698