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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentAppManager.h

Issue 2553163003: Remove ContextLifecycleObserver from PaymentAppManager (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PaymentAppManager_h 5 #ifndef PaymentAppManager_h
6 #define PaymentAppManager_h 6 #define PaymentAppManager_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "components/payments/payment_app.mojom-blink.h" 10 #include "components/payments/payment_app.mojom-blink.h"
11 #include "core/dom/ContextLifecycleObserver.h"
12 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
13 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
14 13
15 namespace blink { 14 namespace blink {
16 15
17 class ExecutionContext;
18 class PaymentAppManifest; 16 class PaymentAppManifest;
19 class ScriptPromiseResolver; 17 class ScriptPromiseResolver;
20 class ScriptState; 18 class ScriptState;
21 class ServiceWorkerRegistration; 19 class ServiceWorkerRegistration;
22 20
23 class MODULES_EXPORT PaymentAppManager final 21 class MODULES_EXPORT PaymentAppManager final
24 : public GarbageCollectedFinalized<PaymentAppManager>, 22 : public GarbageCollectedFinalized<PaymentAppManager>,
25 public ScriptWrappable, 23 public ScriptWrappable {
26 public ContextLifecycleObserver {
27 DEFINE_WRAPPERTYPEINFO(); 24 DEFINE_WRAPPERTYPEINFO();
28 USING_GARBAGE_COLLECTED_MIXIN(PaymentAppManager);
29 WTF_MAKE_NONCOPYABLE(PaymentAppManager); 25 WTF_MAKE_NONCOPYABLE(PaymentAppManager);
30 26
31 public: 27 public:
32 static PaymentAppManager* create(ExecutionContext*, 28 static PaymentAppManager* create(ServiceWorkerRegistration*);
33 ServiceWorkerRegistration*);
34
35 void contextDestroyed() override;
36 29
37 ScriptPromise setManifest(ScriptState*, const PaymentAppManifest&); 30 ScriptPromise setManifest(ScriptState*, const PaymentAppManifest&);
38 ScriptPromise getManifest(ScriptState*); 31 ScriptPromise getManifest(ScriptState*);
39 32
40 DECLARE_TRACE(); 33 DECLARE_TRACE();
41 34
42 private: 35 private:
43 PaymentAppManager(ExecutionContext*, ServiceWorkerRegistration*); 36 explicit PaymentAppManager(ServiceWorkerRegistration*);
44 37
45 void onSetManifest(ScriptPromiseResolver*, 38 void onSetManifest(ScriptPromiseResolver*,
46 payments::mojom::blink::PaymentAppManifestError); 39 payments::mojom::blink::PaymentAppManifestError);
47 void onGetManifest(ScriptPromiseResolver*, 40 void onGetManifest(ScriptPromiseResolver*,
48 payments::mojom::blink::PaymentAppManifestPtr, 41 payments::mojom::blink::PaymentAppManifestPtr,
49 payments::mojom::blink::PaymentAppManifestError); 42 payments::mojom::blink::PaymentAppManifestError);
50 void onServiceConnectionError(); 43 void onServiceConnectionError();
51 44
52 Member<ServiceWorkerRegistration> m_registration; 45 Member<ServiceWorkerRegistration> m_registration;
53 payments::mojom::blink::PaymentAppManagerPtr m_manager; 46 payments::mojom::blink::PaymentAppManagerPtr m_manager;
54 }; 47 };
55 48
56 } // namespace blink 49 } // namespace blink
57 50
58 #endif // PaymentAppManager_h 51 #endif // PaymentAppManager_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/payments/PaymentAppManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698