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

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

Issue 2467393002: Add canMakeActivePayment() method to web payments. (Closed)
Patch Set: ArrayMap and rebase 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 156
150 interface PaymentRequest { 157 interface PaymentRequest {
151 Init(PaymentRequestClient client, 158 Init(PaymentRequestClient client,
152 array<PaymentMethodData> methodData, 159 array<PaymentMethodData> methodData,
153 PaymentDetails details, 160 PaymentDetails details,
154 PaymentOptions options); 161 PaymentOptions options);
155 Show(); 162 Show();
156 UpdateWith(PaymentDetails details); 163 UpdateWith(PaymentDetails details);
157 Abort(); 164 Abort();
158 Complete(PaymentComplete result); 165 Complete(PaymentComplete result);
166 CanMakeActivePayment();
Marijn Kruisselbrink 2016/11/11 00:00:05 Would it make sense to make this CanMakeActivePaym
please use gerrit instead 2016/11/11 21:11:50 I'd prefer to stick to the pre-existing pattern in
159 }; 167 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698