| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 bool selected; | 85 bool selected; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 struct PaymentDetails { | 88 struct PaymentDetails { |
| 89 PaymentItem total; | 89 PaymentItem total; |
| 90 array<PaymentItem> display_items; | 90 array<PaymentItem> display_items; |
| 91 array<PaymentShippingOption> shipping_options; | 91 array<PaymentShippingOption> shipping_options; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 struct PaymentOptions { | 94 struct PaymentOptions { |
| 95 bool request_payer_email; |
| 96 bool request_payer_phone; |
| 95 bool request_shipping; | 97 bool request_shipping; |
| 96 }; | 98 }; |
| 97 | 99 |
| 98 struct PaymentMethodData { | 100 struct PaymentMethodData { |
| 99 array<string> supported_methods; | 101 array<string> supported_methods; |
| 100 // A JSON string built by the renderer from a JavaScript object that the | 102 // A JSON string built by the renderer from a JavaScript object that the |
| 101 // merchant website provides. The renderer uses | 103 // merchant website provides. The renderer uses |
| 102 // blink::JSONObject::toJSONString() to generate this string. The browser | 104 // blink::JSONObject::toJSONString() to generate this string. The browser |
| 103 // parses the string via JSONObject(JsonSanitizer.sanitize(stringified_data)) | 105 // parses the string via JSONObject(JsonSanitizer.sanitize(stringified_data)) |
| 104 // and passes a part of the JSON object to the payment app, for example | 106 // and passes a part of the JSON object to the payment app, for example |
| (...skipping 12 matching lines...) Expand all Loading... |
| 117 | 119 |
| 118 interface PaymentRequest { | 120 interface PaymentRequest { |
| 119 SetClient(PaymentRequestClient client); | 121 SetClient(PaymentRequestClient client); |
| 120 Show(array<PaymentMethodData> methodData, | 122 Show(array<PaymentMethodData> methodData, |
| 121 PaymentDetails details, | 123 PaymentDetails details, |
| 122 PaymentOptions options); | 124 PaymentOptions options); |
| 123 UpdateWith(PaymentDetails details); | 125 UpdateWith(PaymentDetails details); |
| 124 Abort(); | 126 Abort(); |
| 125 Complete(PaymentComplete result); | 127 Complete(PaymentComplete result); |
| 126 }; | 128 }; |
| OLD | NEW |