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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java

Issue 2739033004: Send origin of the iframe browsing context (Closed)
Patch Set: Really fix serviceworker part Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.payments; 5 package org.chromium.chrome.browser.payments;
6 6
7 import android.os.Handler; 7 import android.os.Handler;
8 8
9 import org.chromium.content_public.browser.WebContents; 9 import org.chromium.content_public.browser.WebContents;
10 import org.chromium.payments.mojom.PaymentMethodData; 10 import org.chromium.payments.mojom.PaymentMethodData;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 mManifest = manifest; 43 mManifest = manifest;
44 44
45 mMethodNames = new HashSet<>(); 45 mMethodNames = new HashSet<>();
46 for (ServiceWorkerPaymentAppBridge.Option option : manifest.options) { 46 for (ServiceWorkerPaymentAppBridge.Option option : manifest.options) {
47 mMethodNames.addAll(option.enabledMethods); 47 mMethodNames.addAll(option.enabledMethods);
48 } 48 }
49 } 49 }
50 50
51 @Override 51 @Override
52 public void getInstruments(Map<String, PaymentMethodData> unusedMethodDataMa p, 52 public void getInstruments(Map<String, PaymentMethodData> unusedMethodDataMa p,
53 String unusedOrigin, byte[][] unusedCertificateChain, 53 String unusedOrigin, String unusedIFrameOrigin, byte[][] unusedCerti ficateChain,
54 final InstrumentsCallback callback) { 54 final InstrumentsCallback callback) {
55 final List<PaymentInstrument> instruments = 55 final List<PaymentInstrument> instruments =
56 new ArrayList<PaymentInstrument>(); 56 new ArrayList<PaymentInstrument>();
57 57
58 for (ServiceWorkerPaymentAppBridge.Option option : mManifest.options) { 58 for (ServiceWorkerPaymentAppBridge.Option option : mManifest.options) {
59 instruments.add(new ServiceWorkerPaymentInstrument( 59 instruments.add(new ServiceWorkerPaymentInstrument(
60 mWebContents, mManifest.registrationId, option)); 60 mWebContents, mManifest.registrationId, option));
61 } 61 }
62 62
63 new Handler().post(new Runnable() { 63 new Handler().post(new Runnable() {
(...skipping 13 matching lines...) Expand all
77 public boolean supportsMethodsAndData(Map<String, PaymentMethodData> methods AndData) { 77 public boolean supportsMethodsAndData(Map<String, PaymentMethodData> methods AndData) {
78 // TODO(tommyt): crbug.com/669876. Implement this for Service Worker Pay ment Apps. 78 // TODO(tommyt): crbug.com/669876. Implement this for Service Worker Pay ment Apps.
79 return true; 79 return true;
80 } 80 }
81 81
82 @Override 82 @Override
83 public String getAppIdentifier() { 83 public String getAppIdentifier() {
84 return "Chrome_Service_Worker_Payment_App"; 84 return "Chrome_Service_Worker_Payment_App";
85 } 85 }
86 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698