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

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

Issue 1931233002: Implement PaymentRequestUpdateEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicit-shipping
Patch Set: Rebase 3 Created 4 years, 8 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 0fd13e06f9df045327b4b1cb900dd24a5528b82a..6d6d3e1a9f772271260c2280908e580524a61007 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -14,6 +14,7 @@
#include "modules/payments/PaymentCompleter.h"
#include "modules/payments/PaymentDetails.h"
#include "modules/payments/PaymentOptions.h"
+#include "modules/payments/PaymentUpdater.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "platform/heap/Handle.h"
#include "public/platform/modules/payments/payment_request.mojom-blink.h"
@@ -31,7 +32,7 @@ class ScriptState;
class ShippingAddress;
// TODO(thakis): Make this class final again once https://crbug.com/608705 is fixed.
-class MODULES_EXPORT PaymentRequest /* final */ : public EventTargetWithInlineData, WTF_NON_EXPORTED_BASE(public mojom::blink::PaymentRequestClient), public PaymentCompleter, public ContextLifecycleObserver {
+class MODULES_EXPORT PaymentRequest /* final */ : public EventTargetWithInlineData, WTF_NON_EXPORTED_BASE(public mojom::blink::PaymentRequestClient), public PaymentCompleter, public PaymentUpdater, public ContextLifecycleObserver {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(PaymentRequest)
WTF_MAKE_NONCOPYABLE(PaymentRequest);
@@ -59,6 +60,10 @@ public:
// PaymentCompleter:
ScriptPromise complete(ScriptState*, bool success) override;
+ // PaymentUpdater:
+ void onUpdatePaymentDetails(const ScriptValue& detailsScriptValue) override;
+ void onUpdatePaymentDetailsFailure(const ScriptValue& error) override;
+
DECLARE_TRACE();
private:
@@ -74,8 +79,7 @@ private:
void OnError() override;
void OnComplete() override;
- // Clears the promise resolvers and closes the Mojo connection.
- void cleanUp();
+ void clearResolversAndCloseMojoConnection();
Vector<String> m_supportedMethods;
PaymentDetails m_details;

Powered by Google App Engine
This is Rietveld 408576698