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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 PaymentCurrencyAmount amount; | 77 PaymentCurrencyAmount amount; |
78 }; | 78 }; |
79 | 79 |
80 struct PaymentShippingOption { | 80 struct PaymentShippingOption { |
81 string id; | 81 string id; |
82 string label; | 82 string label; |
83 PaymentCurrencyAmount amount; | 83 PaymentCurrencyAmount amount; |
84 bool selected; | 84 bool selected; |
85 }; | 85 }; |
86 | 86 |
| 87 struct PaymentDetailsModifier { |
| 88 array<string> supported_methods; |
| 89 PaymentItem total; |
| 90 array<PaymentItem> additional_display_items; |
| 91 }; |
| 92 |
87 struct PaymentDetails { | 93 struct PaymentDetails { |
88 PaymentItem total; | 94 PaymentItem total; |
89 array<PaymentItem> display_items; | 95 array<PaymentItem> display_items; |
90 array<PaymentShippingOption> shipping_options; | 96 array<PaymentShippingOption> shipping_options; |
| 97 array<PaymentDetailsModifier> modifiers; |
91 }; | 98 }; |
92 | 99 |
93 struct PaymentOptions { | 100 struct PaymentOptions { |
94 bool request_payer_email; | 101 bool request_payer_email; |
95 bool request_payer_phone; | 102 bool request_payer_phone; |
96 bool request_shipping; | 103 bool request_shipping; |
97 }; | 104 }; |
98 | 105 |
99 struct PaymentMethodData { | 106 struct PaymentMethodData { |
100 array<string> supported_methods; | 107 array<string> supported_methods; |
(...skipping 17 matching lines...) Expand all Loading... |
118 | 125 |
119 interface PaymentRequest { | 126 interface PaymentRequest { |
120 SetClient(PaymentRequestClient client); | 127 SetClient(PaymentRequestClient client); |
121 Show(array<PaymentMethodData> methodData, | 128 Show(array<PaymentMethodData> methodData, |
122 PaymentDetails details, | 129 PaymentDetails details, |
123 PaymentOptions options); | 130 PaymentOptions options); |
124 UpdateWith(PaymentDetails details); | 131 UpdateWith(PaymentDetails details); |
125 Abort(); | 132 Abort(); |
126 Complete(PaymentComplete result); | 133 Complete(PaymentComplete result); |
127 }; | 134 }; |
OLD | NEW |