| Index: third_party/WebKit/Source/modules/payments/PaymentAppManager.h
|
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppManager.h b/third_party/WebKit/Source/modules/payments/PaymentAppManager.h
|
| index 009fa0ea7bc64e6f9bf01999a395e4abf2918837..cbab6b55b79ebe0a3e08ff0f29d3d04a6b57a86a 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentAppManager.h
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentAppManager.h
|
| @@ -7,32 +7,45 @@
|
|
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "components/payments/payment_app.mojom-blink.h"
|
| +#include "core/dom/ContextLifecycleObserver.h"
|
| #include "modules/ModulesExport.h"
|
| #include "platform/heap/Handle.h"
|
|
|
| namespace blink {
|
|
|
| class PaymentAppManifest;
|
| +class ScriptPromiseResolver;
|
| +class ScriptState;
|
| class ServiceWorkerRegistration;
|
|
|
| class MODULES_EXPORT PaymentAppManager final
|
| - : public GarbageCollected<PaymentAppManager>,
|
| - public ScriptWrappable {
|
| + : public GarbageCollectedFinalized<PaymentAppManager>,
|
| + public ScriptWrappable,
|
| + public ContextLifecycleObserver {
|
| DEFINE_WRAPPERTYPEINFO();
|
| + USING_GARBAGE_COLLECTED_MIXIN(PaymentAppManager);
|
| WTF_MAKE_NONCOPYABLE(PaymentAppManager);
|
|
|
| public:
|
| - static PaymentAppManager* create(ServiceWorkerRegistration*);
|
| + static PaymentAppManager* create(ScriptState*, ServiceWorkerRegistration*);
|
|
|
| - ScriptPromise setManifest(const PaymentAppManifest&);
|
| - ScriptPromise getManifest();
|
| + void contextDestroyed() override;
|
| +
|
| + ScriptPromise setManifest(ScriptState*, const PaymentAppManifest&);
|
| + ScriptPromise getManifest(ScriptState*);
|
|
|
| DECLARE_TRACE();
|
|
|
| private:
|
| - explicit PaymentAppManager(ServiceWorkerRegistration*);
|
| + PaymentAppManager(ScriptState*, ServiceWorkerRegistration*);
|
| +
|
| + void onSetManifest(ScriptPromiseResolver*,
|
| + payments::mojom::blink::PaymentAppManifestError);
|
| + void onServiceConnectionError();
|
|
|
| Member<ServiceWorkerRegistration> m_registration;
|
| + payments::mojom::blink::PaymentAppManagerPtr m_manager;
|
| };
|
|
|
| } // namespace blink
|
|
|