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

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

Issue 2845583002: Remove FrameViewBase as base class of RemoteFrameView. (Closed)
Patch Set: fix scrollbar inactive Created 3 years, 7 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 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2012 Apple Inc. All rights
5 * reserved. 5 * reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement { 44 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement {
45 public: 45 public:
46 ~HTMLPlugInElement() override; 46 ~HTMLPlugInElement() override;
47 DECLARE_VIRTUAL_TRACE(); 47 DECLARE_VIRTUAL_TRACE();
48 48
49 void SetFocused(bool, WebFocusType) override; 49 void SetFocused(bool, WebFocusType) override;
50 void ResetInstance(); 50 void ResetInstance();
51 // TODO(dcheng): Consider removing this, since HTMLEmbedElementLegacyCall 51 // TODO(dcheng): Consider removing this, since HTMLEmbedElementLegacyCall
52 // and HTMLObjectElementLegacyCall usage is extremely low. 52 // and HTMLObjectElementLegacyCall usage is extremely low.
53 SharedPersistent<v8::Object>* PluginWrapper(); 53 SharedPersistent<v8::Object>* PluginWrapper();
54 // TODO(joelhockey): Clean up pluginWidget and plugin (maybe also 54 // TODO(joelhockey): Clean up PluginWidget and OwnedPlugin (maybe also
55 // pluginWrapper). It would be good to remove and/or rename some of these. 55 // PluginWrapper). It would be good to remove and/or rename some of these.
56 // pluginWidget and plugin both return the plugin that is stored on this 56 // PluginWidget and OwnedPlugin both return the plugin that is stored as
57 // element. However pluginWidget will synchronously create the plugin if 57 // widget in HTMLFrameOwnerElement. However PluginWidget will synchronously
58 // required by calling layoutPartForJSBindings. Possibly the pluginWidget 58 // create the plugin if required by calling LayoutPartForJSBindings.
59 // code can be inlined into pluginWrapper. 59 // Possibly the PluginWidget code can be inlined into PluginWrapper.
60 PluginView* PluginWidget() const; 60 PluginView* PluginWidget() const;
61 PluginView* Plugin() const; 61 PluginView* OwnedPlugin() const;
62 bool CanProcessDrag() const; 62 bool CanProcessDrag() const;
63 const String& Url() const { return url_; } 63 const String& Url() const { return url_; }
64 64
65 // Public for FrameView::addPartToUpdate() 65 // Public for FrameView::addPartToUpdate()
66 bool NeedsPluginUpdate() const { return needs_plugin_update_; } 66 bool NeedsPluginUpdate() const { return needs_plugin_update_; }
67 void SetNeedsPluginUpdate(bool needs_plugin_update) { 67 void SetNeedsPluginUpdate(bool needs_plugin_update) {
68 needs_plugin_update_ = needs_plugin_update; 68 needs_plugin_update_ = needs_plugin_update;
69 } 69 }
70 void UpdatePlugin(); 70 void UpdatePlugin();
71 71
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const Vector<String>& param_values, 158 const Vector<String>& param_values,
159 bool use_fallback, 159 bool use_fallback,
160 bool require_layout_object); 160 bool require_layout_object);
161 // Perform checks after we have determined that a plugin will be used to 161 // Perform checks after we have determined that a plugin will be used to
162 // show the object (i.e after allowedToLoadObject). 162 // show the object (i.e after allowedToLoadObject).
163 bool AllowedToLoadPlugin(const KURL&, const String& mime_type); 163 bool AllowedToLoadPlugin(const KURL&, const String& mime_type);
164 // Perform checks based on the URL and MIME-type of the object to load. 164 // Perform checks based on the URL and MIME-type of the object to load.
165 bool AllowedToLoadObject(const KURL&, const String& mime_type); 165 bool AllowedToLoadObject(const KURL&, const String& mime_type);
166 bool WouldLoadAsNetscapePlugin(const String& url, const String& service_type); 166 bool WouldLoadAsNetscapePlugin(const String& url, const String& service_type);
167 167
168 void SetPlugin(PluginView*);
169 PluginView* ReleasePlugin();
joelhockey 2017/05/01 23:04:35 These specialized PluginView methods are no longer
170 void SetPersistedPlugin(PluginView*); 168 void SetPersistedPlugin(PluginView*);
171 169
172 bool RequestObjectInternal(const String& url, 170 bool RequestObjectInternal(const String& url,
173 const String& mime_type, 171 const String& mime_type,
174 const Vector<String>& param_names, 172 const Vector<String>& param_names,
175 const Vector<String>& param_values); 173 const Vector<String>& param_values);
176 174
177 mutable RefPtr<SharedPersistent<v8::Object>> plugin_wrapper_; 175 mutable RefPtr<SharedPersistent<v8::Object>> plugin_wrapper_;
178 bool needs_plugin_update_; 176 bool needs_plugin_update_;
179 bool should_prefer_plug_ins_for_images_; 177 bool should_prefer_plug_ins_for_images_;
180 // Represents |layoutObject() && layoutObject()->isEmbeddedObject() && 178 // Represents |layoutObject() && layoutObject()->isEmbeddedObject() &&
181 // !layoutEmbeddedItem().showsUnavailablePluginIndicator()|. We want to 179 // !layoutEmbeddedItem().showsUnavailablePluginIndicator()|. We want to
182 // avoid accessing |layoutObject()| in layoutObjectIsFocusable(). 180 // avoid accessing |layoutObject()| in layoutObjectIsFocusable().
183 bool plugin_is_available_ = false; 181 bool plugin_is_available_ = false;
184 182
185 Member<PluginView> plugin_; 183 // Normally the plugin is stored in HTMLFrameOwnerElement::widget_.
186 // Normally the plugin is stored in HTMLFrameOwnerElement::m_widget.
187 // However, plugins can persist even when not rendered. In order to 184 // However, plugins can persist even when not rendered. In order to
188 // prevent confusing code which may assume that ownedWidget() != null 185 // prevent confusing code which may assume that OwnedWidget() != null
189 // means the frame is active, we save off m_widget here while 186 // means the frame is active, we save off widget_ here while
190 // the plugin is persisting but not being displayed. 187 // the plugin is persisting but not being displayed.
191 Member<PluginView> persisted_plugin_; 188 Member<PluginView> persisted_plugin_;
192 }; 189 };
193 190
194 inline bool IsHTMLPlugInElement(const HTMLElement& element) { 191 inline bool IsHTMLPlugInElement(const HTMLElement& element) {
195 return element.IsPluginElement(); 192 return element.IsPluginElement();
196 } 193 }
197 194
198 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); 195 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement);
199 196
200 } // namespace blink 197 } // namespace blink
201 198
202 #endif // HTMLPlugInElement_h 199 #endif // HTMLPlugInElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698