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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: Source/web/WebPluginContainerImpl.h
diff --git a/Source/web/WebPluginContainerImpl.h b/Source/web/WebPluginContainerImpl.h
index 46728ee49c15c26f3ee90f5d85531522531f6e4b..d5dfe214ee92082dc0d8f6e0cb19eca2863a92ed 100644
--- a/Source/web/WebPluginContainerImpl.h
+++ b/Source/web/WebPluginContainerImpl.h
@@ -51,6 +51,9 @@ class MouseEvent;
class PlatformGestureEvent;
class ResourceError;
class ResourceResponse;
+#if ENABLE(OILPAN)
+class ScriptController;
+#endif
class TouchEvent;
class WheelEvent;
class Widget;
@@ -162,6 +165,11 @@ public:
bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
+#if ENABLE(OILPAN)
+ virtual void detach() OVERRIDE;
+ virtual void setScriptController(WebCore::ScriptController*) OVERRIDE;
+#endif
+
private:
WebPluginContainerImpl(WebCore::HTMLPlugInElement* element, WebPlugin* webPlugin);
virtual ~WebPluginContainerImpl();
@@ -185,10 +193,19 @@ private:
void windowCutOutRects(const WebCore::IntRect& frameRect,
Vector<WebCore::IntRect>& cutOutRects);
+ // FIXME: Oilpan: consider moving Widget to the heap and turn this
+ // into a traced member. For the time being, it is a bare pointer
+ // of its owning PlugInElement and managed as such.
WebCore::HTMLPlugInElement* m_element;
WebPlugin* m_webPlugin;
Vector<WebPluginLoadObserver*> m_pluginLoadObservers;
+#if ENABLE(OILPAN)
+ // Keep a direct reference to the object we've registered with.
+ // Needed for reliable finalization.
+ WebCore::ScriptController* m_scriptController;
+#endif
+
WebLayer* m_webLayer;
// The associated scrollbar group object, created lazily. Used for Pepper

Powered by Google App Engine
This is Rietveld 408576698