| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 Widget* pluginWidget() const; | 49 Widget* pluginWidget() const; |
| 50 NPObject* getNPObject(); | 50 NPObject* getNPObject(); |
| 51 bool canProcessDrag() const; | 51 bool canProcessDrag() const; |
| 52 const String& url() const { return m_url; } | 52 const String& url() const { return m_url; } |
| 53 | 53 |
| 54 // Public for FrameView::addWidgetToUpdate() | 54 // Public for FrameView::addWidgetToUpdate() |
| 55 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } | 55 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } |
| 56 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne
edsWidgetUpdate; } | 56 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne
edsWidgetUpdate; } |
| 57 void updateWidget(); | 57 void updateWidget(); |
| 58 | 58 |
| 59 void requestPluginCreationWithoutRendererIfPossible(); |
| 60 void createPluginWithoutRenderer(); |
| 61 |
| 59 protected: | 62 protected: |
| 60 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar
ser, PreferPlugInsForImagesOption); | 63 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar
ser, PreferPlugInsForImagesOption); |
| 61 | 64 |
| 62 // Node functions: | 65 // Node functions: |
| 63 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 66 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
| 64 | 67 |
| 65 // Element functions: | 68 // Element functions: |
| 66 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 69 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
| 67 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 70 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
| 68 | 71 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 virtual void updateWidgetInternal() = 0; | 120 virtual void updateWidgetInternal() = 0; |
| 118 | 121 |
| 119 enum DisplayState { | 122 enum DisplayState { |
| 120 Restarting, | 123 Restarting, |
| 121 RestartingWithPendingMouseClick, | 124 RestartingWithPendingMouseClick, |
| 122 Playing | 125 Playing |
| 123 }; | 126 }; |
| 124 DisplayState displayState() const { return m_displayState; } | 127 DisplayState displayState() const { return m_displayState; } |
| 125 void setDisplayState(DisplayState state) { m_displayState = state; } | 128 void setDisplayState(DisplayState state) { m_displayState = state; } |
| 126 const String loadedMimeType() const; | 129 const String loadedMimeType() const; |
| 127 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback); | 130 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback, bool requireRend
erer); |
| 128 bool pluginIsLoadable(const KURL&, const String& mimeType); | 131 bool pluginIsLoadable(const KURL&, const String& mimeType); |
| 129 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; | 132 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; |
| 130 | 133 |
| 131 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; | 134 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; |
| 132 NPObject* m_NPObject; | 135 NPObject* m_NPObject; |
| 133 bool m_isCapturingMouseEvents; | 136 bool m_isCapturingMouseEvents; |
| 134 bool m_needsWidgetUpdate; | 137 bool m_needsWidgetUpdate; |
| 135 bool m_shouldPreferPlugInsForImages; | 138 bool m_shouldPreferPlugInsForImages; |
| 136 DisplayState m_displayState; | 139 DisplayState m_displayState; |
| 140 |
| 141 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget. |
| 142 // However, plugins can persist even when not rendered. In order to |
| 143 // prevent confusing code which may assume that widget() != null |
| 144 // means the frame is active, we save off m_widget here while |
| 145 // the plugin is persisting but not being displayed. |
| 146 RefPtr<Widget> m_persistedPluginWidget; |
| 137 }; | 147 }; |
| 138 | 148 |
| 139 inline bool isHTMLPlugInElement(const Element& element) | 149 inline bool isHTMLPlugInElement(const Element& element) |
| 140 { | 150 { |
| 141 return element.isHTMLElement() && toHTMLElement(element).isPluginElement(); | 151 return element.isHTMLElement() && toHTMLElement(element).isPluginElement(); |
| 142 } | 152 } |
| 143 | 153 |
| 144 inline bool isHTMLPlugInElement(const HTMLElement& element) | 154 inline bool isHTMLPlugInElement(const HTMLElement& element) |
| 145 { | 155 { |
| 146 return element.isPluginElement(); | 156 return element.isPluginElement(); |
| 147 } | 157 } |
| 148 | 158 |
| 149 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); | 159 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); |
| 150 | 160 |
| 151 } // namespace WebCore | 161 } // namespace WebCore |
| 152 | 162 |
| 153 #endif // HTMLPlugInElement_h | 163 #endif // HTMLPlugInElement_h |
| OLD | NEW |