| Index: webkit/plugins/ppapi/plugin_module.cc
|
| diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
|
| index 70989bd938252be0e036014932154f20e17b280c..09970026da2285bc62367f2cb73ce7a3d94d4106 100644
|
| --- a/webkit/plugins/ppapi/plugin_module.cc
|
| +++ b/webkit/plugins/ppapi/plugin_module.cc
|
| @@ -493,6 +493,21 @@ void PluginModule::InitAsProxied(
|
| out_of_process_proxy_.reset(out_of_process_proxy);
|
| }
|
|
|
| +void PluginModule::InitAsProxiedNaCl(
|
| + PluginDelegate::OutOfProcessProxy* out_of_process_proxy,
|
| + PP_Instance instance) {
|
| + InitAsProxied(out_of_process_proxy);
|
| + out_of_process_proxy_->AddInstance(instance);
|
| +
|
| + // In NaCl, we need to tell the instance to reset itself as proxied. This will
|
| + // clear cached interface pointers and send DidCreate (etc) to the plugin
|
| + // side of the proxy.
|
| + PluginInstance* plugin_instance = host_globals->GetInstance(instance);
|
| + if (!plugin_instance)
|
| + return;
|
| + plugin_instance->ResetAsProxied();
|
| +}
|
| +
|
| // static
|
| const PPB_Core* PluginModule::GetCore() {
|
| return &core_interface;
|
| @@ -504,13 +519,7 @@ PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() {
|
| }
|
|
|
| PluginInstance* PluginModule::CreateInstance(PluginDelegate* delegate) {
|
| - PluginInstance* instance(NULL);
|
| - const void* ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_1_1);
|
| - if (ppp_instance) {
|
| - instance = PluginInstance::Create1_1(delegate, this, ppp_instance);
|
| - } else if ((ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_1_0))) {
|
| - instance = PluginInstance::Create1_0(delegate, this, ppp_instance);
|
| - }
|
| + PluginInstance* instance = PluginInstance::Create(delegate, this);
|
|
|
| if (!instance) {
|
| LOG(WARNING) << "Plugin doesn't support instance interface, failing.";
|
|
|