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

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

Issue 2476343002: PaymentApp: Initial implementation for PaymentAppManager.setManifest(). (Closed)
Patch Set: fix lint error Created 4 years, 1 month 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/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
« no previous file with comments | « third_party/WebKit/Source/modules/payments/BUILD.gn ('k') | third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698