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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 SetPaymentInstrument(string instrument_key, PaymentInstrument instrument) | 53 SetPaymentInstrument(string instrument_key, PaymentInstrument instrument) |
54 => (PaymentHandlerStatus status); | 54 => (PaymentHandlerStatus status); |
| 55 HasPaymentInstrument(string instrument_key) |
| 56 => (PaymentHandlerStatus status); |
55 GetPaymentInstrument(string instrument_key) | 57 GetPaymentInstrument(string instrument_key) |
56 => (PaymentInstrument instrument, PaymentHandlerStatus status); | 58 => (PaymentInstrument instrument, PaymentHandlerStatus status); |
57 }; | 59 }; |
58 | 60 |
59 struct PaymentAppRequest { | 61 struct PaymentAppRequest { |
60 url.mojom.Url origin; | 62 url.mojom.Url origin; |
61 array<PaymentMethodData> methodData; | 63 array<PaymentMethodData> methodData; |
62 PaymentItem total; | 64 PaymentItem total; |
63 array<PaymentDetailsModifier> modifiers; | 65 array<PaymentDetailsModifier> modifiers; |
64 string optionId; | 66 string optionId; |
65 }; | 67 }; |
66 | 68 |
67 struct PaymentAppResponse { | 69 struct PaymentAppResponse { |
68 string method_name; | 70 string method_name; |
69 string stringified_details; | 71 string stringified_details; |
70 }; | 72 }; |
71 | 73 |
72 // This interface is provided to pass a payment app response from payment | 74 // This interface is provided to pass a payment app response from payment |
73 // request event in renderer side to browser side by calling respondWith(). | 75 // request event in renderer side to browser side by calling respondWith(). |
74 interface PaymentAppResponseCallback { | 76 interface PaymentAppResponseCallback { |
75 OnPaymentAppResponse(PaymentAppResponse response, | 77 OnPaymentAppResponse(PaymentAppResponse response, |
76 mojo.common.mojom.Time dispatch_event_time); | 78 mojo.common.mojom.Time dispatch_event_time); |
77 }; | 79 }; |
OLD | NEW |