Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1500)

Unified Diff: third_party/WebKit/public/platform/modules/payments/payment_request.mojom

Issue 2020883002: PaymentRequest: Introduce PaymentMethodData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/modules/payments/payment_request.mojom
diff --git a/third_party/WebKit/public/platform/modules/payments/payment_request.mojom b/third_party/WebKit/public/platform/modules/payments/payment_request.mojom
index 8153501946eab7d422214c92b8982091f87ac2c6..1cbced4beb598794ccd26bf4e17c10047bcff868 100644
--- a/third_party/WebKit/public/platform/modules/payments/payment_request.mojom
+++ b/third_party/WebKit/public/platform/modules/payments/payment_request.mojom
@@ -91,21 +91,25 @@ struct PaymentOptions {
bool request_shipping;
};
+struct PaymentMethodData {
+ array<string> supported_methods;
+ // A JSON string built by the renderer from a JavaScript object that the
+ // merchant website provides. The renderer uses
+ // blink::JSONObject::toJSONString() to generate this string. The browser
+ // parses the string via JSONObject(JsonSanitizer.sanitize(stringified_data))
+ // and passes a part of the JSON object to the payment app, for example
+ // Android Pay. There's no one format for this object, so richer types cannot
+ // be used. A simple example:
+ //
+ // {"gateway": "stripe"}
+ string stringified_data;
+};
+
interface PaymentRequest {
SetClient(PaymentRequestClient client);
- Show(array<string> supported_methods,
+ Show(array<PaymentMethodData> methodData,
PaymentDetails details,
- PaymentOptions options,
- // A JSON string built by the renderer from a JavaScript object that the
- // merchant website provides. The renderer uses
- // blink::JSONObject::toJSONString() to generate this string. The browser
- // parses the string via base::JSONParser and passes a part of the JSON
- // object to the payment app, for example Android Pay. There's no one
- // format for this object, so richer types cannot be used. A simple
- // example:
- //
- // {"https://android.com/pay": {"gateway": "stripe"}}
- string stringified_data);
+ PaymentOptions options);
UpdateWith(PaymentDetails details);
Abort();
Complete(bool success);
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentTestHelper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698