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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.h

Issue 2467393002: Add canMakeActivePayment() method to web payments. (Closed)
Patch Set: Fix FindBugs 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/payments/PaymentRequest.h
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.h b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
index 308df98ae9959856a6fbe6011536f610a3e0fa3c..b97e0e3dc6242fe201ab41f92e0323f0a046419b 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -68,6 +68,8 @@ class MODULES_EXPORT PaymentRequest final
DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingaddresschange);
DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingoptionchange);
+ ScriptPromise canMakeActivePayment(ScriptState*);
+
// ScriptWrappable:
bool hasPendingActivity() const override;
@@ -104,6 +106,8 @@ class MODULES_EXPORT PaymentRequest final
void OnError(payments::mojom::blink::PaymentErrorReason) override;
void OnComplete() override;
void OnAbort(bool abortedSuccessfully) override;
+ void OnCanMakeActivePayment(
+ payments::mojom::blink::ActivePaymentQueryResult) override;
void onCompleteTimeout(TimerBase*);
@@ -117,6 +121,7 @@ class MODULES_EXPORT PaymentRequest final
Member<ScriptPromiseResolver> m_showResolver;
Member<ScriptPromiseResolver> m_completeResolver;
Member<ScriptPromiseResolver> m_abortResolver;
+ Member<ScriptPromiseResolver> m_canMakeActivePaymentResolver;
payments::mojom::blink::PaymentRequestPtr m_paymentProvider;
mojo::Binding<payments::mojom::blink::PaymentRequestClient> m_clientBinding;
Timer<PaymentRequest> m_completeTimer;

Powered by Google App Engine
This is Rietveld 408576698