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

Side by Side Diff: components/payments/payment_request.mojom

Issue 2645813006: Download web payment manifests. (Closed)
Patch Set: Address more comments Created 3 years, 9 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.payments.mojom"] 5 [JavaPackage="org.chromium.payments.mojom"]
6 module payments.mojom; 6 module payments.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 PaymentAddress { 10 struct PaymentAddress {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 USER_CANCEL, 76 USER_CANCEL,
77 NOT_SUPPORTED 77 NOT_SUPPORTED
78 }; 78 };
79 79
80 enum CanMakePaymentQueryResult { 80 enum CanMakePaymentQueryResult {
81 CAN_MAKE_PAYMENT, 81 CAN_MAKE_PAYMENT,
82 CANNOT_MAKE_PAYMENT, 82 CANNOT_MAKE_PAYMENT,
83 QUERY_QUOTA_EXCEEDED 83 QUERY_QUOTA_EXCEEDED
84 }; 84 };
85 85
86 struct NativeAndroidPaymentAppManifestSection {
87 string package_name;
88 // Optional version number. 0 if not defined.
89 int64 version;
90 array<string>? sha256_cert_fingerprints;
91 };
92
86 interface PaymentRequestClient { 93 interface PaymentRequestClient {
87 OnShippingAddressChange(PaymentAddress address); 94 OnShippingAddressChange(PaymentAddress address);
88 OnShippingOptionChange(string shipping_option_id); 95 OnShippingOptionChange(string shipping_option_id);
89 OnPaymentResponse(PaymentResponse response); 96 OnPaymentResponse(PaymentResponse response);
90 OnError(PaymentErrorReason error); 97 OnError(PaymentErrorReason error);
91 OnComplete(); 98 OnComplete();
92 OnAbort(bool aborted_successfully); 99 OnAbort(bool aborted_successfully);
93 OnCanMakePayment(CanMakePaymentQueryResult result); 100 OnCanMakePayment(CanMakePaymentQueryResult result);
101 ParsePaymentManifest(string content)
102 => (array<NativeAndroidPaymentAppManifestSection>? manifest);
94 }; 103 };
95 104
96 struct PaymentItem { 105 struct PaymentItem {
97 string label; 106 string label;
98 PaymentCurrencyAmount amount; 107 PaymentCurrencyAmount amount;
99 bool pending; 108 bool pending;
100 }; 109 };
101 110
102 struct PaymentShippingOption { 111 struct PaymentShippingOption {
103 string id; 112 string id;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 Init(PaymentRequestClient client, 223 Init(PaymentRequestClient client,
215 array<PaymentMethodData> method_data, 224 array<PaymentMethodData> method_data,
216 PaymentDetails details, 225 PaymentDetails details,
217 PaymentOptions options); 226 PaymentOptions options);
218 Show(); 227 Show();
219 UpdateWith(PaymentDetails details); 228 UpdateWith(PaymentDetails details);
220 Abort(); 229 Abort();
221 Complete(PaymentComplete result); 230 Complete(PaymentComplete result);
222 CanMakePayment(); 231 CanMakePayment();
223 }; 232 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698