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

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

Issue 1880353004: PaymentRequest should be a ContextLifecycleObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7b7e9b15c6246937bc561085a8ff2026b8ff68d9..fcf72aa042da03bbb108aff4390325e69deb401e 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -8,6 +8,7 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/ContextLifecycleObserver.h"
#include "core/events/EventTarget.h"
#include "modules/ModulesExport.h"
#include "modules/payments/PaymentCompleter.h"
@@ -29,7 +30,7 @@ class ScriptPromiseResolver;
class ScriptState;
class ShippingAddress;
-class MODULES_EXPORT PaymentRequest final : public EventTargetWithInlineData, WTF_NON_EXPORTED_BASE(public mojom::wtf::PaymentRequestClient), public PaymentCompleter {
+class MODULES_EXPORT PaymentRequest final : public EventTargetWithInlineData, WTF_NON_EXPORTED_BASE(public mojom::wtf::PaymentRequestClient), public PaymentCompleter, public ContextLifecycleObserver {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(PaymentRequest)
WTF_MAKE_NONCOPYABLE(PaymentRequest);
@@ -62,6 +63,9 @@ public:
private:
PaymentRequest(ScriptState*, const Vector<String>& supportedMethods, const PaymentDetails&, const PaymentOptions&, const ScriptValue& data, ExceptionState&);
+ // LifecycleObserver:
+ void contextDestroyed() override;
+
// mojom::wtf::PaymentRequestClient:
void OnShippingAddressChange(mojom::wtf::ShippingAddressPtr) override;
void OnShippingOptionChange(const String& shippingOptionId) override;
@@ -72,7 +76,6 @@ private:
// Clears the promise resolvers and closes the Mojo connection.
void cleanUp();
- RefPtr<ScriptState> m_scriptState;
Vector<String> m_supportedMethods;
PaymentDetails m_details;
PaymentOptions m_options;
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698