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

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

Issue 2467393002: Add canMakeActivePayment() method to web payments. (Closed)
Patch Set: Hide behind a flag 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 555e7b6b3743e877d61efa5a2caa0406e046d3d5..a01f5f8ee3f2251f44dbf93feb8bc793252eb011 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -75,6 +75,8 @@ class MODULES_EXPORT PaymentRequest final
DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingaddresschange);
DEFINE_ATTRIBUTE_EVENT_LISTENER(shippingoptionchange);
+ ScriptPromise canMakeActivePayment(ScriptState*);
+
// ScriptWrappable:
bool hasPendingActivity() const override;
@@ -111,6 +113,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*);
@@ -124,6 +128,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