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.mojom.payments"] | 5 [JavaPackage="org.chromium.mojom.payments"] |
6 module blink.mojom; | 6 module blink.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 PaymentAddress? shipping_address; | 48 PaymentAddress? shipping_address; |
49 string? shipping_option_id; | 49 string? shipping_option_id; |
50 }; | 50 }; |
51 | 51 |
52 interface PaymentRequestClient { | 52 interface PaymentRequestClient { |
53 OnShippingAddressChange(PaymentAddress address); | 53 OnShippingAddressChange(PaymentAddress address); |
54 OnShippingOptionChange(string shipping_option_id); | 54 OnShippingOptionChange(string shipping_option_id); |
55 OnPaymentResponse(PaymentResponse response); | 55 OnPaymentResponse(PaymentResponse response); |
56 OnError(); | 56 OnError(); |
57 OnComplete(); | 57 OnComplete(); |
| 58 OnAbort(bool aborted_successfully); |
58 }; | 59 }; |
59 | 60 |
60 // The currency amount that the renderer provides to the browser process. The | 61 // The currency amount that the renderer provides to the browser process. The |
61 // browser shows the amount in UI and forwards it on to the payment app, if it | 62 // browser shows the amount in UI and forwards it on to the payment app, if it |
62 // requires the amount. | 63 // requires the amount. |
63 struct CurrencyAmount { | 64 struct CurrencyAmount { |
64 // ISO 4217 currency code. Three upper case ASCII letters. | 65 // ISO 4217 currency code. Three upper case ASCII letters. |
65 string currency_code; | 66 string currency_code; |
66 | 67 |
67 // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction | 68 // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 108 |
108 interface PaymentRequest { | 109 interface PaymentRequest { |
109 SetClient(PaymentRequestClient client); | 110 SetClient(PaymentRequestClient client); |
110 Show(array<PaymentMethodData> methodData, | 111 Show(array<PaymentMethodData> methodData, |
111 PaymentDetails details, | 112 PaymentDetails details, |
112 PaymentOptions options); | 113 PaymentOptions options); |
113 UpdateWith(PaymentDetails details); | 114 UpdateWith(PaymentDetails details); |
114 Abort(); | 115 Abort(); |
115 Complete(bool success); | 116 Complete(bool success); |
116 }; | 117 }; |
OLD | NEW |