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

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

Issue 2048823004: PaymentRequest.abort() should return a promise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 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 deb3564c25b3aa650cb48216838ad067770ab067..2e5e000f01bb5b0829ee1bea28e57de6a2734584 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -44,7 +44,7 @@ public:
virtual ~PaymentRequest();
ScriptPromise show(ScriptState*);
- void abort(ExceptionState&);
+ ScriptPromise abort(ScriptState*);
PaymentAddress* getShippingAddress() const { return m_shippingAddress.get(); }
const String& shippingOption() const { return m_shippingOption; }
@@ -80,6 +80,7 @@ private:
void OnPaymentResponse(mojom::blink::PaymentResponsePtr) override;
void OnError() override;
void OnComplete() override;
+ void OnAbort(bool abortedSuccessfully) override;
// Clears the promise resolvers and closes the Mojo connection.
void clearResolversAndCloseMojoConnection();
@@ -92,6 +93,7 @@ private:
String m_shippingOption;
Member<ScriptPromiseResolver> m_showResolver;
Member<ScriptPromiseResolver> m_completeResolver;
+ Member<ScriptPromiseResolver> m_abortResolver;
mojom::blink::PaymentRequestPtr m_paymentProvider;
mojo::Binding<mojom::blink::PaymentRequestClient> m_clientBinding;
};

Powered by Google App Engine
This is Rietveld 408576698