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

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

Issue 357443005: Oilpan: make shutdown of plugin container objects work better. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Conditionally define detach() Created 6 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 namespace WebCore { 45 namespace WebCore {
46 class GestureEvent; 46 class GestureEvent;
47 class HTMLPlugInElement; 47 class HTMLPlugInElement;
48 class IntRect; 48 class IntRect;
49 class KeyboardEvent; 49 class KeyboardEvent;
50 class MouseEvent; 50 class MouseEvent;
51 class PlatformGestureEvent; 51 class PlatformGestureEvent;
52 class ResourceError; 52 class ResourceError;
53 class ResourceResponse; 53 class ResourceResponse;
54 #if ENABLE(OILPAN)
55 class ScriptController;
56 #endif
54 class TouchEvent; 57 class TouchEvent;
55 class WheelEvent; 58 class WheelEvent;
56 class Widget; 59 class Widget;
57 } 60 }
58 61
59 namespace blink { 62 namespace blink {
60 63
61 struct WebPrintParams; 64 struct WebPrintParams;
62 65
63 class ScrollbarGroup; 66 class ScrollbarGroup;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 158
156 void willDestroyPluginLoadObserver(WebPluginLoadObserver*); 159 void willDestroyPluginLoadObserver(WebPluginLoadObserver*);
157 160
158 ScrollbarGroup* scrollbarGroup(); 161 ScrollbarGroup* scrollbarGroup();
159 162
160 void willStartLiveResize(); 163 void willStartLiveResize();
161 void willEndLiveResize(); 164 void willEndLiveResize();
162 165
163 bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRe ct&, const WebCore::IntRect&, const WebCore::IntRect&); 166 bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRe ct&, const WebCore::IntRect&, const WebCore::IntRect&);
164 167
168 #if ENABLE(OILPAN)
169 virtual void detach() OVERRIDE;
170 virtual void setScriptController(WebCore::ScriptController*) OVERRIDE;
171 #endif
172
165 private: 173 private:
166 WebPluginContainerImpl(WebCore::HTMLPlugInElement* element, WebPlugin* webPl ugin); 174 WebPluginContainerImpl(WebCore::HTMLPlugInElement* element, WebPlugin* webPl ugin);
167 virtual ~WebPluginContainerImpl(); 175 virtual ~WebPluginContainerImpl();
168 176
169 void handleMouseEvent(WebCore::MouseEvent*); 177 void handleMouseEvent(WebCore::MouseEvent*);
170 void handleDragEvent(WebCore::MouseEvent*); 178 void handleDragEvent(WebCore::MouseEvent*);
171 void handleWheelEvent(WebCore::WheelEvent*); 179 void handleWheelEvent(WebCore::WheelEvent*);
172 void handleKeyboardEvent(WebCore::KeyboardEvent*); 180 void handleKeyboardEvent(WebCore::KeyboardEvent*);
173 void handleTouchEvent(WebCore::TouchEvent*); 181 void handleTouchEvent(WebCore::TouchEvent*);
174 void handleGestureEvent(WebCore::GestureEvent*); 182 void handleGestureEvent(WebCore::GestureEvent*);
175 183
176 void synthesizeMouseEventIfPossible(WebCore::TouchEvent*); 184 void synthesizeMouseEventIfPossible(WebCore::TouchEvent*);
177 185
178 void focusPlugin(); 186 void focusPlugin();
179 187
180 void calculateGeometry(const WebCore::IntRect& frameRect, 188 void calculateGeometry(const WebCore::IntRect& frameRect,
181 WebCore::IntRect& windowRect, 189 WebCore::IntRect& windowRect,
182 WebCore::IntRect& clipRect, 190 WebCore::IntRect& clipRect,
183 Vector<WebCore::IntRect>& cutOutRects); 191 Vector<WebCore::IntRect>& cutOutRects);
184 WebCore::IntRect windowClipRect() const; 192 WebCore::IntRect windowClipRect() const;
185 void windowCutOutRects(const WebCore::IntRect& frameRect, 193 void windowCutOutRects(const WebCore::IntRect& frameRect,
186 Vector<WebCore::IntRect>& cutOutRects); 194 Vector<WebCore::IntRect>& cutOutRects);
187 195
196 // FIXME: Oilpan: consider moving Widget to the heap and turn this
197 // into a traced member. For the time being, it is a bare pointer
198 // of its owning PlugInElement and managed as such.
188 WebCore::HTMLPlugInElement* m_element; 199 WebCore::HTMLPlugInElement* m_element;
189 WebPlugin* m_webPlugin; 200 WebPlugin* m_webPlugin;
190 Vector<WebPluginLoadObserver*> m_pluginLoadObservers; 201 Vector<WebPluginLoadObserver*> m_pluginLoadObservers;
191 202
203 #if ENABLE(OILPAN)
204 // Keep a direct reference to the object we've registered with.
205 // Needed for reliable finalization.
206 WebCore::ScriptController* m_scriptController;
207 #endif
208
192 WebLayer* m_webLayer; 209 WebLayer* m_webLayer;
193 210
194 // The associated scrollbar group object, created lazily. Used for Pepper 211 // The associated scrollbar group object, created lazily. Used for Pepper
195 // scrollbars. 212 // scrollbars.
196 OwnPtr<ScrollbarGroup> m_scrollbarGroup; 213 OwnPtr<ScrollbarGroup> m_scrollbarGroup;
197 214
198 TouchEventRequestType m_touchEventRequestType; 215 TouchEventRequestType m_touchEventRequestType;
199 bool m_wantsWheelEvents; 216 bool m_wantsWheelEvents;
200 }; 217 };
201 218
202 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebCore::Widget, widget, widget->isPlu ginContainer(), widget.isPluginContainer()); 219 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebCore::Widget, widget, widget->isPlu ginContainer(), widget.isPluginContainer());
203 // Unlike Widget, we need not worry about object type for container. 220 // Unlike Widget, we need not worry about object type for container.
204 // WebPluginContainerImpl is the only subclass of WebPluginContainer. 221 // WebPluginContainerImpl is the only subclass of WebPluginContainer.
205 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t rue); 222 DEFINE_TYPE_CASTS(WebPluginContainerImpl, WebPluginContainer, container, true, t rue);
206 223
207 } // namespace blink 224 } // namespace blink
208 225
209 #endif 226 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698