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 "url/mojo/url.mojom"; | 9 import "url/mojo/url.mojom"; |
9 | 10 |
10 enum PaymentAppManifestError { | 11 enum PaymentAppManifestError { |
11 NONE, | 12 NONE, |
12 NOT_IMPLEMENTED, | 13 NOT_IMPLEMENTED, |
13 NO_ACTIVE_WORKER, | 14 NO_ACTIVE_WORKER, |
14 MANIFEST_STORAGE_OPERATION_FAILED, | 15 MANIFEST_STORAGE_OPERATION_FAILED, |
15 }; | 16 }; |
16 | 17 |
17 struct PaymentAppOption { | 18 struct PaymentAppOption { |
(...skipping 17 matching lines...) Expand all Loading... | |
35 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error ); | 36 => (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error ); |
36 }; | 37 }; |
37 | 38 |
38 struct PaymentAppRequest { | 39 struct PaymentAppRequest { |
39 url.mojom.Url origin; | 40 url.mojom.Url origin; |
40 array<PaymentMethodData> methodData; | 41 array<PaymentMethodData> methodData; |
41 PaymentItem total; | 42 PaymentItem total; |
42 array<PaymentDetailsModifier> modifiers; | 43 array<PaymentDetailsModifier> modifiers; |
43 string optionId; | 44 string optionId; |
44 }; | 45 }; |
46 | |
47 struct PaymentAppResponse { | |
please use gerrit instead
2017/03/21 16:09:40
If mojom language supports inheritance, then pleas
zino
2017/03/22 18:04:44
As far as I know, the mojom struct doesn't support
| |
48 string method_name; | |
49 string stringified_details; | |
50 }; | |
51 | |
52 interface PaymentAppResponseCallback { | |
please use gerrit instead
2017/03/21 16:09:40
Nit: would be more clear to have an interface like
zino
2017/03/22 18:04:44
To dispatch PaymentRequestEvent in registered serv
| |
53 OnPaymentAppResponse(payments.mojom.PaymentAppResponse response, | |
please use gerrit instead
2017/03/21 16:09:40
No need for "payments.mojom." module name here, be
zino
2017/03/22 18:04:44
Done.
| |
54 mojo.common.mojom.Time dispatch_event_time); | |
55 }; | |
OLD | NEW |