Chromium Code Reviews| 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 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 SharedPersistent<v8::Object>* pluginWrapper(); | 48 SharedPersistent<v8::Object>* pluginWrapper(); |
| 49 Widget* pluginWidget() const; | |
| 50 NPObject* getNPObject(); | 49 NPObject* getNPObject(); |
| 51 bool canProcessDrag() const; | 50 bool canProcessDrag() const; |
| 52 const String& url() const { return m_url; } | 51 const String& url() const { return m_url; } |
| 53 | 52 |
| 54 // Public for FrameView::addWidgetToUpdate() | 53 // Public for FrameView::addWidgetToUpdate() |
| 55 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } | 54 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } |
| 56 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne edsWidgetUpdate; } | 55 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne edsWidgetUpdate; } |
| 57 void updateWidget(); | 56 void updateWidget(); |
| 58 | 57 |
| 58 void requestPluginCreationWithoutRendererIfPossible(); | |
| 59 void createPluginWithoutRenderer(); | |
| 60 | |
| 59 protected: | 61 protected: |
| 60 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar ser, PreferPlugInsForImagesOption); | 62 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar ser, PreferPlugInsForImagesOption); |
| 61 | 63 |
| 62 // Node functions: | 64 // Node functions: |
| 63 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 65 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
| 64 virtual bool dispatchBeforeLoadEvent(const String& sourceURL) OVERRIDE; | 66 virtual bool dispatchBeforeLoadEvent(const String& sourceURL) OVERRIDE; |
| 65 | 67 |
| 66 // Element functions: | 68 // Element functions: |
| 67 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 69 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
| 68 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 70 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 virtual void updateWidgetInternal() = 0; | 115 virtual void updateWidgetInternal() = 0; |
| 114 | 116 |
| 115 enum DisplayState { | 117 enum DisplayState { |
| 116 Restarting, | 118 Restarting, |
| 117 RestartingWithPendingMouseClick, | 119 RestartingWithPendingMouseClick, |
| 118 Playing | 120 Playing |
| 119 }; | 121 }; |
| 120 DisplayState displayState() const { return m_displayState; } | 122 DisplayState displayState() const { return m_displayState; } |
| 121 void setDisplayState(DisplayState state) { m_displayState = state; } | 123 void setDisplayState(DisplayState state) { m_displayState = state; } |
| 122 const String loadedMimeType() const; | 124 const String loadedMimeType() const; |
| 123 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, bool requireRend erer); |
| 124 bool pluginIsLoadable(const KURL&, const String& mimeType); | 126 bool pluginIsLoadable(const KURL&, const String& mimeType); |
| 125 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType) ; | 127 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType) ; |
| 126 | 128 |
| 127 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; | 129 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; |
| 128 NPObject* m_NPObject; | 130 NPObject* m_NPObject; |
| 129 bool m_isCapturingMouseEvents; | 131 bool m_isCapturingMouseEvents; |
| 130 bool m_inBeforeLoadEventHandler; | 132 bool m_inBeforeLoadEventHandler; |
| 131 bool m_needsWidgetUpdate; | 133 bool m_needsWidgetUpdate; |
| 132 bool m_shouldPreferPlugInsForImages; | 134 bool m_shouldPreferPlugInsForImages; |
| 133 DisplayState m_displayState; | 135 DisplayState m_displayState; |
| 136 | |
| 137 RefPtr<Widget> m_persistedPluginWidget; | |
|
eseidel
2013/12/12 20:40:13
Why do we have two RefPtr<Widget>s in this patch?
wjmaclean
2013/12/12 22:31:15
Since "persistence" is a plugin-only concept, and
| |
| 134 }; | 138 }; |
| 135 | 139 |
| 136 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); | 140 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); |
| 137 | 141 |
| 138 } // namespace WebCore | 142 } // namespace WebCore |
| 139 | 143 |
| 140 #endif // HTMLPlugInElement_h | 144 #endif // HTMLPlugInElement_h |
| OLD | NEW |