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

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

Issue 255983003: Oilpan: Move all supplements of Page, Document, and WorkerClients to the managed heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: using namespace WebCore Created 6 years, 7 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 | Annotate | Revision Log
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/DocumentSupplementable.h" 8 #include "core/dom/DocumentSupplementable.h"
9 #include "core/workers/WorkerClients.h" 9 #include "core/workers/WorkerClients.h"
10 #include "wtf/Forward.h" 10 #include "wtf/Forward.h"
11 11
12 namespace blink { 12 namespace blink {
13 class WebServiceWorkerProvider; 13 class WebServiceWorkerProvider;
14 } 14 }
15 15
16 namespace WebCore { 16 namespace WebCore {
17 17
18 class ExecutionContext; 18 class ExecutionContext;
19 19
20 // This mainly exists to provide access to WebServiceWorkerProvider. 20 // This mainly exists to provide access to WebServiceWorkerProvider.
21 // Owned by Document (or WorkerClients). 21 // Owned by Document (or WorkerClients).
22 class ServiceWorkerContainerClient FINAL : 22 class ServiceWorkerContainerClient FINAL :
23 public NoBaseWillBeGarbageCollectedFinalized<ServiceWorkerContainerClient>,
23 public DocumentSupplement, 24 public DocumentSupplement,
24 public Supplement<WorkerClients> { 25 public WillBeHeapSupplement<WorkerClients> {
26 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerContainerClient);
25 WTF_MAKE_NONCOPYABLE(ServiceWorkerContainerClient); 27 WTF_MAKE_NONCOPYABLE(ServiceWorkerContainerClient);
26 public: 28 public:
27 static PassOwnPtr<ServiceWorkerContainerClient> create(PassOwnPtr<blink::Web ServiceWorkerProvider>); 29 static PassOwnPtrWillBeRawPtr<ServiceWorkerContainerClient> create(PassOwnPt r<blink::WebServiceWorkerProvider>);
28 virtual ~ServiceWorkerContainerClient(); 30 virtual ~ServiceWorkerContainerClient();
29 31
30 blink::WebServiceWorkerProvider* provider() { return m_provider.get(); } 32 blink::WebServiceWorkerProvider* provider() { return m_provider.get(); }
31 33
32 static const char* supplementName(); 34 static const char* supplementName();
33 static ServiceWorkerContainerClient* from(ExecutionContext*); 35 static ServiceWorkerContainerClient* from(ExecutionContext*);
34 36
35 virtual void trace(Visitor*) OVERRIDE { } 37 virtual void trace(Visitor*) OVERRIDE { }
36 38
37 protected: 39 protected:
38 explicit ServiceWorkerContainerClient(PassOwnPtr<blink::WebServiceWorkerProv ider>); 40 explicit ServiceWorkerContainerClient(PassOwnPtr<blink::WebServiceWorkerProv ider>);
39 41
40 OwnPtr<blink::WebServiceWorkerProvider> m_provider; 42 OwnPtr<blink::WebServiceWorkerProvider> m_provider;
41 }; 43 };
42 44
43 void provideServiceWorkerContainerClientToWorker(WorkerClients*, PassOwnPtr<blin k::WebServiceWorkerProvider>); 45 void provideServiceWorkerContainerClientToWorker(WorkerClients*, PassOwnPtr<blin k::WebServiceWorkerProvider>);
44 46
45 } // namespace WebCore 47 } // namespace WebCore
46 48
47 #endif // ServiceWorkerContainerClient_h 49 #endif // ServiceWorkerContainerClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698