| 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 580cac63b5e285204666dbac80a725b8a6552007..b892944724644091815bbd3a1fae2ee6d9d6fff1 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| @@ -585,10 +585,11 @@ bool WindowsCreateFunction::RunSync() {
|
| title, window_profile, urls[0], window_bounds, panel_create_mode);
|
|
|
| // Unlike other window types, Panels do not take focus by default.
|
| - if (!saw_focus_key || !focused)
|
| + if (!saw_focus_key || !focused) {
|
| panel->ShowInactive();
|
| - else
|
| - panel->Show();
|
| + } else {
|
| + panel->Show(user_gesture());
|
| + }
|
|
|
| SetResult(panel->extension_window_controller()->CreateWindowValueWithTabs(
|
| extension()));
|
| @@ -652,10 +653,11 @@ bool WindowsCreateFunction::RunSync() {
|
| if (!saw_focus_key && create_panel)
|
| focused = false;
|
|
|
| - if (focused)
|
| - new_window->window()->Show();
|
| - else
|
| + if (focused) {
|
| + new_window->window()->Show(user_gesture());
|
| + } else {
|
| new_window->window()->ShowInactive();
|
| + }
|
|
|
| WindowController* controller = new_window->extension_window_controller();
|
|
|
|
|