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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.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/extensions/api/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index 325a624ccd3117180d35600e0ee71221ad86fee8..0f508714851505bef1a4e9cdc964915efa64a887 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -589,13 +589,15 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() {
#endif // defined(USE_ASH)
// Create a new BrowserWindow.
- Browser::CreateParams create_params(window_type, window_profile);
+ Browser::CreateParams create_params(window_type, window_profile,
+ user_gesture());
if (extension_id.empty()) {
create_params.initial_bounds = window_bounds;
} else {
create_params = Browser::CreateParams::CreateForApp(
web_app::GenerateApplicationNameFromExtensionId(extension_id),
- false /* trusted_source */, window_bounds, window_profile);
+ false /* trusted_source */, window_bounds, window_profile,
+ user_gesture());
}
create_params.initial_show_state = ui::SHOW_STATE_NORMAL;
if (create_data && create_data->state) {
@@ -1004,7 +1006,7 @@ ExtensionFunction::ResponseAction TabsCreateFunction::Run() {
std::string error;
std::unique_ptr<base::DictionaryValue> result(
- ExtensionTabUtil::OpenTab(this, options, &error));
+ ExtensionTabUtil::OpenTab(this, options, user_gesture(), &error));
if (!result)
return RespondNow(Error(error));
« no previous file with comments | « chrome/browser/extensions/api/sessions/sessions_apitest.cc ('k') | chrome/browser/extensions/api/tabs/tabs_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698