| OLD | NEW |
| 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/dom/ContextLifecycleObserver.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 : public GarbageCollected<NavigatorPlugins>, | 18 class NavigatorPlugins final : public GarbageCollected<NavigatorPlugins>, |
| 19 public Supplement<Navigator>, | 19 public Supplement<Navigator>, |
| 20 public DOMWindowProperty { | 20 public ContextClient { |
| 21 USING_GARBAGE_COLLECTED_MIXIN(NavigatorPlugins); | 21 USING_GARBAGE_COLLECTED_MIXIN(NavigatorPlugins); |
| 22 | 22 |
| 23 public: | 23 public: |
| 24 static NavigatorPlugins& from(Navigator&); | 24 static NavigatorPlugins& from(Navigator&); |
| 25 static NavigatorPlugins* toNavigatorPlugins(Navigator&); | 25 static NavigatorPlugins* toNavigatorPlugins(Navigator&); |
| 26 | 26 |
| 27 static DOMPluginArray* plugins(Navigator&); | 27 static DOMPluginArray* plugins(Navigator&); |
| 28 static DOMMimeTypeArray* mimeTypes(Navigator&); | 28 static DOMMimeTypeArray* mimeTypes(Navigator&); |
| 29 static bool javaEnabled(Navigator&); | 29 static bool javaEnabled(Navigator&); |
| 30 | 30 |
| 31 DECLARE_VIRTUAL_TRACE(); | 31 DECLARE_VIRTUAL_TRACE(); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 explicit NavigatorPlugins(Navigator&); | 34 explicit NavigatorPlugins(Navigator&); |
| 35 | 35 |
| 36 static const char* supplementName(); | 36 static const char* supplementName(); |
| 37 | 37 |
| 38 DOMPluginArray* plugins(LocalFrame*) const; | 38 DOMPluginArray* plugins(LocalFrame*) const; |
| 39 DOMMimeTypeArray* mimeTypes(LocalFrame*) const; | 39 DOMMimeTypeArray* mimeTypes(LocalFrame*) const; |
| 40 | 40 |
| 41 mutable Member<DOMPluginArray> m_plugins; | 41 mutable Member<DOMPluginArray> m_plugins; |
| 42 mutable Member<DOMMimeTypeArray> m_mimeTypes; | 42 mutable Member<DOMMimeTypeArray> m_mimeTypes; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace blink | 45 } // namespace blink |
| 46 | 46 |
| 47 #endif // NavigatorPlugins_h | 47 #endif // NavigatorPlugins_h |
| OLD | NEW |