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

Unified Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 23618022: BrowserPlugin/WebView - Move plugin lifetime to DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Cleaned up. Created 7 years, 2 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/FrameLoaderClientImpl.cpp
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
index 9e57f85104b15aa3012c09a5af51ea9f12e5c220..80e8be16e1468065d14a8d6196a32664b2d4ca5a 100644
--- a/Source/web/FrameLoaderClientImpl.cpp
+++ b/Source/web/FrameLoaderClientImpl.cpp
@@ -585,6 +585,14 @@ PassRefPtr<Frame> FrameLoaderClientImpl::createFrame(
return m_webFrame->createChildFrame(frameRequest, ownerElement);
}
+bool FrameLoaderClientImpl::canCreatePluginWithoutRenderer(const String& mimeType) const
+{
+ if (!m_webFrame->client())
+ return false;
+
+ return m_webFrame->client()->canCreatePluginWithoutRenderer(mimeType);
+}
+
PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
const IntSize& size, // FIXME: how do we use this?
HTMLPlugInElement* element,
@@ -592,7 +600,8 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
const Vector<String>& paramNames,
const Vector<String>& paramValues,
const String& mimeType,
- bool loadManually)
+ bool loadManually,
+ bool loadWithoutRenderer)
{
if (!m_webFrame->client())
return 0;
@@ -616,7 +625,7 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
return 0;
// The element might have been removed during plugin initialization!
- if (!element->renderer())
+ if (!element->renderer() && !loadWithoutRenderer)
return 0;
return container;

Powered by Google App Engine
This is Rietveld 408576698