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

Unified Diff: content/browser/service_worker/service_worker_client_utils.cc

Issue 2893823004: [Payments] Implement openWindow for service worker based payment handler (Closed)
Patch Set: rename ipc messages Created 3 years, 6 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
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)));
}

Powered by Google App Engine
This is Rietveld 408576698