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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 Widget* pluginWidget() const; | 54 Widget* pluginWidget() const; |
55 NPObject* getNPObject(); | 55 NPObject* getNPObject(); |
56 bool canProcessDrag() const; | 56 bool canProcessDrag() const; |
57 const String& url() const { return m_url; } | 57 const String& url() const { return m_url; } |
58 | 58 |
59 // Public for FrameView::addWidgetToUpdate() | 59 // Public for FrameView::addWidgetToUpdate() |
60 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } | 60 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } |
61 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne edsWidgetUpdate; } | 61 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne edsWidgetUpdate; } |
62 virtual void updateWidget(PluginCreationOption) = 0; | 62 virtual void updateWidget(PluginCreationOption) = 0; |
63 | 63 |
64 void createPluginWithoutRenderer(const String& mimeType); | |
65 // Allows persisted plugins to be registered by their creator. Call this | |
66 // function with an argument of 0 to clear the persisted plugin. | |
67 void setPlugin(PassRefPtr<Widget>); | |
68 PassRefPtr<Widget> plugin(); | |
eseidel
2013/11/18 22:26:45
Normally you don't return PassRefPtr unless the ca
wjmaclean
2013/11/25 17:51:56
Yes ... I think I changed this in response to a co
| |
69 | |
64 protected: | 70 protected: |
65 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar ser, PreferPlugInsForImagesOption); | 71 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar ser, PreferPlugInsForImagesOption); |
66 | 72 |
67 // Node functions: | 73 // Node functions: |
68 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 74 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
69 virtual bool dispatchBeforeLoadEvent(const String& sourceURL) OVERRIDE; | 75 virtual bool dispatchBeforeLoadEvent(const String& sourceURL) OVERRIDE; |
70 | 76 |
71 // Element functions: | 77 // Element functions: |
72 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 78 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
73 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 79 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p aramNames, const Vector<String>& paramValues, bool useFallback); | 134 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p aramNames, const Vector<String>& paramValues, bool useFallback); |
129 bool pluginIsLoadable(const KURL&, const String& mimeType); | 135 bool pluginIsLoadable(const KURL&, const String& mimeType); |
130 | 136 |
131 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; | 137 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; |
132 NPObject* m_NPObject; | 138 NPObject* m_NPObject; |
133 bool m_isCapturingMouseEvents; | 139 bool m_isCapturingMouseEvents; |
134 bool m_inBeforeLoadEventHandler; | 140 bool m_inBeforeLoadEventHandler; |
135 bool m_needsWidgetUpdate; | 141 bool m_needsWidgetUpdate; |
136 bool m_shouldPreferPlugInsForImages; | 142 bool m_shouldPreferPlugInsForImages; |
137 DisplayState m_displayState; | 143 DisplayState m_displayState; |
144 | |
145 // Keep track of any plugins that wish to be persisted. | |
146 RefPtr<Widget> m_plugin; | |
147 String m_pluginMimeType; | |
138 }; | 148 }; |
139 | 149 |
140 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); | 150 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); |
141 | 151 |
142 } // namespace WebCore | 152 } // namespace WebCore |
143 | 153 |
144 #endif // HTMLPlugInElement_h | 154 #endif // HTMLPlugInElement_h |
OLD | NEW |