diff options
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 0c93047..509c066 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -833,12 +833,12 @@ WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, &info, &setting, &mime_type)); if (!found || !info.enabled) return NULL; - scoped_refptr<pepper::PluginModule> pepper_module( - pepper_delegate_.CreatePepperPlugin(info.path)); + PepperPluginRegistry::GetInstance()->GetModule(info.path)); if (pepper_module) return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); - return CreateNPAPIPlugin(frame, params, info.path, mime_type); + else + return CreateNPAPIPlugin(frame, params, info.path, mime_type); } void RenderView::RegisterPluginDelegate(WebPluginDelegateProxy* delegate) { @@ -2743,10 +2743,21 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame, if (info.path.value() == kDefaultPluginLibraryName || plugin_setting == CONTENT_SETTING_ALLOW || host_setting == CONTENT_SETTING_ALLOW) { - scoped_refptr<pepper::PluginModule> pepper_module( - pepper_delegate_.CreatePepperPlugin(info.path)); - if (pepper_module) - return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); + scoped_refptr<pepper::PluginModule> pepper_module; + if (PepperPluginRegistry::GetInstance()->RunOutOfProcessForPlugin( + info.path)) { + pepper_module = + pepper_delegate_.CreateOutOfProcessPepperPlugin(info.path); + } else { + pepper_module = + PepperPluginRegistry::GetInstance()->GetModule(info.path); + } + if (pepper_module) { + return CreatePepperPlugin(frame, + params, + info.path, + pepper_module.get()); + } return CreateNPAPIPlugin(frame, params, info.path, actual_mime_type); } std::string resource; |