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/content/payment_request.mojom"; | 7 import "components/payments/content/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 10 matching lines...) Expand all Loading... |
21 string id; | 21 string id; |
22 array<string> enabled_methods; | 22 array<string> enabled_methods; |
23 }; | 23 }; |
24 | 24 |
25 struct PaymentAppManifest { | 25 struct PaymentAppManifest { |
26 string name; | 26 string name; |
27 string? icon; | 27 string? icon; |
28 array<PaymentAppOption> options; | 28 array<PaymentAppOption> options; |
29 }; | 29 }; |
30 | 30 |
31 interface PaymentAppManager { | 31 interface PaymentManager { |
32 Init(string service_worker_scope); | 32 Init(string service_worker_scope); |
33 SetManifest(PaymentAppManifest payment_app_manifest) | 33 SetManifest(PaymentAppManifest payment_app_manifest) |
34 => (PaymentAppManifestError error); | 34 => (PaymentAppManifestError error); |
35 GetManifest() | 35 GetManifest() |
36 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error
); | 36 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error
); |
37 }; | 37 }; |
38 | 38 |
39 struct PaymentAppRequest { | 39 struct PaymentAppRequest { |
40 url.mojom.Url origin; | 40 url.mojom.Url origin; |
41 array<PaymentMethodData> methodData; | 41 array<PaymentMethodData> methodData; |
42 PaymentItem total; | 42 PaymentItem total; |
43 array<PaymentDetailsModifier> modifiers; | 43 array<PaymentDetailsModifier> modifiers; |
44 string optionId; | 44 string optionId; |
45 }; | 45 }; |
46 | 46 |
47 struct PaymentAppResponse { | 47 struct PaymentAppResponse { |
48 string method_name; | 48 string method_name; |
49 string stringified_details; | 49 string stringified_details; |
50 }; | 50 }; |
51 | 51 |
52 // This interface is provided to pass a payment app response from payment | 52 // This interface is provided to pass a payment app response from payment |
53 // request event in renderer side to browser side by calling respondWith(). | 53 // request event in renderer side to browser side by calling respondWith(). |
54 interface PaymentAppResponseCallback { | 54 interface PaymentAppResponseCallback { |
55 OnPaymentAppResponse(PaymentAppResponse response, | 55 OnPaymentAppResponse(PaymentAppResponse response, |
56 mojo.common.mojom.Time dispatch_event_time); | 56 mojo.common.mojom.Time dispatch_event_time); |
57 }; | 57 }; |
OLD | NEW |