| 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 | 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "core/CoreExport.h" | 28 #include "core/CoreExport.h" |
| 29 #include "core/html/HTMLFrameOwnerElement.h" | 29 #include "core/html/HTMLFrameOwnerElement.h" |
| 30 | 30 |
| 31 #include <v8.h> | 31 #include <v8.h> |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class HTMLImageLoader; | 35 class HTMLImageLoader; |
| 36 class LayoutPart; | 36 class LayoutPart; |
| 37 class LayoutEmbeddedItem; | 37 class LayoutEmbeddedItem; |
| 38 class PluginClient; |
| 38 class Widget; | 39 class Widget; |
| 39 | 40 |
| 40 enum PreferPlugInsForImagesOption { | 41 enum PreferPlugInsForImagesOption { |
| 41 ShouldPreferPlugInsForImages, | 42 ShouldPreferPlugInsForImages, |
| 42 ShouldNotPreferPlugInsForImages | 43 ShouldNotPreferPlugInsForImages |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { | 46 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { |
| 46 public: | 47 public: |
| 47 ~HTMLPlugInElement() override; | 48 ~HTMLPlugInElement() override; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 bool isPluginElement() const final; | 139 bool isPluginElement() const final; |
| 139 | 140 |
| 140 // HTMLFrameOwnerElement overrides: | 141 // HTMLFrameOwnerElement overrides: |
| 141 void disconnectContentFrame() override; | 142 void disconnectContentFrame() override; |
| 142 | 143 |
| 143 // Return any existing LayoutPart without triggering relayout, or 0 if it | 144 // Return any existing LayoutPart without triggering relayout, or 0 if it |
| 144 // doesn't yet exist. | 145 // doesn't yet exist. |
| 145 virtual LayoutPart* existingLayoutPart() const = 0; | 146 virtual LayoutPart* existingLayoutPart() const = 0; |
| 146 virtual void updateWidgetInternal() = 0; | 147 virtual void updateWidgetInternal() = 0; |
| 147 | 148 |
| 149 bool loadFrame(const KURL& resourceUrl); |
| 148 bool loadPlugin(const KURL&, | 150 bool loadPlugin(const KURL&, |
| 149 const String& mimeType, | 151 const String& mimeType, |
| 150 const Vector<String>& paramNames, | 152 const Vector<String>& paramNames, |
| 151 const Vector<String>& paramValues, | 153 const Vector<String>& paramValues, |
| 152 bool useFallback, | 154 bool useFallback, |
| 153 bool requireLayoutObject); | 155 bool requireLayoutObject); |
| 154 // Perform checks after we have determined that a plugin will be used to | 156 // Perform checks after we have determined that a plugin will be used to |
| 155 // show the object (i.e after allowedToLoadObject). | 157 // show the object (i.e after allowedToLoadObject). |
| 156 bool allowedToLoadPlugin(const KURL&, const String& mimeType); | 158 bool allowedToLoadPlugin(const KURL&, const String& mimeType); |
| 157 // Perform checks based on the URL and MIME-type of the object to load. | 159 // Perform checks based on the URL and MIME-type of the object to load. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 172 // !layoutEmbeddedItem().showsUnavailablePluginIndicator()|. We want to | 174 // !layoutEmbeddedItem().showsUnavailablePluginIndicator()|. We want to |
| 173 // avoid accessing |layoutObject()| in layoutObjectIsFocusable(). | 175 // avoid accessing |layoutObject()| in layoutObjectIsFocusable(). |
| 174 bool m_pluginIsAvailable = false; | 176 bool m_pluginIsAvailable = false; |
| 175 | 177 |
| 176 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget. | 178 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget. |
| 177 // However, plugins can persist even when not rendered. In order to | 179 // However, plugins can persist even when not rendered. In order to |
| 178 // prevent confusing code which may assume that widget() != null | 180 // prevent confusing code which may assume that widget() != null |
| 179 // means the frame is active, we save off m_widget here while | 181 // means the frame is active, we save off m_widget here while |
| 180 // the plugin is persisting but not being displayed. | 182 // the plugin is persisting but not being displayed. |
| 181 Member<Widget> m_persistedPluginWidget; | 183 Member<Widget> m_persistedPluginWidget; |
| 184 |
| 185 // The plugin might have a client instead of a plugin widget. This relates to |
| 186 // the cases were the plugin is implemented using frames rather than plugin |
| 187 // views and WebPlugins. |
| 188 Member<PluginClient> m_pluginClient; |
| 182 }; | 189 }; |
| 183 | 190 |
| 184 inline bool isHTMLPlugInElement(const HTMLElement& element) { | 191 inline bool isHTMLPlugInElement(const HTMLElement& element) { |
| 185 return element.isPluginElement(); | 192 return element.isPluginElement(); |
| 186 } | 193 } |
| 187 | 194 |
| 188 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); | 195 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); |
| 189 | 196 |
| 190 } // namespace blink | 197 } // namespace blink |
| 191 | 198 |
| 192 #endif // HTMLPlugInElement_h | 199 #endif // HTMLPlugInElement_h |
| OLD | NEW |