Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.h

Issue 1483733002: Remove support for NPObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
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/core/v8/SharedPersistent.h" 26 #include "bindings/core/v8/SharedPersistent.h"
27 #include "core/CoreExport.h" 27 #include "core/CoreExport.h"
28 #include "core/html/HTMLFrameOwnerElement.h" 28 #include "core/html/HTMLFrameOwnerElement.h"
29 #include <v8.h> 29 #include <v8.h>
30 30
31 struct NPObject;
32
33 namespace blink { 31 namespace blink {
34 32
35 class HTMLImageLoader; 33 class HTMLImageLoader;
36 class LayoutEmbeddedObject; 34 class LayoutEmbeddedObject;
37 class LayoutPart; 35 class LayoutPart;
38 class Widget; 36 class Widget;
39 37
40 enum PreferPlugInsForImagesOption { 38 enum PreferPlugInsForImagesOption {
41 ShouldPreferPlugInsForImages, 39 ShouldPreferPlugInsForImages,
42 ShouldNotPreferPlugInsForImages 40 ShouldNotPreferPlugInsForImages
43 }; 41 };
44 42
45 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { 43 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement {
46 public: 44 public:
47 ~HTMLPlugInElement() override; 45 ~HTMLPlugInElement() override;
48 DECLARE_VIRTUAL_TRACE(); 46 DECLARE_VIRTUAL_TRACE();
49 47
50 void resetInstance(); 48 void resetInstance();
49 // TODO(dcheng): Consider removing this, since HTMLEmbedElementLegacyCall
50 // and HTMLObjectElementLegacyCall usage is extremely low.
51 SharedPersistent<v8::Object>* pluginWrapper(); 51 SharedPersistent<v8::Object>* pluginWrapper();
52 Widget* pluginWidget() const; 52 Widget* pluginWidget() const;
53 NPObject* getNPObject();
54 void setPluginFocus(bool focused); 53 void setPluginFocus(bool focused);
55 bool canProcessDrag() const; 54 bool canProcessDrag() const;
56 const String& url() const { return m_url; } 55 const String& url() const { return m_url; }
57 56
58 // Public for FrameView::addPartToUpdate() 57 // Public for FrameView::addPartToUpdate()
59 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; } 58 bool needsWidgetUpdate() const { return m_needsWidgetUpdate; }
60 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne edsWidgetUpdate; } 59 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = ne edsWidgetUpdate; }
61 void updateWidget(); 60 void updateWidget();
62 61
63 bool shouldAccelerate() const; 62 bool shouldAccelerate() const;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 virtual LayoutPart* existingLayoutPart() const = 0; 127 virtual LayoutPart* existingLayoutPart() const = 0;
129 virtual void updateWidgetInternal() = 0; 128 virtual void updateWidgetInternal() = 0;
130 129
131 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p aramNames, const Vector<String>& paramValues, bool useFallback, bool requireLayo utObject); 130 bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& p aramNames, const Vector<String>& paramValues, bool useFallback, bool requireLayo utObject);
132 bool pluginIsLoadable(const KURL&, const String& mimeType); 131 bool pluginIsLoadable(const KURL&, const String& mimeType);
133 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType) ; 132 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType) ;
134 133
135 void setPersistedPluginWidget(Widget*); 134 void setPersistedPluginWidget(Widget*);
136 135
137 mutable RefPtr<SharedPersistent<v8::Object>> m_pluginWrapper; 136 mutable RefPtr<SharedPersistent<v8::Object>> m_pluginWrapper;
138 NPObject* m_NPObject;
139 bool m_needsWidgetUpdate; 137 bool m_needsWidgetUpdate;
140 bool m_shouldPreferPlugInsForImages; 138 bool m_shouldPreferPlugInsForImages;
141 139
142 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget. 140 // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget.
143 // However, plugins can persist even when not rendered. In order to 141 // However, plugins can persist even when not rendered. In order to
144 // prevent confusing code which may assume that widget() != null 142 // prevent confusing code which may assume that widget() != null
145 // means the frame is active, we save off m_widget here while 143 // means the frame is active, we save off m_widget here while
146 // the plugin is persisting but not being displayed. 144 // the plugin is persisting but not being displayed.
147 RefPtrWillBeMember<Widget> m_persistedPluginWidget; 145 RefPtrWillBeMember<Widget> m_persistedPluginWidget;
148 }; 146 };
149 147
150 inline bool isHTMLPlugInElement(const HTMLElement& element) 148 inline bool isHTMLPlugInElement(const HTMLElement& element)
151 { 149 {
152 return element.isPluginElement(); 150 return element.isPluginElement();
153 } 151 }
154 152
155 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); 153 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement);
156 154
157 } // namespace blink 155 } // namespace blink
158 156
159 #endif // HTMLPlugInElement_h 157 #endif // HTMLPlugInElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698