| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 string? payer_email; | 70 string? payer_email; |
| 71 string? payer_phone; | 71 string? payer_phone; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 enum PaymentErrorReason { | 74 enum PaymentErrorReason { |
| 75 UNKNOWN, | 75 UNKNOWN, |
| 76 USER_CANCEL, | 76 USER_CANCEL, |
| 77 NOT_SUPPORTED | 77 NOT_SUPPORTED |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 enum ActivePaymentQueryResult { | 80 enum CanMakePaymentQueryResult { |
| 81 CAN_MAKE_ACTIVE_PAYMENT, | 81 CAN_MAKE_PAYMENT, |
| 82 CANNOT_MAKE_ACTIVE_PAYMENT, | 82 CANNOT_MAKE_PAYMENT, |
| 83 QUERY_QUOTA_EXCEEDED | 83 QUERY_QUOTA_EXCEEDED |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 interface PaymentRequestClient { | 86 interface PaymentRequestClient { |
| 87 OnShippingAddressChange(PaymentAddress address); | 87 OnShippingAddressChange(PaymentAddress address); |
| 88 OnShippingOptionChange(string shipping_option_id); | 88 OnShippingOptionChange(string shipping_option_id); |
| 89 OnPaymentResponse(PaymentResponse response); | 89 OnPaymentResponse(PaymentResponse response); |
| 90 OnError(PaymentErrorReason error); | 90 OnError(PaymentErrorReason error); |
| 91 OnComplete(); | 91 OnComplete(); |
| 92 OnAbort(bool aborted_successfully); | 92 OnAbort(bool aborted_successfully); |
| 93 OnCanMakeActivePayment(ActivePaymentQueryResult result); | 93 OnCanMakePayment(CanMakePaymentQueryResult result); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 struct PaymentItem { | 96 struct PaymentItem { |
| 97 string label; | 97 string label; |
| 98 PaymentCurrencyAmount amount; | 98 PaymentCurrencyAmount amount; |
| 99 bool pending; | 99 bool pending; |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 struct PaymentShippingOption { | 102 struct PaymentShippingOption { |
| 103 string id; | 103 string id; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 interface PaymentRequest { | 190 interface PaymentRequest { |
| 191 Init(PaymentRequestClient client, | 191 Init(PaymentRequestClient client, |
| 192 array<PaymentMethodData> methodData, | 192 array<PaymentMethodData> methodData, |
| 193 PaymentDetails details, | 193 PaymentDetails details, |
| 194 PaymentOptions options); | 194 PaymentOptions options); |
| 195 Show(); | 195 Show(); |
| 196 UpdateWith(PaymentDetails details); | 196 UpdateWith(PaymentDetails details); |
| 197 Abort(); | 197 Abort(); |
| 198 Complete(PaymentComplete result); | 198 Complete(PaymentComplete result); |
| 199 CanMakeActivePayment(); | 199 CanMakePayment(); |
| 200 }; | 200 }; |
| OLD | NEW |