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

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: Handle shared-renderer case. Created 6 years, 9 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
« no previous file with comments | « Source/core/html/HTMLObjectElement.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLPlugInElement.h
diff --git a/Source/core/html/HTMLPlugInElement.h b/Source/core/html/HTMLPlugInElement.h
index 3bfed4f613d6dd3909e42971b0d05eccb98321f3..a2c94c290b20d4cbf0368fd044fcd79e37c8f927 100644
--- a/Source/core/html/HTMLPlugInElement.h
+++ b/Source/core/html/HTMLPlugInElement.h
@@ -56,6 +56,9 @@ public:
void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = needsWidgetUpdate; }
void updateWidget();
+ void requestPluginCreationWithoutRendererIfPossible();
+ void createPluginWithoutRenderer();
+
protected:
HTMLPlugInElement(const QualifiedName& tagName, Document&, bool createdByParser, PreferPlugInsForImagesOption);
@@ -124,7 +127,7 @@ private:
DisplayState displayState() const { return m_displayState; }
void setDisplayState(DisplayState state) { m_displayState = state; }
const String loadedMimeType() const;
- bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
+ bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback, bool requireRenderer);
bool pluginIsLoadable(const KURL&, const String& mimeType);
bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType);
@@ -134,6 +137,13 @@ private:
bool m_needsWidgetUpdate;
bool m_shouldPreferPlugInsForImages;
DisplayState m_displayState;
+
+ // Normally the Widget is stored in HTMLFrameOwnerElement::m_widget.
+ // However, plugins can persist even when not rendered. In order to
+ // prevent confusing code which may assume that widget() != null
+ // means the frame is active, we save off m_widget here while
+ // the plugin is persisting but not being displayed.
+ RefPtr<Widget> m_persistedPluginWidget;
};
inline bool isHTMLPlugInElement(const Element& element)
« no previous file with comments | « Source/core/html/HTMLObjectElement.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698