| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // blink::JSONObject::toJSONString() to generate this string. The browser | 102 // blink::JSONObject::toJSONString() to generate this string. The browser |
| 103 // parses the string via JSONObject(JsonSanitizer.sanitize(stringified_data)) | 103 // parses the string via JSONObject(JsonSanitizer.sanitize(stringified_data)) |
| 104 // and passes a part of the JSON object to the payment app, for example | 104 // and passes a part of the JSON object to the payment app, for example |
| 105 // Android Pay. There's no one format for this object, so richer types cannot | 105 // Android Pay. There's no one format for this object, so richer types cannot |
| 106 // be used. A simple example: | 106 // be used. A simple example: |
| 107 // | 107 // |
| 108 // {"gateway": "stripe"} | 108 // {"gateway": "stripe"} |
| 109 string stringified_data; | 109 string stringified_data; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 enum PaymentComplete { |
| 113 SUCCESS, |
| 114 FAIL, |
| 115 UNKNOWN |
| 116 }; |
| 117 |
| 112 interface PaymentRequest { | 118 interface PaymentRequest { |
| 113 SetClient(PaymentRequestClient client); | 119 SetClient(PaymentRequestClient client); |
| 114 Show(array<PaymentMethodData> methodData, | 120 Show(array<PaymentMethodData> methodData, |
| 115 PaymentDetails details, | 121 PaymentDetails details, |
| 116 PaymentOptions options); | 122 PaymentOptions options); |
| 117 UpdateWith(PaymentDetails details); | 123 UpdateWith(PaymentDetails details); |
| 118 Abort(); | 124 Abort(); |
| 119 Complete(bool success); | 125 Complete(PaymentComplete result); |
| 120 }; | 126 }; |
| OLD | NEW |