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

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

Issue 1101263003: Oilpan: have Navigator and its supplements be on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 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 | 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 NavigatorServiceWorker_h 5 #ifndef NavigatorServiceWorker_h
6 #define NavigatorServiceWorker_h 6 #define NavigatorServiceWorker_h
7 7
8 #include "core/frame/Navigator.h" 8 #include "core/frame/Navigator.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class Document; 15 class Document;
16 class Navigator; 16 class Navigator;
17 class ServiceWorkerContainer; 17 class ServiceWorkerContainer;
18 18
19 class MODULES_EXPORT NavigatorServiceWorker final : public NoBaseWillBeGarbageCo llected<NavigatorServiceWorker>, public WillBeHeapSupplement<Navigator>, DOMWind owProperty { 19 // TODO(Oilpan): when ~DOMWindowProperty is removed, derive from GarbageCollecte d<> instead.
20 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorServiceWorker); 20 class MODULES_EXPORT NavigatorServiceWorker final : public GarbageCollectedFinal ized<NavigatorServiceWorker>, public HeapSupplement<Navigator>, DOMWindowPropert y {
21 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(NavigatorServiceWorker); 21 USING_GARBAGE_COLLECTED_MIXIN(NavigatorServiceWorker);
22 public: 22 public:
23 static NavigatorServiceWorker* from(Document&); 23 static NavigatorServiceWorker* from(Document&);
24 static NavigatorServiceWorker& from(Navigator&); 24 static NavigatorServiceWorker& from(Navigator&);
25 static NavigatorServiceWorker* toNavigatorServiceWorker(Navigator&); 25 static NavigatorServiceWorker* toNavigatorServiceWorker(Navigator&);
26 static const char* supplementName(); 26
27 virtual ~NavigatorServiceWorker();
27 28
28 static ServiceWorkerContainer* serviceWorker(Navigator&); 29 static ServiceWorkerContainer* serviceWorker(Navigator&);
29 30
30 DECLARE_VIRTUAL_TRACE(); 31 DECLARE_VIRTUAL_TRACE();
31 32
32 private: 33 private:
33 explicit NavigatorServiceWorker(Navigator&); 34 explicit NavigatorServiceWorker(Navigator&);
34 ServiceWorkerContainer* serviceWorker(); 35 ServiceWorkerContainer* serviceWorker();
35 36
37 static const char* supplementName();
38
36 // DOMWindowProperty override. 39 // DOMWindowProperty override.
37 virtual void willDetachGlobalObjectFromFrame() override; 40 virtual void willDetachGlobalObjectFromFrame() override;
38 41
39 PersistentWillBeMember<ServiceWorkerContainer> m_serviceWorker; 42 Member<ServiceWorkerContainer> m_serviceWorker;
40 }; 43 };
41 44
42 } // namespace blink 45 } // namespace blink
43 46
44 #endif // NavigatorServiceWorker_h 47 #endif // NavigatorServiceWorker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698