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

Side by Side Diff: Source/modules/plugins/NavigatorPlugins.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 NavigatorPlugins_h 5 #ifndef NavigatorPlugins_h
6 #define NavigatorPlugins_h 6 #define NavigatorPlugins_h
7 7
8 #include "core/frame/DOMWindowProperty.h" 8 #include "core/frame/DOMWindowProperty.h"
9 #include "platform/Supplementable.h" 9 #include "platform/Supplementable.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class DOMMimeTypeArray; 13 class DOMMimeTypeArray;
14 class DOMPluginArray; 14 class DOMPluginArray;
15 class LocalFrame; 15 class LocalFrame;
16 class Navigator; 16 class Navigator;
17 17
18 class NavigatorPlugins final 18 // TODO(Oilpan): when ~DOMWindowProperty is removed, derive from GarbageCollecte d<> instead.
19 : public NoBaseWillBeGarbageCollected<NavigatorPlugins> 19 class NavigatorPlugins final : public GarbageCollectedFinalized<NavigatorPlugins >, public HeapSupplement<Navigator>, DOMWindowProperty {
20 , public WillBeHeapSupplement<Navigator> 20 USING_GARBAGE_COLLECTED_MIXIN(NavigatorPlugins);
21 , DOMWindowProperty {
22 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorPlugins);
23 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(NavigatorPlugins);
24 public: 21 public:
25 static NavigatorPlugins& from(Navigator&); 22 static NavigatorPlugins& from(Navigator&);
26 static NavigatorPlugins* toNavigatorPlugins(Navigator&); 23 static NavigatorPlugins* toNavigatorPlugins(Navigator&);
27 static const char* supplementName(); 24
25 virtual ~NavigatorPlugins();
28 26
29 static DOMPluginArray* plugins(Navigator&); 27 static DOMPluginArray* plugins(Navigator&);
30 static DOMMimeTypeArray* mimeTypes(Navigator&); 28 static DOMMimeTypeArray* mimeTypes(Navigator&);
31 static bool javaEnabled(Navigator&); 29 static bool javaEnabled(Navigator&);
32 30
33 DECLARE_VIRTUAL_TRACE(); 31 DECLARE_VIRTUAL_TRACE();
34 32
35 private: 33 private:
36 explicit NavigatorPlugins(Navigator&); 34 explicit NavigatorPlugins(Navigator&);
37 35
36 static const char* supplementName();
37
38 DOMPluginArray* plugins(LocalFrame*) const; 38 DOMPluginArray* plugins(LocalFrame*) const;
39 DOMMimeTypeArray* mimeTypes(LocalFrame*) const; 39 DOMMimeTypeArray* mimeTypes(LocalFrame*) const;
40 bool javaEnabled(LocalFrame*) const; 40 bool javaEnabled(LocalFrame*) const;
41 41
42 mutable RefPtrWillBeMember<DOMPluginArray> m_plugins; 42 mutable RefPtrWillBeMember<DOMPluginArray> m_plugins;
43 mutable RefPtrWillBeMember<DOMMimeTypeArray> m_mimeTypes; 43 mutable RefPtrWillBeMember<DOMMimeTypeArray> m_mimeTypes;
44 }; 44 };
45 45
46 } // namespace blink 46 } // namespace blink
47 47
48 #endif // NavigatorPlugins_h 48 #endif // NavigatorPlugins_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698