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

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

Issue 2586633002: Dispose a persisted plugin widget if the content frame is detached. (Closed)
Patch Set: Fix typos Created 4 years 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void setNeedsWidgetUpdate(bool needsWidgetUpdate) { 60 void setNeedsWidgetUpdate(bool needsWidgetUpdate) {
61 m_needsWidgetUpdate = needsWidgetUpdate; 61 m_needsWidgetUpdate = needsWidgetUpdate;
62 } 62 }
63 void updateWidget(); 63 void updateWidget();
64 64
65 bool shouldAccelerate() const; 65 bool shouldAccelerate() const;
66 66
67 void requestPluginCreationWithoutLayoutObjectIfPossible(); 67 void requestPluginCreationWithoutLayoutObjectIfPossible();
68 void createPluginWithoutLayoutObject(); 68 void createPluginWithoutLayoutObject();
69 69
70 void removedFrom(ContainerNode* insertionPoint) override;
71
72 protected: 70 protected:
73 HTMLPlugInElement(const QualifiedName& tagName, 71 HTMLPlugInElement(const QualifiedName& tagName,
74 Document&, 72 Document&,
75 bool createdByParser, 73 bool createdByParser,
76 PreferPlugInsForImagesOption); 74 PreferPlugInsForImagesOption);
77 75
78 // Node functions: 76 // Node functions:
77 void removedFrom(ContainerNode* insertionPoint) override;
79 void didMoveToNewDocument(Document& oldDocument) override; 78 void didMoveToNewDocument(Document& oldDocument) override;
80 79
81 // Element functions: 80 // Element functions:
82 bool isPresentationAttribute(const QualifiedName&) const override; 81 bool isPresentationAttribute(const QualifiedName&) const override;
83 void collectStyleForPresentationAttribute(const QualifiedName&, 82 void collectStyleForPresentationAttribute(const QualifiedName&,
84 const AtomicString&, 83 const AtomicString&,
85 MutableStylePropertySet*) override; 84 MutableStylePropertySet*) override;
86 85
87 virtual bool hasFallbackContent() const; 86 virtual bool hasFallbackContent() const;
88 virtual bool useFallbackContent() const; 87 virtual bool useFallbackContent() const;
(...skipping 19 matching lines...) Expand all
108 void dispatchErrorEvent(); 107 void dispatchErrorEvent();
109 void lazyReattachIfNeeded(); 108 void lazyReattachIfNeeded();
110 109
111 String m_serviceType; 110 String m_serviceType;
112 String m_url; 111 String m_url;
113 KURL m_loadedUrl; 112 KURL m_loadedUrl;
114 Member<HTMLImageLoader> m_imageLoader; 113 Member<HTMLImageLoader> m_imageLoader;
115 bool m_isDelayingLoadEvent; 114 bool m_isDelayingLoadEvent;
116 115
117 private: 116 private:
118 // EventTarget functions: 117 // EventTarget overrides:
119 void removeAllEventListeners() final; 118 void removeAllEventListeners() final;
120 119
121 // Node functions: 120 // Node overrides:
122 bool canContainRangeEndPoint() const override { return false; } 121 bool canContainRangeEndPoint() const override { return false; }
123 bool canStartSelection() const override; 122 bool canStartSelection() const override;
124 bool willRespondToMouseClickEvents() final; 123 bool willRespondToMouseClickEvents() final;
125 void defaultEventHandler(Event*) final; 124 void defaultEventHandler(Event*) final;
126 void attachLayoutTree(const AttachContext& = AttachContext()) final; 125 void attachLayoutTree(const AttachContext& = AttachContext()) final;
127 void detachLayoutTree(const AttachContext& = AttachContext()) final; 126 void detachLayoutTree(const AttachContext& = AttachContext()) final;
128 void finishParsingChildren() final; 127 void finishParsingChildren() final;
129 128
130 // Element functions: 129 // Element overrides:
131 LayoutObject* createLayoutObject(const ComputedStyle&) override; 130 LayoutObject* createLayoutObject(const ComputedStyle&) override;
132 bool supportsFocus() const final { return true; } 131 bool supportsFocus() const final { return true; }
133 bool layoutObjectIsFocusable() const final; 132 bool layoutObjectIsFocusable() const final;
134 bool isKeyboardFocusable() const final; 133 bool isKeyboardFocusable() const final;
135 void didAddUserAgentShadowRoot(ShadowRoot&) final; 134 void didAddUserAgentShadowRoot(ShadowRoot&) final;
136 135
137 // HTMLElement function: 136 // HTMLElement overrides:
138 bool hasCustomFocusLogic() const override; 137 bool hasCustomFocusLogic() const override;
139 bool isPluginElement() const final; 138 bool isPluginElement() const final;
140 139
140 // HTMLFrameOwnerElement overrides:
141 void disconnectContentFrame() override;
142
141 // Return any existing LayoutPart without triggering relayout, or 0 if it 143 // Return any existing LayoutPart without triggering relayout, or 0 if it
142 // doesn't yet exist. 144 // doesn't yet exist.
143 virtual LayoutPart* existingLayoutPart() const = 0; 145 virtual LayoutPart* existingLayoutPart() const = 0;
144 virtual void updateWidgetInternal() = 0; 146 virtual void updateWidgetInternal() = 0;
145 147
146 bool loadPlugin(const KURL&, 148 bool loadPlugin(const KURL&,
147 const String& mimeType, 149 const String& mimeType,
148 const Vector<String>& paramNames, 150 const Vector<String>& paramNames,
149 const Vector<String>& paramValues, 151 const Vector<String>& paramValues,
150 bool useFallback, 152 bool useFallback,
(...skipping 30 matching lines...) Expand all
181 183
182 inline bool isHTMLPlugInElement(const HTMLElement& element) { 184 inline bool isHTMLPlugInElement(const HTMLElement& element) {
183 return element.isPluginElement(); 185 return element.isPluginElement();
184 } 186 }
185 187
186 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement); 188 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLPlugInElement);
187 189
188 } // namespace blink 190 } // namespace blink
189 191
190 #endif // HTMLPlugInElement_h 192 #endif // HTMLPlugInElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698