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 2888bd48de6fa6f1f0374f70b58940686f576798..efdbaa839786cc8556788eafbc985c4a2adfd624 100644 |
--- a/content/browser/service_worker/service_worker_client_utils.cc |
+++ b/content/browser/service_worker/service_worker_client_utils.cc |
@@ -180,6 +180,7 @@ void OpenWindowOnUI( |
const GURL& script_url, |
int worker_process_id, |
const scoped_refptr<ServiceWorkerContextWrapper>& context_wrapper, |
+ WindowOpenDisposition disposition, |
const OpenURLCallback& callback) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
@@ -205,8 +206,8 @@ void OpenWindowOnUI( |
url, |
Referrer::SanitizeForRequest( |
url, Referrer(script_url, blink::kWebReferrerPolicyDefault)), |
- WindowOpenDisposition::NEW_FOREGROUND_TAB, |
- ui::PAGE_TRANSITION_AUTO_TOPLEVEL, true /* is_renderer_initiated */); |
+ disposition, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
+ true /* is_renderer_initiated */); |
GetContentClient()->browser()->OpenURL(browser_context, params, |
base::Bind(&DidOpenURLOnUI, callback)); |
@@ -438,13 +439,14 @@ void OpenWindow(const GURL& url, |
const GURL& script_url, |
int worker_process_id, |
const base::WeakPtr<ServiceWorkerContextCore>& context, |
+ WindowOpenDisposition disposition, |
const NavigationCallback& callback) { |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |
BrowserThread::PostTask( |
BrowserThread::UI, FROM_HERE, |
base::Bind( |
&OpenWindowOnUI, url, script_url, worker_process_id, |
- make_scoped_refptr(context->wrapper()), |
+ make_scoped_refptr(context->wrapper()), disposition, |
base::Bind(&DidNavigate, context, script_url.GetOrigin(), callback))); |
} |