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

Side by Side 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 unified diff | Download patch
OLDNEW
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 [JavaPackage="org.chromium.mojom.payments"] 5 [JavaPackage="org.chromium.mojom.payments"]
6 module blink.mojom; 6 module blink.mojom;
7 7
8 // The shipping address that the browser process provides to the renderer 8 // The shipping address that the browser process provides to the renderer
9 // process. Built either by the browser or a payment app. 9 // process. Built either by the browser or a payment app.
10 struct ShippingAddress { 10 struct ShippingAddress {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 struct PaymentDetails { 81 struct PaymentDetails {
82 array<PaymentItem> items; 82 array<PaymentItem> items;
83 array<ShippingOption> shipping_options; 83 array<ShippingOption> shipping_options;
84 }; 84 };
85 85
86 struct PaymentOptions { 86 struct PaymentOptions {
87 bool request_shipping; 87 bool request_shipping;
88 }; 88 };
89 89
90 struct PaymentMethodData {
91 array<string> supported_methods;
92 // A JSON string built by the renderer from a JavaScript object that the
93 // merchant website provides. The renderer uses
94 // blink::JSONObject::toJSONString() to generate this string. The browser
95 // parses the string via base::JSONParser and passes a part of the JSON
96 // object to the payment app, for example Android Pay. There's no one
97 // format for this object, so richer types cannot be used. A simple
98 // example:
99 //
100 // {"https://android.com/pay": {"gateway": "stripe"}}
please use gerrit instead 2016/05/29 19:57:12 // {"gateway": "stripe"}
zino 2016/06/01 17:43:46 Done.
101 string data;
102 };
103
90 interface PaymentRequest { 104 interface PaymentRequest {
91 SetClient(PaymentRequestClient client); 105 SetClient(PaymentRequestClient client);
92 Show(array<string> supported_methods, 106 Show(array<PaymentMethodData> methodData,
93 PaymentDetails details, 107 PaymentDetails details,
94 PaymentOptions options, 108 PaymentOptions options);
95 // A JSON string built by the renderer from a JavaScript object that the
96 // merchant website provides. The renderer uses
97 // blink::JSONObject::toJSONString() to generate this string. The browser
98 // parses the string via base::JSONParser and passes a part of the JSON
99 // object to the payment app, for example Android Pay. There's no one
100 // format for this object, so richer types cannot be used. A simple
101 // example:
102 //
103 // {"https://android.com/pay": {"gateway": "stripe"}}
104 string stringified_data);
105 UpdateWith(PaymentDetails details); 109 UpdateWith(PaymentDetails details);
106 Abort(); 110 Abort();
107 Complete(bool success); 111 Complete(bool success);
108 }; 112 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698