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/payment_request.mojom"; |
| 8 import "url/mojo/url.mojom"; |
| 9 |
7 enum PaymentAppManifestError { | 10 enum PaymentAppManifestError { |
8 NONE, | 11 NONE, |
9 NOT_IMPLEMENTED, | 12 NOT_IMPLEMENTED, |
10 NO_ACTIVE_WORKER, | 13 NO_ACTIVE_WORKER, |
11 MANIFEST_STORAGE_OPERATION_FAILED, | 14 MANIFEST_STORAGE_OPERATION_FAILED, |
12 }; | 15 }; |
13 | 16 |
14 struct PaymentAppOption { | 17 struct PaymentAppOption { |
15 string name; | 18 string name; |
16 string? icon; | 19 string? icon; |
17 string id; | 20 string id; |
18 array<string> enabled_methods; | 21 array<string> enabled_methods; |
19 }; | 22 }; |
20 | 23 |
21 struct PaymentAppManifest { | 24 struct PaymentAppManifest { |
22 string name; | 25 string name; |
23 string? icon; | 26 string? icon; |
24 array<PaymentAppOption> options; | 27 array<PaymentAppOption> options; |
25 }; | 28 }; |
26 | 29 |
27 interface PaymentAppManager { | 30 interface PaymentAppManager { |
28 Init(string service_worker_scope); | 31 Init(string service_worker_scope); |
29 SetManifest(PaymentAppManifest payment_app_manifest) | 32 SetManifest(PaymentAppManifest payment_app_manifest) |
30 => (PaymentAppManifestError error); | 33 => (PaymentAppManifestError error); |
31 GetManifest() | 34 GetManifest() |
32 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error
); | 35 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error
); |
33 }; | 36 }; |
| 37 |
| 38 struct PaymentAppRequestData { |
| 39 url.mojom.Url origin; |
| 40 array<PaymentMethodData> methodData; |
| 41 PaymentItem total; |
| 42 array<PaymentDetailsModifier> modifiers; |
| 43 string optionId; |
| 44 }; |
OLD | NEW |