diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/renderer/render_frame_impl.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index a0e63e3..17df925 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -1719,6 +1719,14 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( scoped_ptr<content::PluginInstanceThrottler> throttler) { DCHECK_EQ(frame_, frame); #if defined(ENABLE_PLUGINS) + if (info.type == WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) { + scoped_ptr<BrowserPluginDelegate> browser_plugin_delegate( + GetContentClient()->renderer()->CreateBrowserPluginDelegate( + this, params.mimeType.utf8(), GURL(params.url))); + return BrowserPluginManager::Get()->CreateBrowserPlugin( + this, browser_plugin_delegate.Pass()); + } + bool pepper_plugin_was_registered = false; scoped_refptr<PluginModule> pepper_module(PluginModule::Create( this, info, &pepper_plugin_was_registered)); @@ -1849,15 +1857,6 @@ blink::WebPlugin* RenderFrameImpl::createPlugin( if (!found) return NULL; - if (info.type == WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) { - scoped_ptr<BrowserPluginDelegate> browser_plugin_delegate( - GetContentClient()->renderer()->CreateBrowserPluginDelegate( - this, mime_type, GURL(params.url))); - return BrowserPluginManager::Get()->CreateBrowserPlugin( - this, browser_plugin_delegate.Pass()); - } - - WebPluginParams params_to_use = params; params_to_use.mimeType = WebString::fromUTF8(mime_type); return CreatePlugin(frame, info, params_to_use, nullptr /* throttler */); |