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