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

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

Issue 2927823002: Drop ImageLoader in plugins (Closed)
Patch Set: Drop ImageLoader in plugins Created 3 years, 6 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.
11 * 11 *
12 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details. 15 * Library General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Library General Public License 17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to 18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA. 20 * Boston, MA 02110-1301, USA.
21 * 21 *
22 */ 22 */
23 23
24 #ifndef HTMLPlugInElement_h 24 #ifndef HTMLPlugInElement_h
25 #define HTMLPlugInElement_h 25 #define HTMLPlugInElement_h
26 26
27 #include "core/CoreExport.h" 27 #include "core/CoreExport.h"
28 #include "core/html/HTMLFrameOwnerElement.h" 28 #include "core/html/HTMLFrameOwnerElement.h"
29 #include "platform/bindings/ActiveScriptWrappable.h"
30 #include "platform/bindings/SharedPersistent.h" 29 #include "platform/bindings/SharedPersistent.h"
31 #include "v8/include/v8.h" 30 #include "v8/include/v8.h"
32 31
33 namespace blink { 32 namespace blink {
34 33
35 class HTMLImageLoader;
36 class LayoutEmbeddedContent; 34 class LayoutEmbeddedContent;
37 class LayoutEmbeddedItem; 35 class LayoutEmbeddedItem;
38 class PluginView; 36 class PluginView;
39 37
40 enum PreferPlugInsForImagesOption { 38 enum PreferPlugInsForImagesOption {
41 kShouldPreferPlugInsForImages, 39 kShouldPreferPlugInsForImages,
42 kShouldNotPreferPlugInsForImages 40 kShouldNotPreferPlugInsForImages
43 }; 41 };
44 42
45 class CORE_EXPORT HTMLPlugInElement 43 class CORE_EXPORT HTMLPlugInElement : public HTMLFrameOwnerElement {
46 : public HTMLFrameOwnerElement,
47 public ActiveScriptWrappable<HTMLPlugInElement> {
48 USING_GARBAGE_COLLECTED_MIXIN(HTMLPlugInElement); 44 USING_GARBAGE_COLLECTED_MIXIN(HTMLPlugInElement);
49 45
50 public: 46 public:
51 ~HTMLPlugInElement() override; 47 ~HTMLPlugInElement() override;
52 DECLARE_VIRTUAL_TRACE(); 48 DECLARE_VIRTUAL_TRACE();
53 49
54 bool HasPendingActivity() const final;
55
56 void SetFocused(bool, WebFocusType) override; 50 void SetFocused(bool, WebFocusType) override;
57 void ResetInstance(); 51 void ResetInstance();
58 // TODO(dcheng): Consider removing this, since HTMLEmbedElementLegacyCall 52 // TODO(dcheng): Consider removing this, since HTMLEmbedElementLegacyCall
59 // and HTMLObjectElementLegacyCall usage is extremely low. 53 // and HTMLObjectElementLegacyCall usage is extremely low.
60 v8::Local<v8::Object> PluginWrapper(); 54 v8::Local<v8::Object> PluginWrapper();
61 // TODO(joelhockey): Clean up PluginEmbeddedContentView and 55 // TODO(joelhockey): Clean up PluginEmbeddedContentView and
62 // OwnedEmbeddedContentView (maybe also PluginWrapper). It would be good to 56 // OwnedEmbeddedContentView (maybe also PluginWrapper). It would be good to
63 // remove and/or rename some of these. PluginEmbeddedContentView and 57 // remove and/or rename some of these. PluginEmbeddedContentView and
64 // OwnedPlugin both return the plugin that is stored as 58 // OwnedPlugin both return the plugin that is stored as
65 // HTMLFrameOwnerElement::embedded_content_view_. However 59 // HTMLFrameOwnerElement::embedded_content_view_. However
(...skipping 18 matching lines...) Expand all
84 void CreatePluginWithoutLayoutObject(); 78 void CreatePluginWithoutLayoutObject();
85 79
86 protected: 80 protected:
87 HTMLPlugInElement(const QualifiedName& tag_name, 81 HTMLPlugInElement(const QualifiedName& tag_name,
88 Document&, 82 Document&,
89 bool created_by_parser, 83 bool created_by_parser,
90 PreferPlugInsForImagesOption); 84 PreferPlugInsForImagesOption);
91 85
92 // Node functions: 86 // Node functions:
93 void RemovedFrom(ContainerNode* insertion_point) override; 87 void RemovedFrom(ContainerNode* insertion_point) override;
94 void DidMoveToNewDocument(Document& old_document) override;
95 88
96 // Element functions: 89 // Element functions:
97 bool IsPresentationAttribute(const QualifiedName&) const override; 90 bool IsPresentationAttribute(const QualifiedName&) const override;
98 void CollectStyleForPresentationAttribute(const QualifiedName&, 91 void CollectStyleForPresentationAttribute(const QualifiedName&,
99 const AtomicString&, 92 const AtomicString&,
100 MutableStylePropertySet*) override; 93 MutableStylePropertySet*) override;
101 94
102 virtual bool HasFallbackContent() const; 95 virtual bool HasFallbackContent() const;
103 virtual bool UseFallbackContent() const; 96 virtual bool UseFallbackContent() const;
104 // Create or update the LayoutEmbeddedContent and return it, triggering layout 97 // Create or update the LayoutEmbeddedContent and return it, triggering layout
105 // if necessary. 98 // if necessary.
106 virtual LayoutEmbeddedContent* LayoutEmbeddedContentForJSBindings() const; 99 virtual LayoutEmbeddedContent* LayoutEmbeddedContentForJSBindings() const;
107 100
108 bool IsImageType(); 101 bool IsImageType();
109 LayoutEmbeddedItem GetLayoutEmbeddedItem() const; 102 LayoutEmbeddedItem GetLayoutEmbeddedItem() const;
110 bool AllowedToLoadFrameURL(const String& url); 103 bool AllowedToLoadFrameURL(const String& url);
111 bool RequestObject(const Vector<String>& param_names, 104 bool RequestObject(const Vector<String>& param_names,
112 const Vector<String>& param_values); 105 const Vector<String>& param_values);
113 106
114 void DispatchErrorEvent(); 107 void DispatchErrorEvent();
115 bool IsErrorplaceholder(); 108 bool IsErrorplaceholder();
116 void LazyReattachIfNeeded(); 109 void LazyReattachIfNeeded();
117 110
118 String service_type_; 111 String service_type_;
119 String url_; 112 String url_;
120 KURL loaded_url_; 113 KURL loaded_url_;
121 Member<HTMLImageLoader> image_loader_;
122 bool is_delaying_load_event_; 114 bool is_delaying_load_event_;
123 115
124 private: 116 private:
125 // EventTarget overrides: 117 // EventTarget overrides:
126 void RemoveAllEventListeners() final; 118 void RemoveAllEventListeners() final;
127 119
128 // Node overrides: 120 // Node overrides:
129 bool CanContainRangeEndPoint() const override { return false; } 121 bool CanContainRangeEndPoint() const override { return false; }
130 bool CanStartSelection() const override; 122 bool CanStartSelection() const override;
131 bool WillRespondToMouseClickEvents() final; 123 bool WillRespondToMouseClickEvents() final;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 189
198 inline bool IsHTMLPlugInElement(const HTMLElement& element) { 190 inline bool IsHTMLPlugInElement(const HTMLElement& element) {
199 return element.IsPluginElement(); 191 return element.IsPluginElement();
200 } 192 }
201 193
202 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); 194 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement);
203 195
204 } // namespace blink 196 } // namespace blink
205 197
206 #endif // HTMLPlugInElement_h 198 #endif // HTMLPlugInElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLObjectElement.idl ('k') | third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698