Index: components/payments/mojom/payment_app.mojom |
diff --git a/components/payments/mojom/payment_app.mojom b/components/payments/mojom/payment_app.mojom |
index f0bd4dd975e8eff45872a1b7ba57cb1cbdae10c8..34c7acce1b1c1ab0c6cde3d31aa87237bb9ae309 100644 |
--- a/components/payments/mojom/payment_app.mojom |
+++ b/components/payments/mojom/payment_app.mojom |
@@ -14,14 +14,23 @@ enum PaymentHandlerStatus { |
NOT_FOUND, |
NO_ACTIVE_WORKER, |
STORAGE_OPERATION_FAILED, |
+ FETCH_INSTRUMENT_ICON_FAILED, |
}; |
+// This struct is provided to hold an image object from render side (ImageObject.idl). |
dcheng
2017/06/13 09:02:55
Nit: 80 chars
gogerald1
2017/06/13 15:37:19
Done.
|
+struct ImageObject { |
+ url.mojom.Url src; |
+}; |
+ |
+// This struct is provided to hold a payment instrument from render side (PaymentInstrument.idl). |
dcheng
2017/06/13 09:02:55
To elaborate: my questions are more of "what is a
gogerald1
2017/06/13 15:37:19
These structures and interfaces are almost exactly
dcheng
2017/06/13 17:33:15
- Web specs are not the easiest thing to understan
zino
2017/06/13 18:02:43
There are two specs PaymentRequest API and Payment
gogerald1
2017/06/14 01:28:16
Acknowledged.
|
struct PaymentInstrument { |
string name; |
+ array<ImageObject> icons; |
array<string> enabled_methods; |
string stringified_capabilities; |
}; |
+// This interface provides implementation of PaymentInstruments.idl in render side. |
interface PaymentManager { |
Init(string service_worker_scope); |
DeletePaymentInstrument(string instrument_key) |
@@ -38,6 +47,7 @@ interface PaymentManager { |
=> (PaymentHandlerStatus status); |
}; |
+// This struct is provided to send payment request data to render side (PaymentRequestEvent.idl). |
struct PaymentRequestEventData { |
url.mojom.Url top_level_origin; |
dcheng
2017/06/13 09:02:55
Similarly, what are the two origins here, why do w
gogerald1
2017/06/13 15:37:19
Please refer the spec here https://w3c.github.io/p
|
url.mojom.Url payment_request_origin; |
@@ -48,6 +58,7 @@ struct PaymentRequestEventData { |
string instrument_key; |
}; |
+// This struct is provided to receive payment app response from render side (PaymentAppResponse.idl). |
struct PaymentAppResponse { |
string method_name; |
string stringified_details; |