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

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

Issue 2516923002: [Merge M-56] Add canMakeActivePayment() method to web payments. (Closed)
Patch Set: Created 4 years, 1 month 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 string? payer_email; 70 string? payer_email;
71 string? payer_phone; 71 string? payer_phone;
72 }; 72 };
73 73
74 enum PaymentErrorReason { 74 enum PaymentErrorReason {
75 UNKNOWN, 75 UNKNOWN,
76 USER_CANCEL, 76 USER_CANCEL,
77 NOT_SUPPORTED 77 NOT_SUPPORTED
78 }; 78 };
79 79
80 enum ActivePaymentQueryResult {
81 CAN_MAKE_ACTIVE_PAYMENT,
82 CANNOT_MAKE_ACTIVE_PAYMENT,
83 QUERY_QUOTA_EXCEEDED
84 };
85
80 interface PaymentRequestClient { 86 interface PaymentRequestClient {
81 OnShippingAddressChange(PaymentAddress address); 87 OnShippingAddressChange(PaymentAddress address);
82 OnShippingOptionChange(string shipping_option_id); 88 OnShippingOptionChange(string shipping_option_id);
83 OnPaymentResponse(PaymentResponse response); 89 OnPaymentResponse(PaymentResponse response);
84 OnError(PaymentErrorReason error); 90 OnError(PaymentErrorReason error);
85 OnComplete(); 91 OnComplete();
86 OnAbort(bool aborted_successfully); 92 OnAbort(bool aborted_successfully);
93 OnCanMakeActivePayment(ActivePaymentQueryResult result);
87 }; 94 };
88 95
89 struct PaymentItem { 96 struct PaymentItem {
90 string label; 97 string label;
91 PaymentCurrencyAmount amount; 98 PaymentCurrencyAmount amount;
92 bool pending; 99 bool pending;
93 }; 100 };
94 101
95 struct PaymentShippingOption { 102 struct PaymentShippingOption {
96 string id; 103 string id;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 189
183 interface PaymentRequest { 190 interface PaymentRequest {
184 Init(PaymentRequestClient client, 191 Init(PaymentRequestClient client,
185 array<PaymentMethodData> methodData, 192 array<PaymentMethodData> methodData,
186 PaymentDetails details, 193 PaymentDetails details,
187 PaymentOptions options); 194 PaymentOptions options);
188 Show(); 195 Show();
189 UpdateWith(PaymentDetails details); 196 UpdateWith(PaymentDetails details);
190 Abort(); 197 Abort();
191 Complete(PaymentComplete result); 198 Complete(PaymentComplete result);
199 CanMakeActivePayment();
192 }; 200 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698