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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentApp.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 org.chromium.payments.mojom.PaymentMethodData; 7 import org.chromium.payments.mojom.PaymentMethodData;
8 8
9 import java.util.List; 9 import java.util.List;
10 import java.util.Map; 10 import java.util.Map;
(...skipping 20 matching lines...) Expand all
31 /** 31 /**
32 * Provides a list of all payment instruments in this app. For example, this can be all credit 32 * Provides a list of all payment instruments in this app. For example, this can be all credit
33 * cards for the current profile. Can return null or empty list, e.g., if us er has no locally 33 * cards for the current profile. Can return null or empty list, e.g., if us er has no locally
34 * stored credit cards. 34 * stored credit cards.
35 * 35 *
36 * @param methodDataMap The map from methods to method specific data. The data contains such 36 * @param methodDataMap The map from methods to method specific data. The data contains such
37 * information as whether the app should be invoked in test or 37 * information as whether the app should be invoked in test or
38 * production 38 * production
39 * mode, merchant identifier, or a public key. 39 * mode, merchant identifier, or a public key.
40 * @param origin The origin of this merchant. 40 * @param origin The origin of this merchant.
41 * @param iframeOrigin The origin of the iframe browsing context that in voked
42 * PaymentRequest.
41 * @param certificateChain The site certificate chain of the merchant. 43 * @param certificateChain The site certificate chain of the merchant.
42 * @param callback The object that will receive the list of instrume nts. 44 * @param callback The object that will receive the list of instrume nts.
43 */ 45 */
44 void getInstruments(Map<String, PaymentMethodData> methodDataMap, String ori gin, 46 void getInstruments(Map<String, PaymentMethodData> methodDataMap, String ori gin,
45 byte[][] certificateChain, InstrumentsCallback callback); 47 String iframeOrigin, byte[][] certificateChain, InstrumentsCallback callback);
46 48
47 /** 49 /**
48 * Returns a list of all payment method names that this app supports. For ex ample, ["visa", 50 * Returns a list of all payment method names that this app supports. For ex ample, ["visa",
49 * "mastercard", "basic-card"] in basic card payments. Should return a list of at least one 51 * "mastercard", "basic-card"] in basic card payments. Should return a list of at least one
50 * method name. https://w3c.github.io/webpayments-methods-card/#method-id 52 * method name. https://w3c.github.io/webpayments-methods-card/#method-id
51 * 53 *
52 * @return The list of all payment method names that this app supports. 54 * @return The list of all payment method names that this app supports.
53 */ 55 */
54 Set<String> getAppMethodNames(); 56 Set<String> getAppMethodNames();
55 57
56 /** 58 /**
57 * Checks whether the app can support the payment methods when the method-sp ecific data is taken 59 * Checks whether the app can support the payment methods when the method-sp ecific data is taken
58 * into account. 60 * into account.
59 * 61 *
60 * @param methodDataMap A mapping from the payment methods supported by this app to the 62 * @param methodDataMap A mapping from the payment methods supported by this app to the
61 * corresponding method-specific data. Should not be nu ll. 63 * corresponding method-specific data. Should not be nu ll.
62 * @return True if the given methods are supported when the method-specific data is taken into 64 * @return True if the given methods are supported when the method-specific data is taken into
63 * account. 65 * account.
64 */ 66 */
65 boolean supportsMethodsAndData(Map<String, PaymentMethodData> methodDataMap) ; 67 boolean supportsMethodsAndData(Map<String, PaymentMethodData> methodDataMap) ;
66 68
67 /** 69 /**
68 * Returns the identifier for this payment app to be saved in user preferenc es. For example, 70 * Returns the identifier for this payment app to be saved in user preferenc es. For example,
69 * this can be "autofill", "https://android.com/pay", or "com.example.app.Ex amplePaymentApp". 71 * this can be "autofill", "https://android.com/pay", or "com.example.app.Ex amplePaymentApp".
70 * 72 *
71 * @return The identifier for this payment app. 73 * @return The identifier for this payment app.
72 */ 74 */
73 String getAppIdentifier(); 75 String getAppIdentifier();
74 } 76 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698