| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index 3e59c4a9b643091fd8e35480b4daf5dfc1b9df4f..9e2dd0f16984df05bd60f077de06ee9ac24ad64d 100644
|
| --- a/content/renderer/render_view_impl.cc
|
| +++ b/content/renderer/render_view_impl.cc
|
| @@ -73,6 +73,7 @@
|
| #include "content/renderer/notification_provider.h"
|
| #include "content/renderer/p2p/socket_dispatcher.h"
|
| #include "content/renderer/plugin_channel_host.h"
|
| +#include "content/renderer/browser_plugin/browser_plugin_placeholder.h"
|
| #include "content/renderer/render_process.h"
|
| #include "content/renderer/render_thread_impl.h"
|
| #include "content/renderer/render_widget_fullscreen_pepper.h"
|
| @@ -166,6 +167,7 @@
|
| #include "webkit/plugins/npapi/webplugin_delegate.h"
|
| #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
|
| #include "webkit/plugins/npapi/webplugin_impl.h"
|
| +#include "webkit/plugins/plugin_constants.h"
|
| #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
|
|
|
| #if defined(OS_WIN)
|
| @@ -2063,6 +2065,15 @@ bool RenderViewImpl::isPointerLocked() {
|
|
|
| WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame,
|
| const WebPluginParams& params) {
|
| + // The browser plugin is a special kind of pepper plugin
|
| + // that loads asynchronously. We first create a placeholder here.
|
| + // When a guest is ready to be displayed, we swap out the placeholder
|
| + // with the guest.
|
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| + if (command_line.HasSwitch(switches::kEnableBrowserPlugin) &&
|
| + UTF16ToASCII(params.mimeType) == kBrowserPluginMimeType)
|
| + return BrowserPluginPlaceholder::Create(this, frame, params);
|
| +
|
| WebPlugin* plugin = NULL;
|
| if (content::GetContentClient()->renderer()->OverrideCreatePlugin(
|
| this, frame, params, &plugin)) {
|
|
|