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 [JavaPackage="org.chromium.payments.mojom"] | 5 [JavaPackage="org.chromium.payments.mojom"] |
6 module payments.mojom; | 6 module payments.mojom; |
7 | 7 |
8 // The shipping address that the browser process provides to the renderer | 8 // The shipping address that the browser process provides to the renderer |
9 // process. Built either by the browser or a payment app. | 9 // process. Built either by the browser or a payment app. |
10 struct PaymentAddress { | 10 struct PaymentAddress { |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 array<PaymentItem> additional_display_items; | 181 array<PaymentItem> additional_display_items; |
182 PaymentMethodData method_data; | 182 PaymentMethodData method_data; |
183 }; | 183 }; |
184 | 184 |
185 struct PaymentDetails { | 185 struct PaymentDetails { |
186 PaymentItem total; | 186 PaymentItem total; |
187 array<PaymentItem> display_items; | 187 array<PaymentItem> display_items; |
188 array<PaymentShippingOption> shipping_options; | 188 array<PaymentShippingOption> shipping_options; |
189 array<PaymentDetailsModifier> modifiers; | 189 array<PaymentDetailsModifier> modifiers; |
190 string error = ""; | 190 string error = ""; |
| 191 // Identifier identifying the payment request, to be exposed |
| 192 // to payment apps. It is optional since this structure is used |
| 193 // by PaymentDetailsUpdate (next to PaymentDetailsInit) but |
| 194 // PaymentDetailsUpdate has no id. |
| 195 string? id; |
191 }; | 196 }; |
192 | 197 |
193 enum PaymentShippingType { | 198 enum PaymentShippingType { |
194 SHIPPING, | 199 SHIPPING, |
195 DELIVERY, | 200 DELIVERY, |
196 PICKUP | 201 PICKUP |
197 }; | 202 }; |
198 | 203 |
199 struct PaymentOptions { | 204 struct PaymentOptions { |
200 bool request_payer_name; | 205 bool request_payer_name; |
(...skipping 13 matching lines...) Expand all Loading... |
214 Init(PaymentRequestClient client, | 219 Init(PaymentRequestClient client, |
215 array<PaymentMethodData> method_data, | 220 array<PaymentMethodData> method_data, |
216 PaymentDetails details, | 221 PaymentDetails details, |
217 PaymentOptions options); | 222 PaymentOptions options); |
218 Show(); | 223 Show(); |
219 UpdateWith(PaymentDetails details); | 224 UpdateWith(PaymentDetails details); |
220 Abort(); | 225 Abort(); |
221 Complete(PaymentComplete result); | 226 Complete(PaymentComplete result); |
222 CanMakePayment(); | 227 CanMakePayment(); |
223 }; | 228 }; |
OLD | NEW |