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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerClient.h

Issue 1846913009: HeapSupplements are now just Supplements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ServiceWorkerContainerClient_h 5 #ifndef ServiceWorkerContainerClient_h
6 #define ServiceWorkerContainerClient_h 6 #define ServiceWorkerContainerClient_h
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/workers/WorkerClients.h" 9 #include "core/workers/WorkerClients.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "wtf/Forward.h" 11 #include "wtf/Forward.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class ExecutionContext; 15 class ExecutionContext;
16 class WebServiceWorkerProvider; 16 class WebServiceWorkerProvider;
17 17
18 // This mainly exists to provide access to WebServiceWorkerProvider. 18 // This mainly exists to provide access to WebServiceWorkerProvider.
19 // Owned by Document (or WorkerClients). 19 // Owned by Document (or WorkerClients).
20 class MODULES_EXPORT ServiceWorkerContainerClient final 20 class MODULES_EXPORT ServiceWorkerContainerClient final
21 : public GarbageCollectedFinalized<ServiceWorkerContainerClient> 21 : public GarbageCollectedFinalized<ServiceWorkerContainerClient>
22 , public HeapSupplement<Document> 22 , public Supplement<Document>
23 , public HeapSupplement<WorkerClients> { 23 , public Supplement<WorkerClients> {
24 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerContainerClient); 24 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerContainerClient);
25 WTF_MAKE_NONCOPYABLE(ServiceWorkerContainerClient); 25 WTF_MAKE_NONCOPYABLE(ServiceWorkerContainerClient);
26 public: 26 public:
27 static RawPtr<ServiceWorkerContainerClient> create(PassOwnPtr<WebServiceWork erProvider>); 27 static RawPtr<ServiceWorkerContainerClient> create(PassOwnPtr<WebServiceWork erProvider>);
28 virtual ~ServiceWorkerContainerClient(); 28 virtual ~ServiceWorkerContainerClient();
29 29
30 WebServiceWorkerProvider* provider() { return m_provider.get(); } 30 WebServiceWorkerProvider* provider() { return m_provider.get(); }
31 31
32 static const char* supplementName(); 32 static const char* supplementName();
33 static ServiceWorkerContainerClient* from(ExecutionContext*); 33 static ServiceWorkerContainerClient* from(ExecutionContext*);
34 34
35 DEFINE_INLINE_VIRTUAL_TRACE() 35 DEFINE_INLINE_VIRTUAL_TRACE()
36 { 36 {
37 HeapSupplement<Document>::trace(visitor); 37 Supplement<Document>::trace(visitor);
38 HeapSupplement<WorkerClients>::trace(visitor); 38 Supplement<WorkerClients>::trace(visitor);
39 } 39 }
40 40
41 protected: 41 protected:
42 explicit ServiceWorkerContainerClient(PassOwnPtr<WebServiceWorkerProvider>); 42 explicit ServiceWorkerContainerClient(PassOwnPtr<WebServiceWorkerProvider>);
43 43
44 OwnPtr<WebServiceWorkerProvider> m_provider; 44 OwnPtr<WebServiceWorkerProvider> m_provider;
45 }; 45 };
46 46
47 MODULES_EXPORT void provideServiceWorkerContainerClientToWorker(WorkerClients*, PassOwnPtr<WebServiceWorkerProvider>); 47 MODULES_EXPORT void provideServiceWorkerContainerClientToWorker(WorkerClients*, PassOwnPtr<WebServiceWorkerProvider>);
48 48
49 } // namespace blink 49 } // namespace blink
50 50
51 #endif // ServiceWorkerContainerClient_h 51 #endif // ServiceWorkerContainerClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698