OLD | NEW |
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.graphics.drawable.Drawable; | 7 import android.graphics.drawable.Drawable; |
8 | 8 |
9 import org.chromium.base.annotations.CalledByNative; | 9 import org.chromium.base.annotations.CalledByNative; |
10 import org.chromium.base.annotations.SuppressFBWarnings; | 10 import org.chromium.base.annotations.SuppressFBWarnings; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 * | 67 * |
68 * @param webContents The web contents that invoked PaymentRequest. | 68 * @param webContents The web contents that invoked PaymentRequest. |
69 * @param registrationId The service worker registration ID of the Payment A
pp. | 69 * @param registrationId The service worker registration ID of the Payment A
pp. |
70 * @param optionId The ID of the PaymentOption that was selected by th
e user. | 70 * @param optionId The ID of the PaymentOption that was selected by th
e user. |
71 * @param methodData The PaymentMethodData objects that are relevant for
this payment | 71 * @param methodData The PaymentMethodData objects that are relevant for
this payment |
72 * app. | 72 * app. |
73 * @param total The PaymentItem that represents the total cost of t
he payment. | 73 * @param total The PaymentItem that represents the total cost of t
he payment. |
74 * @param modifiers Payment method specific modifiers to the payment it
ems and the total. | 74 * @param modifiers Payment method specific modifiers to the payment it
ems and the total. |
75 */ | 75 */ |
76 public static void invokePaymentApp(WebContents webContents, long registrati
onId, | 76 public static void invokePaymentApp(WebContents webContents, long registrati
onId, |
77 String optionId, String origin, Set<PaymentMethodData> methodData, P
aymentItem total, | 77 String optionId, String origin, String unusedIframeOrigin, |
78 List<PaymentItem> displayItems, Set<PaymentDetailsModifier> modifier
s) { | 78 Set<PaymentMethodData> methodData, PaymentItem total, List<PaymentIt
em> displayItems, |
| 79 Set<PaymentDetailsModifier> modifiers) { |
79 nativeInvokePaymentApp(webContents, registrationId, optionId, origin, | 80 nativeInvokePaymentApp(webContents, registrationId, optionId, origin, |
80 methodData.toArray(new PaymentMethodData[0]), total, | 81 methodData.toArray(new PaymentMethodData[0]), total, |
81 modifiers.toArray(new PaymentDetailsModifier[0])); | 82 modifiers.toArray(new PaymentDetailsModifier[0])); |
82 } | 83 } |
83 | 84 |
84 @CalledByNative | 85 @CalledByNative |
85 private static Manifest createManifest(long registrationId, String label, St
ring icon) { | 86 private static Manifest createManifest(long registrationId, String label, St
ring icon) { |
86 Manifest manifest = new Manifest(); | 87 Manifest manifest = new Manifest(); |
87 manifest.registrationId = registrationId; | 88 manifest.registrationId = registrationId; |
88 manifest.label = label; | 89 manifest.label = label; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 * TODO(tommyt): crbug.com/505554. Change the |callback| parameter below to | 161 * TODO(tommyt): crbug.com/505554. Change the |callback| parameter below to |
161 * be of type PaymentAppFactory.PaymentAppCreatedCallback, once this JNI bug | 162 * be of type PaymentAppFactory.PaymentAppCreatedCallback, once this JNI bug |
162 * has been resolved. | 163 * has been resolved. |
163 */ | 164 */ |
164 private static native void nativeGetAllAppManifests(WebContents webContents,
Object callback); | 165 private static native void nativeGetAllAppManifests(WebContents webContents,
Object callback); |
165 | 166 |
166 private static native void nativeInvokePaymentApp(WebContents webContents, l
ong registrationId, | 167 private static native void nativeInvokePaymentApp(WebContents webContents, l
ong registrationId, |
167 String optionId, String origin, PaymentMethodData[] methodData, Paym
entItem total, | 168 String optionId, String origin, PaymentMethodData[] methodData, Paym
entItem total, |
168 PaymentDetailsModifier[] modifiers); | 169 PaymentDetailsModifier[] modifiers); |
169 } | 170 } |
OLD | NEW |