| 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 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 * | 20 * |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef HTMLPlugInElement_h | 23 #ifndef HTMLPlugInElement_h |
| 24 #define HTMLPlugInElement_h | 24 #define HTMLPlugInElement_h |
| 25 | 25 |
| 26 #include "bindings/v8/ScriptValue.h" | 26 #include "bindings/v8/SharedPersistent.h" |
| 27 #include "core/html/HTMLFrameOwnerElement.h" | 27 #include "core/html/HTMLFrameOwnerElement.h" |
| 28 | 28 |
| 29 struct NPObject; | 29 struct NPObject; |
| 30 | 30 |
| 31 namespace WebCore { | 31 namespace WebCore { |
| 32 | 32 |
| 33 class HTMLImageLoader; | 33 class HTMLImageLoader; |
| 34 class RenderEmbeddedObject; | 34 class RenderEmbeddedObject; |
| 35 class RenderWidget; | 35 class RenderWidget; |
| 36 class Widget; | 36 class Widget; |
| 37 | 37 |
| 38 enum PreferPlugInsForImagesOption { | 38 enum PreferPlugInsForImagesOption { |
| 39 ShouldPreferPlugInsForImages, | 39 ShouldPreferPlugInsForImages, |
| 40 ShouldNotPreferPlugInsForImages | 40 ShouldNotPreferPlugInsForImages |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 class HTMLPlugInElement : public HTMLFrameOwnerElement { | 43 class HTMLPlugInElement : public HTMLFrameOwnerElement { |
| 44 public: | 44 public: |
| 45 virtual ~HTMLPlugInElement(); | 45 virtual ~HTMLPlugInElement(); |
| 46 | 46 |
| 47 void resetInstance(); | 47 void resetInstance(); |
| 48 ScriptValue pluginWrapper(); | 48 SharedPersistent<v8::Object>* pluginWrapper(); |
| 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 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 RestartingWithPendingMouseClick, | 119 RestartingWithPendingMouseClick, |
| 120 Playing | 120 Playing |
| 121 }; | 121 }; |
| 122 DisplayState displayState() const { return m_displayState; } | 122 DisplayState displayState() const { return m_displayState; } |
| 123 void setDisplayState(DisplayState state) { m_displayState = state; } | 123 void setDisplayState(DisplayState state) { m_displayState = state; } |
| 124 const String loadedMimeType() const; | 124 const String loadedMimeType() const; |
| 125 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback); | 125 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback); |
| 126 bool pluginIsLoadable(const KURL&, const String& mimeType); | 126 bool pluginIsLoadable(const KURL&, const String& mimeType); |
| 127 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; | 127 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; |
| 128 | 128 |
| 129 mutable ScriptValue m_pluginWrapper; | 129 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; |
| 130 NPObject* m_NPObject; | 130 NPObject* m_NPObject; |
| 131 bool m_isCapturingMouseEvents; | 131 bool m_isCapturingMouseEvents; |
| 132 bool m_inBeforeLoadEventHandler; | 132 bool m_inBeforeLoadEventHandler; |
| 133 bool m_needsWidgetUpdate; | 133 bool m_needsWidgetUpdate; |
| 134 bool m_shouldPreferPlugInsForImages; | 134 bool m_shouldPreferPlugInsForImages; |
| 135 DisplayState m_displayState; | 135 DisplayState m_displayState; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); | 138 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); |
| 139 | 139 |
| 140 } // namespace WebCore | 140 } // namespace WebCore |
| 141 | 141 |
| 142 #endif // HTMLPlugInElement_h | 142 #endif // HTMLPlugInElement_h |
| OLD | NEW |