Index: content/browser/service_worker/service_worker_client_utils.cc |
diff --git a/content/browser/service_worker/service_worker_client_utils.cc b/content/browser/service_worker/service_worker_client_utils.cc |
index 0cd39b270e3128d090b5857de356e7bb2917d231..3e791236cde0ab92dcfac176fa85b370c5e0da67 100644 |
--- a/content/browser/service_worker/service_worker_client_utils.cc |
+++ b/content/browser/service_worker/service_worker_client_utils.cc |
@@ -162,6 +162,13 @@ void DidOpenURLOnUI(const OpenURLCallback& callback, |
return; |
} |
+ // On Mac, ContentBrowserClient::OpenURL calls ui::BaseWindow::Show which |
+ // makes the destination window the main+key window, but won't make Chrome |
+ // the active application (https://crbug.com/470830). Since OpenWindow is |
+ // always called from a user gesture (e.g. notification click), we should |
+ // explicitly activate the window, which brings Chrome to the front. |
+ static_cast<WebContentsImpl*>(web_contents)->Activate(); |
Avi (use Gerrit)
2016/10/13 20:56:15
web_contents->delegate()->ActivateContents(web_con
Avi (use Gerrit)
2016/10/13 21:28:59
Actually, we're in content here so it doesn't matt
|
+ |
RenderFrameHostImpl* rfhi = |
static_cast<RenderFrameHostImpl*>(web_contents->GetMainFrame()); |
new OpenURLObserver(web_contents, |