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