Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 6382fbec02f25793db4fab78b7b3a73d85cdca9d..7dc7ba582c01393c31a5e18b98f5997bee2990b1 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -248,8 +248,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? |
@@ -280,20 +280,24 @@ const extensions::Extension* GetExtensionForOrigin( |
//////////////////////////////////////////////////////////////////////////////// |
// Browser, CreateParams: |
-Browser::CreateParams::CreateParams(Profile* profile) |
+Browser::CreateParams::CreateParams(Profile* profile, bool user_gesture) |
: type(TYPE_TABBED), |
profile(profile), |
trusted_source(false), |
initial_show_state(ui::SHOW_STATE_DEFAULT), |
is_session_restore(false), |
+ user_gesture(user_gesture), |
window(NULL) {} |
-Browser::CreateParams::CreateParams(Type type, Profile* profile) |
+Browser::CreateParams::CreateParams(Type type, |
+ Profile* profile, |
+ bool user_gesture) |
: type(type), |
profile(profile), |
trusted_source(false), |
initial_show_state(ui::SHOW_STATE_DEFAULT), |
is_session_restore(false), |
+ user_gesture(user_gesture), |
window(NULL) {} |
Browser::CreateParams::CreateParams(const CreateParams& other) = default; |
@@ -303,10 +307,11 @@ Browser::CreateParams Browser::CreateParams::CreateForApp( |
const std::string& app_name, |
bool trusted_source, |
const gfx::Rect& window_bounds, |
- Profile* profile) { |
+ Profile* profile, |
+ bool user_gesture) { |
DCHECK(!app_name.empty()); |
- CreateParams params(TYPE_POPUP, profile); |
+ CreateParams params(TYPE_POPUP, profile, user_gesture); |
params.app_name = app_name; |
params.trusted_source = trusted_source; |
params.initial_bounds = window_bounds; |
@@ -317,7 +322,7 @@ Browser::CreateParams Browser::CreateParams::CreateForApp( |
// static |
Browser::CreateParams Browser::CreateParams::CreateForDevTools( |
Profile* profile) { |
- CreateParams params(TYPE_POPUP, profile); |
+ CreateParams params(TYPE_POPUP, profile, true); |
params.app_name = DevToolsWindow::kDevToolsApp; |
params.trusted_source = true; |
return params; |
@@ -436,7 +441,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); |