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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 PaymentAddress? shipping_address; | 61 PaymentAddress? shipping_address; |
62 string? shipping_option_id; | 62 string? shipping_option_id; |
63 }; | 63 }; |
64 | 64 |
65 interface PaymentRequestClient { | 65 interface PaymentRequestClient { |
66 OnShippingAddressChange(PaymentAddress address); | 66 OnShippingAddressChange(PaymentAddress address); |
67 OnShippingOptionChange(string shipping_option_id); | 67 OnShippingOptionChange(string shipping_option_id); |
68 OnPaymentResponse(PaymentResponse response); | 68 OnPaymentResponse(PaymentResponse response); |
69 OnError(); | 69 OnError(); |
70 OnComplete(); | 70 OnComplete(); |
| 71 OnAbort(bool aborted_successfully); |
71 }; | 72 }; |
72 | 73 |
73 struct PaymentItem { | 74 struct PaymentItem { |
74 string label; | 75 string label; |
75 CurrencyAmount amount; | 76 CurrencyAmount amount; |
76 }; | 77 }; |
77 | 78 |
78 struct ShippingOption { | 79 struct ShippingOption { |
79 string id; | 80 string id; |
80 string label; | 81 string label; |
(...skipping 27 matching lines...) Expand all Loading... |
108 | 109 |
109 interface PaymentRequest { | 110 interface PaymentRequest { |
110 SetClient(PaymentRequestClient client); | 111 SetClient(PaymentRequestClient client); |
111 Show(array<PaymentMethodData> methodData, | 112 Show(array<PaymentMethodData> methodData, |
112 PaymentDetails details, | 113 PaymentDetails details, |
113 PaymentOptions options); | 114 PaymentOptions options); |
114 UpdateWith(PaymentDetails details); | 115 UpdateWith(PaymentDetails details); |
115 Abort(); | 116 Abort(); |
116 Complete(bool success); | 117 Complete(bool success); |
117 }; | 118 }; |
OLD | NEW |