| 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 module payments.mojom; | 5 module payments.mojom; |
| 6 | 6 |
| 7 import "components/payments/mojom/payment_request.mojom"; | 7 import "components/payments/mojom/payment_request.mojom"; |
| 8 import "mojo/common/time.mojom"; | 8 import "mojo/common/time.mojom"; |
| 9 import "url/mojo/url.mojom"; | 9 import "url/mojo/url.mojom"; |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 interface PaymentManager { | 45 interface PaymentManager { |
| 46 Init(string service_worker_scope); | 46 Init(string service_worker_scope); |
| 47 SetManifest(PaymentAppManifest payment_app_manifest) | 47 SetManifest(PaymentAppManifest payment_app_manifest) |
| 48 => (PaymentAppManifestError error); | 48 => (PaymentAppManifestError error); |
| 49 GetManifest() | 49 GetManifest() |
| 50 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error
); | 50 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error
); |
| 51 DeletePaymentInstrument(string instrument_key) | 51 DeletePaymentInstrument(string instrument_key) |
| 52 => (PaymentHandlerStatus status); | 52 => (PaymentHandlerStatus status); |
| 53 GetPaymentInstrument(string instrument_key) |
| 54 => (PaymentInstrument instrument, PaymentHandlerStatus status); |
| 55 KeysOfPaymentInstruments() |
| 56 => (array<string> keys, PaymentHandlerStatus status); |
| 57 HasPaymentInstrument(string instrument_key) |
| 58 => (PaymentHandlerStatus status); |
| 53 SetPaymentInstrument(string instrument_key, PaymentInstrument instrument) | 59 SetPaymentInstrument(string instrument_key, PaymentInstrument instrument) |
| 54 => (PaymentHandlerStatus status); | 60 => (PaymentHandlerStatus status); |
| 55 HasPaymentInstrument(string instrument_key) | |
| 56 => (PaymentHandlerStatus status); | |
| 57 GetPaymentInstrument(string instrument_key) | |
| 58 => (PaymentInstrument instrument, PaymentHandlerStatus status); | |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 struct PaymentAppRequest { | 63 struct PaymentAppRequest { |
| 62 url.mojom.Url origin; | 64 url.mojom.Url origin; |
| 63 array<PaymentMethodData> method_data; | 65 array<PaymentMethodData> method_data; |
| 64 PaymentItem total; | 66 PaymentItem total; |
| 65 array<PaymentDetailsModifier> modifiers; | 67 array<PaymentDetailsModifier> modifiers; |
| 66 string option_id; | 68 string option_id; |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 struct PaymentAppResponse { | 71 struct PaymentAppResponse { |
| 70 string method_name; | 72 string method_name; |
| 71 string stringified_details; | 73 string stringified_details; |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 // This interface is provided to pass a payment app response from payment | 76 // This interface is provided to pass a payment app response from payment |
| 75 // request event in renderer side to browser side by calling respondWith(). | 77 // request event in renderer side to browser side by calling respondWith(). |
| 76 interface PaymentAppResponseCallback { | 78 interface PaymentAppResponseCallback { |
| 77 OnPaymentAppResponse(PaymentAppResponse response, | 79 OnPaymentAppResponse(PaymentAppResponse response, |
| 78 mojo.common.mojom.Time dispatch_event_time); | 80 mojo.common.mojom.Time dispatch_event_time); |
| 79 }; | 81 }; |
| OLD | NEW |