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

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: Remove DummyPageHolder and TrackExceptionState for haraken@ comment. 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 e137860ee057e625f9d1355111648c6a1aaae267..c150a99ce10fb17b32ebef7e3c1872e525a142d9 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -51,7 +51,7 @@ public:
};
ScriptPromise show(ScriptState*);
- void abort(ExceptionState&);
+ ScriptPromise abort(ScriptState*);
PaymentAddress* getShippingAddress() const { return m_shippingAddress.get(); }
const String& shippingOption() const { return m_shippingOption; }
@@ -87,6 +87,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();
@@ -98,6 +99,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