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 HTMLPlugInElement : public HTMLFrameOwnerElement { | 45 class HTMLPlugInElement : public HTMLFrameOwnerElement { |
46 public: | 46 public: |
47 virtual ~HTMLPlugInElement(); | 47 virtual ~HTMLPlugInElement(); |
48 virtual void trace(Visitor*) override; | 48 virtual void trace(Visitor*) override; |
| 49 #if ENABLE(OILPAN) |
| 50 virtual void disconnectContentFrame() override; |
| 51 void shouldDisposePlugin(); |
| 52 #endif |
49 | 53 |
50 void resetInstance(); | 54 void resetInstance(); |
51 SharedPersistent<v8::Object>* pluginWrapper(); | 55 SharedPersistent<v8::Object>* pluginWrapper(); |
52 Widget* pluginWidget() const; | 56 Widget* pluginWidget() const; |
53 NPObject* getNPObject(); | 57 NPObject* getNPObject(); |
54 bool canProcessDrag() const; | 58 bool canProcessDrag() const; |
55 const String& url() const { return m_url; } | 59 const String& url() const { return m_url; } |
56 | 60 |
57 // Public for FrameView::addPartToUpdate() | 61 // Public for FrameView::addPartToUpdate() |
58 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } | 62 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 130 |
127 // Return any existing RenderPart without triggering relayout, or 0 if it | 131 // Return any existing RenderPart without triggering relayout, or 0 if it |
128 // doesn't yet exist. | 132 // doesn't yet exist. |
129 virtual RenderPart* existingRenderPart() const = 0; | 133 virtual RenderPart* existingRenderPart() const = 0; |
130 virtual void updateWidgetInternal() = 0; | 134 virtual void updateWidgetInternal() = 0; |
131 | 135 |
132 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback, bool requireRend
erer); | 136 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback, bool requireRend
erer); |
133 bool pluginIsLoadable(const KURL&, const String& mimeType); | 137 bool pluginIsLoadable(const KURL&, const String& mimeType); |
134 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; | 138 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; |
135 | 139 |
| 140 void setPersistedPluginWidget(Widget*); |
| 141 |
136 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; | 142 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; |
137 NPObject* m_NPObject; | 143 NPObject* m_NPObject; |
138 bool m_isCapturingMouseEvents; | 144 bool m_isCapturingMouseEvents; |
139 bool m_needsWidgetUpdate; | 145 bool m_needsWidgetUpdate; |
140 bool m_shouldPreferPlugInsForImages; | 146 bool m_shouldPreferPlugInsForImages; |
141 | 147 |
142 OwnPtrWillBeMember<PluginPlaceholder> m_placeholder; | 148 OwnPtrWillBeMember<PluginPlaceholder> m_placeholder; |
143 | 149 |
144 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget. | 150 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget. |
145 // However, plugins can persist even when not rendered. In order to | 151 // However, plugins can persist even when not rendered. In order to |
146 // prevent confusing code which may assume that widget() != null | 152 // prevent confusing code which may assume that widget() != null |
147 // means the frame is active, we save off m_widget here while | 153 // means the frame is active, we save off m_widget here while |
148 // the plugin is persisting but not being displayed. | 154 // the plugin is persisting but not being displayed. |
149 RefPtr<Widget> m_persistedPluginWidget; | 155 RefPtrWillBeMember<Widget> m_persistedPluginWidget; |
150 }; | 156 }; |
151 | 157 |
152 inline bool isHTMLPlugInElement(const HTMLElement& element) | 158 inline bool isHTMLPlugInElement(const HTMLElement& element) |
153 { | 159 { |
154 return element.isPluginElement(); | 160 return element.isPluginElement(); |
155 } | 161 } |
156 | 162 |
157 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); | 163 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); |
158 | 164 |
159 } // namespace blink | 165 } // namespace blink |
160 | 166 |
161 #endif // HTMLPlugInElement_h | 167 #endif // HTMLPlugInElement_h |
OLD | NEW |