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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2596763003: On macOS, avoid forcible activation during Show.
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index e34983dae09a4faf5753142b2ef8d19836919241..b8f11f0b88ed47dd6c9083c94ba06becf3b130f0 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -606,7 +606,15 @@ void BrowserView::Show() {
// If the window is already visible, just activate it.
if (frame_->IsVisible()) {
+#if !defined(OS_MACOSX)
Peter Kasting 2016/12/22 00:38:42 Nit: Remove "!" and reverse arms, so "else" doesn'
frame_->Activate();
+#else
+ // When opening a URL from other application, macOS will activate browser
Peter Kasting 2016/12/22 00:38:42 Nit: other -> another, browser -> the browser
+ // window in case when "Open" action is used, but won't do it in case when
Peter Kasting 2016/12/22 00:38:42 Nit: in case -> in the case (2x)
+ // "Open Behind" is requested. Let's assume macOS handles the activation
+ // for us, just put the window above other browser windows.
Peter Kasting 2016/12/22 00:38:42 Nit: , -> ;
+ frame_->ShowInactive();
+#endif
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698