Chromium Code Reviews| 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 |
| 27 interface PaymentAppManager { | 29 interface PaymentAppManager { |
| 28 Init(string service_worker_scope); | 30 Init(string service_worker_scope); |
| 29 SetManifest(PaymentAppManifest payment_app_manifest) | 31 SetManifest(PaymentAppManifest payment_app_manifest) |
| 30 => (PaymentAppManifestError error); | 32 => (PaymentAppManifestError error); |
| 31 GetManifest() | 33 GetManifest() |
| 32 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error ); | 34 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error ); |
| 33 }; | 35 }; |
| 36 | |
| 37 struct PaymentAppRequestData { | |
| 38 string origin; | |
|
please use gerrit instead
2017/01/09 14:42:12
Can you make this a "Url" type? You would need to
zino
2017/01/09 18:06:14
Done.
| |
| 39 array<PaymentMethodData> methodData; | |
| 40 PaymentItem total; | |
| 41 array<PaymentDetailsModifier> modifiers; | |
| 42 string optionId; | |
| 43 }; | |
| OLD | NEW |