| Index: content/browser/service_worker/service_worker_version.cc
|
| diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
|
| index bc88c065e538813c7b334d87e7820d3a723e7e41..93ae88445af6973f7ca40bb310856b6c2650c28f 100644
|
| --- a/content/browser/service_worker/service_worker_version.cc
|
| +++ b/content/browser/service_worker/service_worker_version.cc
|
| @@ -236,6 +236,14 @@ class OpenURLObserver : public WebContentsObserver {
|
| // This is only called for main frame navigations in OpenWindowOnUI().
|
| void DidOpenURL(const OpenURLCallback& callback, WebContents* web_contents) {
|
| DCHECK(web_contents);
|
| + WebContentsImpl* web_contents_impl =
|
| + static_cast<WebContentsImpl*>(web_contents);
|
| + // On Mac, if there are no Chrome windows open, ContentBrowserClient::OpenURL
|
| + // will call ui::BaseWindow::Show which opens a new window and makes it the
|
| + // main+key Chrome window, but won't raise it on top of other apps
|
| + // (https://crbug.com/470830). Since openWindow is always called from a user
|
| + // gesture (e.g. notification click), we should additionally raise the window.
|
| + web_contents_impl->Activate();
|
|
|
| RenderFrameHostImpl* rfhi =
|
| static_cast<RenderFrameHostImpl*>(web_contents->GetMainFrame());
|
|
|