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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 virtual bool useFallbackContent() const { return false; } | 99 virtual bool useFallbackContent() const { return false; } |
100 | 100 |
101 virtual bool dispatchBeforeLoadEvent(const String& sourceURL) OVERRIDE; | 101 virtual bool dispatchBeforeLoadEvent(const String& sourceURL) OVERRIDE; |
102 | 102 |
103 // Create or update the RenderWidget and return it, triggering layout if nec
essary. | 103 // Create or update the RenderWidget and return it, triggering layout if nec
essary. |
104 virtual RenderWidget* renderWidgetForJSBindings() const; | 104 virtual RenderWidget* renderWidgetForJSBindings() const; |
105 | 105 |
106 bool isImageType(); | 106 bool isImageType(); |
107 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForI
mages; } | 107 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForI
mages; } |
108 RenderEmbeddedObject* renderEmbeddedObject() const; | 108 RenderEmbeddedObject* renderEmbeddedObject() const; |
| 109 bool allowedToLoadFrameURL(const String& url); |
| 110 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
; |
109 | 111 |
110 String m_serviceType; | 112 String m_serviceType; |
111 String m_url; | 113 String m_url; |
112 KURL m_loadedUrl; | 114 KURL m_loadedUrl; |
113 OwnPtr<HTMLImageLoader> m_imageLoader; | 115 OwnPtr<HTMLImageLoader> m_imageLoader; |
114 | 116 |
115 private: | 117 private: |
116 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } | 118 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } |
117 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 119 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
118 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; | 120 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; |
119 virtual void defaultEventHandler(Event*); | 121 virtual void defaultEventHandler(Event*) OVERRIDE; |
| 122 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
| 123 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE FINAL; |
| 124 virtual void finishParsingChildren() OVERRIDE; |
120 | 125 |
121 // Return any existing RenderWidget without triggering relayout, or 0 if it
doesn't yet exist. | 126 // Return any existing RenderWidget without triggering relayout, or 0 if it
doesn't yet exist. |
122 virtual RenderWidget* existingRenderWidget() const = 0; | 127 virtual RenderWidget* existingRenderWidget() const = 0; |
123 | 128 |
124 virtual bool supportsFocus() const OVERRIDE { return true; }; | 129 virtual bool supportsFocus() const OVERRIDE { return true; }; |
125 virtual bool rendererIsFocusable() const OVERRIDE; | 130 virtual bool rendererIsFocusable() const OVERRIDE; |
126 | 131 |
127 virtual bool isKeyboardFocusable() const OVERRIDE; | 132 virtual bool isKeyboardFocusable() const OVERRIDE; |
128 virtual bool isPluginElement() const; | 133 virtual bool isPluginElement() const; |
129 static void updateWidgetCallback(Node*); | 134 static void updateWidgetCallback(Node*); |
130 void updateWidgetIfNecessary(); | 135 void updateWidgetIfNecessary(); |
131 | 136 |
132 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; | 137 mutable RefPtr<SharedPersistent<v8::Object> > m_pluginWrapper; |
133 NPObject* m_NPObject; | 138 NPObject* m_NPObject; |
134 bool m_isCapturingMouseEvents; | 139 bool m_isCapturingMouseEvents; |
135 bool m_inBeforeLoadEventHandler; | 140 bool m_inBeforeLoadEventHandler; |
136 bool m_needsWidgetUpdate; | 141 bool m_needsWidgetUpdate; |
137 bool m_shouldPreferPlugInsForImages; | 142 bool m_shouldPreferPlugInsForImages; |
138 DisplayState m_displayState; | 143 DisplayState m_displayState; |
139 }; | 144 }; |
140 | 145 |
141 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); | 146 DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement()); |
142 | 147 |
143 } // namespace WebCore | 148 } // namespace WebCore |
144 | 149 |
145 #endif // HTMLPlugInElement_h | 150 #endif // HTMLPlugInElement_h |
OLD | NEW |