| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights reserv
ed. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 enum PreferPlugInsForImagesOption { | 40 enum PreferPlugInsForImagesOption { |
| 41 ShouldPreferPlugInsForImages, | 41 ShouldPreferPlugInsForImages, |
| 42 ShouldNotPreferPlugInsForImages | 42 ShouldNotPreferPlugInsForImages |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { | 45 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { |
| 46 public: | 46 public: |
| 47 ~HTMLPlugInElement() override; | 47 ~HTMLPlugInElement() override; |
| 48 DECLARE_VIRTUAL_TRACE(); | 48 DECLARE_VIRTUAL_TRACE(); |
| 49 #if ENABLE(OILPAN) | |
| 50 void disconnectContentFrame() override; | |
| 51 void shouldDisposePlugin(); | |
| 52 #endif | |
| 53 | 49 |
| 54 void resetInstance(); | 50 void resetInstance(); |
| 55 SharedPersistent<v8::Object>* pluginWrapper(); | 51 SharedPersistent<v8::Object>* pluginWrapper(); |
| 56 Widget* pluginWidget() const; | 52 Widget* pluginWidget() const; |
| 57 NPObject* getNPObject(); | 53 NPObject* getNPObject(); |
| 58 void setPluginFocus(bool focused); | 54 void setPluginFocus(bool focused); |
| 59 bool canProcessDrag() const; | 55 bool canProcessDrag() const; |
| 60 const String& url() const { return m_url; } | 56 const String& url() const { return m_url; } |
| 61 | 57 |
| 62 // Public for FrameView::addPartToUpdate() | 58 // Public for FrameView::addPartToUpdate() |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 virtual LayoutPart* existingLayoutPart() const = 0; | 128 virtual LayoutPart* existingLayoutPart() const = 0; |
| 133 virtual void updateWidgetInternal() = 0; | 129 virtual void updateWidgetInternal() = 0; |
| 134 | 130 |
| 135 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback, bool requireLayo
utObject); | 131 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback, bool requireLayo
utObject); |
| 136 bool pluginIsLoadable(const KURL&, const String& mimeType); | 132 bool pluginIsLoadable(const KURL&, const String& mimeType); |
| 137 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; | 133 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; |
| 138 | 134 |
| 139 void setPersistedPluginWidget(Widget*); | 135 void setPersistedPluginWidget(Widget*); |
| 140 PassRefPtrWillBeRawPtr<Widget> releasePersistedPluginWidget(); | 136 PassRefPtrWillBeRawPtr<Widget> releasePersistedPluginWidget(); |
| 141 | 137 |
| 142 #if ENABLE(OILPAN) | |
| 143 bool unregisterAsRenderlessIfNeeded(); | |
| 144 void registerAsRenderless(Widget*); | |
| 145 #endif | |
| 146 | |
| 147 mutable RefPtr<SharedPersistent<v8::Object>> m_pluginWrapper; | 138 mutable RefPtr<SharedPersistent<v8::Object>> m_pluginWrapper; |
| 148 NPObject* m_NPObject; | 139 NPObject* m_NPObject; |
| 149 bool m_needsWidgetUpdate; | 140 bool m_needsWidgetUpdate; |
| 150 bool m_shouldPreferPlugInsForImages; | 141 bool m_shouldPreferPlugInsForImages; |
| 151 | 142 |
| 152 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget. | 143 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget. |
| 153 // However, plugins can persist even when not rendered. In order to | 144 // However, plugins can persist even when not rendered. In order to |
| 154 // prevent confusing code which may assume that widget() != null | 145 // prevent confusing code which may assume that widget() != null |
| 155 // means the frame is active, we save off m_widget here while | 146 // means the frame is active, we save off m_widget here while |
| 156 // the plugin is persisting but not being displayed. | 147 // the plugin is persisting but not being displayed. |
| 157 RefPtrWillBeMember<Widget> m_persistedPluginWidget; | 148 RefPtrWillBeMember<Widget> m_persistedPluginWidget; |
| 158 }; | 149 }; |
| 159 | 150 |
| 160 inline bool isHTMLPlugInElement(const HTMLElement& element) | 151 inline bool isHTMLPlugInElement(const HTMLElement& element) |
| 161 { | 152 { |
| 162 return element.isPluginElement(); | 153 return element.isPluginElement(); |
| 163 } | 154 } |
| 164 | 155 |
| 165 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); | 156 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); |
| 166 | 157 |
| 167 } // namespace blink | 158 } // namespace blink |
| 168 | 159 |
| 169 #endif // HTMLPlugInElement_h | 160 #endif // HTMLPlugInElement_h |
| OLD | NEW |