| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // be successfully parsed into base::JSONParser. Renderer parses this string | 53 // be successfully parsed into base::JSONParser. Renderer parses this string |
| 54 // via v8::JSON::Parse() and hands off the result to the merchant website. | 54 // via v8::JSON::Parse() and hands off the result to the merchant website. |
| 55 // There's no one format for this object, so richer types cannot be used. A | 55 // There's no one format for this object, so richer types cannot be used. A |
| 56 // simple example: | 56 // simple example: |
| 57 // | 57 // |
| 58 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} | 58 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} |
| 59 string stringified_details; | 59 string stringified_details; |
| 60 | 60 |
| 61 PaymentAddress? shipping_address; | 61 PaymentAddress? shipping_address; |
| 62 string? shipping_option_id; | 62 string? shipping_option_id; |
| 63 string? payer_email; |
| 64 string? payer_phone; |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 interface PaymentRequestClient { | 67 interface PaymentRequestClient { |
| 66 OnShippingAddressChange(PaymentAddress address); | 68 OnShippingAddressChange(PaymentAddress address); |
| 67 OnShippingOptionChange(string shipping_option_id); | 69 OnShippingOptionChange(string shipping_option_id); |
| 68 OnPaymentResponse(PaymentResponse response); | 70 OnPaymentResponse(PaymentResponse response); |
| 69 OnError(); | 71 OnError(); |
| 70 OnComplete(); | 72 OnComplete(); |
| 71 OnAbort(bool aborted_successfully); | 73 OnAbort(bool aborted_successfully); |
| 72 }; | 74 }; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 111 |
| 110 interface PaymentRequest { | 112 interface PaymentRequest { |
| 111 SetClient(PaymentRequestClient client); | 113 SetClient(PaymentRequestClient client); |
| 112 Show(array<PaymentMethodData> methodData, | 114 Show(array<PaymentMethodData> methodData, |
| 113 PaymentDetails details, | 115 PaymentDetails details, |
| 114 PaymentOptions options); | 116 PaymentOptions options); |
| 115 UpdateWith(PaymentDetails details); | 117 UpdateWith(PaymentDetails details); |
| 116 Abort(); | 118 Abort(); |
| 117 Complete(bool success); | 119 Complete(bool success); |
| 118 }; | 120 }; |
| OLD | NEW |