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

Unified Diff: chrome/browser/ui/browser_navigator.cc

Issue 2729613006: When navigation focuses a web contents, also activate its window. (Closed)
Patch Set: Copyright + nits Created 3 years, 9 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/notifications/notification_interactive_uitest_support.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator.cc
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 4197fba97d48a184fff238ff3bfd08fd0ae2b593..1a7e8063626468d6f4ecb99c13cc336d3efca219 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -301,12 +301,14 @@ class ScopedBrowserShower {
chrome::NavigateParams::SHOW_WINDOW_INACTIVE) {
params_->browser->window()->ShowInactive();
} else if (params_->window_action == chrome::NavigateParams::SHOW_WINDOW) {
- params_->browser->window()->Show();
+ BrowserWindow* window = params_->browser->window();
+ window->Show();
// If a user gesture opened a popup window, focus the contents.
if (params_->user_gesture &&
params_->disposition == WindowOpenDisposition::NEW_POPUP &&
params_->target_contents) {
params_->target_contents->Focus();
+ window->Activate();
}
}
}
« no previous file with comments | « chrome/browser/notifications/notification_interactive_uitest_support.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698