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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 1158523002: Add user_gesture param to BaseWindow::Show Base URL: https://chromium.googlesource.com/chromium/src.git@ug3_BaseWindow_Activate
Patch Set: Update callers Created 5 years, 7 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
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698