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

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

Issue 1937783002: Provide shipping in PaymentRequest response (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentsValidatorsTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 24 matching lines...) Expand all
35 35
36 // Payment method specific JSON string that is built either by the browser or 36 // Payment method specific JSON string that is built either by the browser or
37 // a payment app, for example Android Pay. Browser ensures that the string can 37 // a payment app, for example Android Pay. Browser ensures that the string can
38 // be successfully parsed into base::JSONParser. Renderer parses this string 38 // be successfully parsed into base::JSONParser. Renderer parses this string
39 // via v8::JSON::Parse() and hands off the result to the merchant website. 39 // via v8::JSON::Parse() and hands off the result to the merchant website.
40 // There's no one format for this object, so richer types cannot be used. A 40 // There's no one format for this object, so richer types cannot be used. A
41 // simple example: 41 // simple example:
42 // 42 //
43 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} 43 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"}
44 string stringified_details; 44 string stringified_details;
45
46 ShippingAddress? shipping_address;
47 string? shipping_option_id;
45 }; 48 };
46 49
47 interface PaymentRequestClient { 50 interface PaymentRequestClient {
48 OnShippingAddressChange(ShippingAddress address); 51 OnShippingAddressChange(ShippingAddress address);
49 OnShippingOptionChange(string shipping_option_id); 52 OnShippingOptionChange(string shipping_option_id);
50 OnPaymentResponse(PaymentResponse response); 53 OnPaymentResponse(PaymentResponse response);
51 OnError(); 54 OnError();
52 OnComplete(); 55 OnComplete();
53 }; 56 };
54 57
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // parses the string via base::JSONParser and passes a part of the JSON 99 // parses the string via base::JSONParser and passes a part of the JSON
97 // object to the payment app, for example Android Pay. There's no one 100 // object to the payment app, for example Android Pay. There's no one
98 // format for this object, so richer types cannot be used. A simple 101 // format for this object, so richer types cannot be used. A simple
99 // example: 102 // example:
100 // 103 //
101 // {"https://android.com/pay": {"gateway": "stripe"}} 104 // {"https://android.com/pay": {"gateway": "stripe"}}
102 string stringified_data); 105 string stringified_data);
103 Abort(); 106 Abort();
104 Complete(bool success); 107 Complete(bool success);
105 }; 108 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/payments/PaymentsValidatorsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698