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

Unified Diff: Source/core/html/HTMLPlugInElement.h

Issue 23618022: BrowserPlugin/WebView - Move plugin lifetime to DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Don't store plugin (widget) pointer in RenderWidget. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLPlugInElement.h
diff --git a/Source/core/html/HTMLPlugInElement.h b/Source/core/html/HTMLPlugInElement.h
index 186314556e8b94f7a261c118a30881c6d33c2e84..dcca5cbcfc7f375bda2d9ad21e6b988801b676b5 100644
--- a/Source/core/html/HTMLPlugInElement.h
+++ b/Source/core/html/HTMLPlugInElement.h
@@ -61,6 +61,12 @@ public:
void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = needsWidgetUpdate; }
virtual void updateWidget(PluginCreationOption) = 0;
+ void createPluginWithoutRenderer(const String& mimeType);
+ // Allows persisted plugins to be registered by their creator. Call this
+ // function with an argument of 0 to clear the persisted plugin.
+ void setPlugin(PassRefPtr<Widget>);
+ PassRefPtr<Widget> plugin();
eseidel 2013/11/18 22:26:45 Normally you don't return PassRefPtr unless the ca
wjmaclean 2013/11/25 17:51:56 Yes ... I think I changed this in response to a co
+
protected:
HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByParser, PreferPlugInsForImagesOption);
@@ -135,6 +141,10 @@ private:
bool m_needsWidgetUpdate;
bool m_shouldPreferPlugInsForImages;
DisplayState m_displayState;
+
+ // Keep track of any plugins that wish to be persisted.
+ RefPtr<Widget> m_plugin;
+ String m_pluginMimeType;
};
DEFINE_NODE_TYPE_CASTS(HTMLPlugInElement, isPluginElement());

Powered by Google App Engine
This is Rietveld 408576698