| 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 26 matching lines...) Expand all Loading... |
| 37 class Widget; | 37 class Widget; |
| 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 | 48 |
| 49 void resetInstance(); | 49 void resetInstance(); |
| 50 SharedPersistent<v8::Object>* pluginWrapper(); | 50 SharedPersistent<v8::Object>* pluginWrapper(); |
| 51 Widget* pluginWidget() const; | 51 Widget* pluginWidget() const; |
| 52 NPObject* getNPObject(); | 52 NPObject* getNPObject(); |
| 53 bool canProcessDrag() const; | 53 bool canProcessDrag() const; |
| 54 const String& url() const { return m_url; } | 54 const String& url() const { return m_url; } |
| 55 | 55 |
| 56 // Public for FrameView::addWidgetToUpdate() | 56 // Public for FrameView::addWidgetToUpdate() |
| 57 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } | 57 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } |
| 58 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne
edsWidgetUpdate; } | 58 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne
edsWidgetUpdate; } |
| 59 void updateWidget(); | 59 void updateWidget(); |
| 60 | 60 |
| 61 bool shouldAccelerate() const; | 61 bool shouldAccelerate() const; |
| 62 | 62 |
| 63 void requestPluginCreationWithoutRendererIfPossible(); | 63 void requestPluginCreationWithoutRendererIfPossible(); |
| 64 void createPluginWithoutRenderer(); | 64 void createPluginWithoutRenderer(); |
| 65 | 65 |
| 66 bool usePlaceholderContent() const { return m_usePlaceholderContent; } | 66 bool usePlaceholderContent() const { return m_usePlaceholderContent; } |
| 67 void setUsePlaceholderContent(bool); | 67 void setUsePlaceholderContent(bool); |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar
ser, PreferPlugInsForImagesOption); | 70 HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByPar
ser, PreferPlugInsForImagesOption); |
| 71 | 71 |
| 72 // Node functions: | 72 // Node functions: |
| 73 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 73 virtual void didMoveToNewDocument(Document& oldDocument) override; |
| 74 | 74 |
| 75 // Element functions: | 75 // Element functions: |
| 76 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 76 virtual bool isPresentationAttribute(const QualifiedName&) const override; |
| 77 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) OVERRIDE; | 77 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) override; |
| 78 | 78 |
| 79 virtual bool hasFallbackContent() const; | 79 virtual bool hasFallbackContent() const; |
| 80 virtual bool useFallbackContent() const; | 80 virtual bool useFallbackContent() const; |
| 81 // Create or update the RenderWidget and return it, triggering layout if | 81 // Create or update the RenderWidget and return it, triggering layout if |
| 82 // necessary. | 82 // necessary. |
| 83 virtual RenderWidget* renderWidgetForJSBindings() const; | 83 virtual RenderWidget* renderWidgetForJSBindings() const; |
| 84 | 84 |
| 85 bool isImageType(); | 85 bool isImageType(); |
| 86 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForI
mages; } | 86 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForI
mages; } |
| 87 RenderEmbeddedObject* renderEmbeddedObject() const; | 87 RenderEmbeddedObject* renderEmbeddedObject() const; |
| 88 bool allowedToLoadFrameURL(const String& url); | 88 bool allowedToLoadFrameURL(const String& url); |
| 89 bool requestObject(const String& url, const String& mimeType, const Vector<S
tring>& paramNames, const Vector<String>& paramValues); | 89 bool requestObject(const String& url, const String& mimeType, const Vector<S
tring>& paramNames, const Vector<String>& paramValues); |
| 90 bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback,
bool& useFallback); | 90 bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback,
bool& useFallback); |
| 91 | 91 |
| 92 void dispatchErrorEvent(); | 92 void dispatchErrorEvent(); |
| 93 void lazyReattachIfNeeded(); | 93 void lazyReattachIfNeeded(); |
| 94 | 94 |
| 95 String m_serviceType; | 95 String m_serviceType; |
| 96 String m_url; | 96 String m_url; |
| 97 KURL m_loadedUrl; | 97 KURL m_loadedUrl; |
| 98 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; | 98 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; |
| 99 bool m_isDelayingLoadEvent; | 99 bool m_isDelayingLoadEvent; |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 // EventTarget functions: | 102 // EventTarget functions: |
| 103 virtual void removeAllEventListeners() OVERRIDE FINAL; | 103 virtual void removeAllEventListeners() override final; |
| 104 | 104 |
| 105 // Node functions: | 105 // Node functions: |
| 106 virtual bool canContainRangeEndPoint() const OVERRIDE { return false; } | 106 virtual bool canContainRangeEndPoint() const override { return false; } |
| 107 virtual bool willRespondToMouseClickEvents() OVERRIDE FINAL; | 107 virtual bool willRespondToMouseClickEvents() override final; |
| 108 virtual void defaultEventHandler(Event*) OVERRIDE FINAL; | 108 virtual void defaultEventHandler(Event*) override final; |
| 109 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE FINAL; | 109 virtual void attach(const AttachContext& = AttachContext()) override final; |
| 110 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE FINAL; | 110 virtual void detach(const AttachContext& = AttachContext()) override final; |
| 111 virtual void finishParsingChildren() OVERRIDE FINAL; | 111 virtual void finishParsingChildren() override final; |
| 112 | 112 |
| 113 // Element functions: | 113 // Element functions: |
| 114 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 114 virtual RenderObject* createRenderer(RenderStyle*) override; |
| 115 virtual bool supportsFocus() const OVERRIDE FINAL { return true; } | 115 virtual bool supportsFocus() const override final { return true; } |
| 116 virtual bool rendererIsFocusable() const OVERRIDE FINAL; | 116 virtual bool rendererIsFocusable() const override final; |
| 117 virtual bool isKeyboardFocusable() const OVERRIDE FINAL; | 117 virtual bool isKeyboardFocusable() const override final; |
| 118 virtual void didAddUserAgentShadowRoot(ShadowRoot&) OVERRIDE FINAL; | 118 virtual void didAddUserAgentShadowRoot(ShadowRoot&) override final; |
| 119 virtual void willAddFirstAuthorShadowRoot() OVERRIDE FINAL; | 119 virtual void willAddFirstAuthorShadowRoot() override final; |
| 120 | 120 |
| 121 // HTMLElement function: | 121 // HTMLElement function: |
| 122 virtual bool hasCustomFocusLogic() const OVERRIDE; | 122 virtual bool hasCustomFocusLogic() const override; |
| 123 virtual bool isPluginElement() const OVERRIDE FINAL; | 123 virtual bool isPluginElement() const override final; |
| 124 | 124 |
| 125 // Return any existing RenderWidget without triggering relayout, or 0 if it | 125 // Return any existing RenderWidget without triggering relayout, or 0 if it |
| 126 // doesn't yet exist. | 126 // doesn't yet exist. |
| 127 virtual RenderWidget* existingRenderWidget() const = 0; | 127 virtual RenderWidget* existingRenderWidget() const = 0; |
| 128 virtual void updateWidgetInternal() = 0; | 128 virtual void updateWidgetInternal() = 0; |
| 129 | 129 |
| 130 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p
aramNames, const Vector<String>& paramValues, bool useFallback, bool requireRend
erer); | 130 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); | 131 bool pluginIsLoadable(const KURL&, const String& mimeType); |
| 132 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; | 132 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; |
| 133 | 133 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 149 inline bool isHTMLPlugInElement(const HTMLElement& element) | 149 inline bool isHTMLPlugInElement(const HTMLElement& element) |
| 150 { | 150 { |
| 151 return element.isPluginElement(); | 151 return element.isPluginElement(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); | 154 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); |
| 155 | 155 |
| 156 } // namespace blink | 156 } // namespace blink |
| 157 | 157 |
| 158 #endif // HTMLPlugInElement_h | 158 #endif // HTMLPlugInElement_h |
| OLD | NEW |