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

Side by Side Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.h

Issue 1442643003: Oilpan: move WebPluginLoadObserver to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: provide clearPluginContainer() w/ non-Oilpan only Created 5 years, 1 month 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 NPObject* scriptableObjectForElement() override; 107 NPObject* scriptableObjectForElement() override;
108 v8::Local<v8::Object> v8ObjectForElement() override; 108 v8::Local<v8::Object> v8ObjectForElement() override;
109 WebString executeScriptURL(const WebURL&, bool popupsAllowed) override; 109 WebString executeScriptURL(const WebURL&, bool popupsAllowed) override;
110 void loadFrameRequest(const WebURLRequest&, const WebString& target, bool no tifyNeeded, void* notifyData) override; 110 void loadFrameRequest(const WebURLRequest&, const WebString& target, bool no tifyNeeded, void* notifyData) override;
111 bool isRectTopmost(const WebRect&) override; 111 bool isRectTopmost(const WebRect&) override;
112 void requestTouchEventType(TouchEventRequestType) override; 112 void requestTouchEventType(TouchEventRequestType) override;
113 void setWantsWheelEvents(bool) override; 113 void setWantsWheelEvents(bool) override;
114 WebPoint rootFrameToLocalPoint(const WebPoint&) override; 114 WebPoint rootFrameToLocalPoint(const WebPoint&) override;
115 WebPoint localToRootFramePoint(const WebPoint&) override; 115 WebPoint localToRootFramePoint(const WebPoint&) override;
116 116
117 // This cannot be null. 117 // Non-Oilpan, this cannot be null. With Oilpan, it will be
118 // null when in a disposed state, pending finalization during the next GC.
118 WebPlugin* plugin() override { return m_webPlugin; } 119 WebPlugin* plugin() override { return m_webPlugin; }
119 void setPlugin(WebPlugin*) override; 120 void setPlugin(WebPlugin*) override;
120 121
121 float deviceScaleFactor() override; 122 float deviceScaleFactor() override;
122 float pageScaleFactor() override; 123 float pageScaleFactor() override;
123 float pageZoomFactor() override; 124 float pageZoomFactor() override;
124 125
125 virtual void setWebLayer(WebLayer*); 126 virtual void setWebLayer(WebLayer*);
126 127
127 // Printing interface. The plugin can support custom printing 128 // Printing interface. The plugin can support custom printing
(...skipping 19 matching lines...) Expand all
147 // Pass the edit command to the plugin. 148 // Pass the edit command to the plugin.
148 bool executeEditCommand(const WebString& name); 149 bool executeEditCommand(const WebString& name);
149 bool executeEditCommand(const WebString& name, const WebString& value); 150 bool executeEditCommand(const WebString& name, const WebString& value);
150 151
151 // Resource load events for the plugin's source data: 152 // Resource load events for the plugin's source data:
152 void didReceiveResponse(const ResourceResponse&) override; 153 void didReceiveResponse(const ResourceResponse&) override;
153 void didReceiveData(const char *data, int dataLength) override; 154 void didReceiveData(const char *data, int dataLength) override;
154 void didFinishLoading() override; 155 void didFinishLoading() override;
155 void didFailLoading(const ResourceError&) override; 156 void didFailLoading(const ResourceError&) override;
156 157
158 #if !ENABLE(OILPAN)
157 void willDestroyPluginLoadObserver(WebPluginLoadObserver*); 159 void willDestroyPluginLoadObserver(WebPluginLoadObserver*);
160 #endif
158 161
159 DECLARE_VIRTUAL_TRACE(); 162 DECLARE_VIRTUAL_TRACE();
160 void dispose() override; 163 void dispose() override;
161 164
162 #if ENABLE(OILPAN) 165 #if ENABLE(OILPAN)
163 LocalFrame* pluginFrame() const override { return frame(); } 166 LocalFrame* pluginFrame() const override { return frame(); }
164 void shouldDisposePlugin() override; 167 void shouldDisposePlugin() override;
165 #endif 168 #endif
166 169
167 private: 170 private:
(...skipping 23 matching lines...) Expand all
191 IntRect& windowRect, 194 IntRect& windowRect,
192 IntRect& clipRect, 195 IntRect& clipRect,
193 IntRect& unobscuredRect, 196 IntRect& unobscuredRect,
194 Vector<IntRect>& cutOutRects); 197 Vector<IntRect>& cutOutRects);
195 void windowCutOutRects( 198 void windowCutOutRects(
196 const IntRect& frameRect, 199 const IntRect& frameRect,
197 Vector<IntRect>& cutOutRects); 200 Vector<IntRect>& cutOutRects);
198 201
199 RawPtrWillBeMember<HTMLPlugInElement> m_element; 202 RawPtrWillBeMember<HTMLPlugInElement> m_element;
200 WebPlugin* m_webPlugin; 203 WebPlugin* m_webPlugin;
204 #if !ENABLE(OILPAN)
201 Vector<WebPluginLoadObserver*> m_pluginLoadObservers; 205 Vector<WebPluginLoadObserver*> m_pluginLoadObservers;
206 #endif
202 207
203 WebLayer* m_webLayer; 208 WebLayer* m_webLayer;
204 209
205 IntRect m_pendingInvalidationRect; 210 IntRect m_pendingInvalidationRect;
206 211
207 TouchEventRequestType m_touchEventRequestType; 212 TouchEventRequestType m_touchEventRequestType;
208 bool m_wantsWheelEvents; 213 bool m_wantsWheelEvents;
209 214
210 bool m_inDispose; 215 bool m_inDispose;
211 #if ENABLE(OILPAN) 216 #if ENABLE(OILPAN)
212 // Oilpan: if true, the plugin container must dispose 217 // Oilpan: if true, the plugin container must dispose
213 // of its plugin when being finalized. 218 // of its plugin when being finalized.
214 bool m_shouldDisposePlugin; 219 bool m_shouldDisposePlugin;
215 #endif 220 #endif
216 }; 221 };
217 222
218 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai ner(), widget.isPluginContainer()); 223 DEFINE_TYPE_CASTS(WebPluginContainerImpl, Widget, widget, widget->isPluginContai ner(), widget.isPluginContainer());
219 // Unlike Widget, we need not worry about object type for container. 224 // Unlike Widget, we need not worry about object type for container.
220 // WebPluginContainerImpl is the only subclass of WebPluginContainer. 225 // WebPluginContainerImpl is the only subclass of WebPluginContainer.
221 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t rue); 226 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t rue);
222 227
223 } // namespace blink 228 } // namespace blink
224 229
225 #endif 230 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDataSourceImpl.cpp ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698