| 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 29 matching lines...) Expand all Loading... |
| 40 // be successfully parsed into base::JSONParser. Renderer parses this string | 40 // be successfully parsed into base::JSONParser. Renderer parses this string |
| 41 // via v8::JSON::Parse() and hands off the result to the merchant website. | 41 // via v8::JSON::Parse() and hands off the result to the merchant website. |
| 42 // There's no one format for this object, so richer types cannot be used. A | 42 // There's no one format for this object, so richer types cannot be used. A |
| 43 // simple example: | 43 // simple example: |
| 44 // | 44 // |
| 45 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} | 45 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} |
| 46 string stringified_details; | 46 string stringified_details; |
| 47 | 47 |
| 48 PaymentAddress? shipping_address; | 48 PaymentAddress? shipping_address; |
| 49 string? shipping_option_id; | 49 string? shipping_option_id; |
| 50 string? payer_email; |
| 51 string? payer_phone; |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 interface PaymentRequestClient { | 54 interface PaymentRequestClient { |
| 53 OnShippingAddressChange(PaymentAddress address); | 55 OnShippingAddressChange(PaymentAddress address); |
| 54 OnShippingOptionChange(string shipping_option_id); | 56 OnShippingOptionChange(string shipping_option_id); |
| 55 OnPaymentResponse(PaymentResponse response); | 57 OnPaymentResponse(PaymentResponse response); |
| 56 OnError(); | 58 OnError(); |
| 57 OnComplete(); | 59 OnComplete(); |
| 58 }; | 60 }; |
| 59 | 61 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 109 |
| 108 interface PaymentRequest { | 110 interface PaymentRequest { |
| 109 SetClient(PaymentRequestClient client); | 111 SetClient(PaymentRequestClient client); |
| 110 Show(array<PaymentMethodData> methodData, | 112 Show(array<PaymentMethodData> methodData, |
| 111 PaymentDetails details, | 113 PaymentDetails details, |
| 112 PaymentOptions options); | 114 PaymentOptions options); |
| 113 UpdateWith(PaymentDetails details); | 115 UpdateWith(PaymentDetails details); |
| 114 Abort(); | 116 Abort(); |
| 115 Complete(bool success); | 117 Complete(bool success); |
| 116 }; | 118 }; |
| OLD | NEW |