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/mojom/payment_request.mojom"; | 7 import "components/payments/mojom/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 |
11 enum PaymentHandlerStatus { | 11 enum PaymentHandlerStatus { |
12 SUCCESS, | 12 SUCCESS, |
13 NOT_IMPLEMENTED, | 13 NOT_IMPLEMENTED, |
14 NOT_FOUND, | 14 NOT_FOUND, |
15 NO_ACTIVE_WORKER, | 15 NO_ACTIVE_WORKER, |
16 STORAGE_OPERATION_FAILED, | 16 STORAGE_OPERATION_FAILED, |
17 FETCH_INSTRUMENT_ICON_FAILED, | |
18 }; | |
19 | |
20 struct ImageObject { | |
21 url.mojom.Url src; | |
17 }; | 22 }; |
18 | 23 |
19 struct PaymentInstrument { | 24 struct PaymentInstrument { |
dcheng
2017/06/10 00:37:10
In general, this mojom file needs more comments. I
gogerald1
2017/06/12 16:19:43
Done. Add few simple comments.
| |
20 string name; | 25 string name; |
26 array<ImageObject> icons; | |
21 array<string> enabled_methods; | 27 array<string> enabled_methods; |
22 string stringified_capabilities; | 28 string stringified_capabilities; |
23 }; | 29 }; |
24 | 30 |
25 interface PaymentManager { | 31 interface PaymentManager { |
26 Init(string service_worker_scope); | 32 Init(string service_worker_scope); |
27 DeletePaymentInstrument(string instrument_key) | 33 DeletePaymentInstrument(string instrument_key) |
28 => (PaymentHandlerStatus status); | 34 => (PaymentHandlerStatus status); |
29 GetPaymentInstrument(string instrument_key) | 35 GetPaymentInstrument(string instrument_key) |
30 => (PaymentInstrument instrument, PaymentHandlerStatus status); | 36 => (PaymentInstrument instrument, PaymentHandlerStatus status); |
(...skipping 21 matching lines...) Expand all Loading... | |
52 string method_name; | 58 string method_name; |
53 string stringified_details; | 59 string stringified_details; |
54 }; | 60 }; |
55 | 61 |
56 // This interface is provided to pass a payment app response from payment | 62 // This interface is provided to pass a payment app response from payment |
57 // request event in renderer side to browser side by calling respondWith(). | 63 // request event in renderer side to browser side by calling respondWith(). |
58 interface PaymentAppResponseCallback { | 64 interface PaymentAppResponseCallback { |
59 OnPaymentAppResponse(PaymentAppResponse response, | 65 OnPaymentAppResponse(PaymentAppResponse response, |
60 mojo.common.mojom.Time dispatch_event_time); | 66 mojo.common.mojom.Time dispatch_event_time); |
61 }; | 67 }; |
OLD | NEW |