| Index: ppapi/proxy/ppp_instance_proxy.cc
|
| ===================================================================
|
| --- ppapi/proxy/ppp_instance_proxy.cc (revision 100753)
|
| +++ ppapi/proxy/ppp_instance_proxy.cc (working copy)
|
| @@ -50,7 +50,7 @@
|
| HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| const PPB_Fullscreen_Dev* fullscreen_interface =
|
| static_cast<const PPB_Fullscreen_Dev*>(
|
| - dispatcher->local_get_interface()(PPB_FULLSCREEN_DEV_INTERFACE));
|
| + dispatcher->GetLocalInterface(PPB_FULLSCREEN_DEV_INTERFACE));
|
| DCHECK(fullscreen_interface);
|
| PP_Bool fullscreen = fullscreen_interface->IsFullscreen(instance);
|
| dispatcher->Send(
|
| @@ -73,7 +73,7 @@
|
| // Set up the URLLoader for proxying.
|
|
|
| PPB_URLLoader_Proxy* url_loader_proxy = static_cast<PPB_URLLoader_Proxy*>(
|
| - dispatcher->GetInterfaceProxy(INTERFACE_ID_PPB_URL_LOADER));
|
| + dispatcher->GetOrCreatePPBInterfaceProxy(INTERFACE_ID_PPB_URL_LOADER));
|
| url_loader_proxy->PrepareURLLoaderForSendingToPlugin(url_loader);
|
|
|
| // PluginResourceTracker in the plugin process assumes that resources that it
|
| @@ -83,7 +83,7 @@
|
| // Please also see comments in PPP_Instance_Proxy::OnMsgHandleDocumentLoad()
|
| // about releasing of this extra reference.
|
| const PPB_Core* core = reinterpret_cast<const PPB_Core*>(
|
| - dispatcher->local_get_interface()(PPB_CORE_INTERFACE));
|
| + dispatcher->GetLocalInterface(PPB_CORE_INTERFACE));
|
| if (!core) {
|
| NOTREACHED();
|
| return PP_FALSE;
|
| @@ -105,21 +105,16 @@
|
| &HandleDocumentLoad
|
| };
|
|
|
| -InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher) {
|
| - return new PPP_Instance_Proxy(dispatcher);
|
| +template <class PPP_Instance_Type>
|
| +InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher,
|
| + const void* target_interface) {
|
| + return new PPP_Instance_Proxy(
|
| + dispatcher,
|
| + static_cast<const PPP_Instance_Type*>(target_interface));
|
| }
|
|
|
| } // namespace
|
|
|
| -PPP_Instance_Proxy::PPP_Instance_Proxy(Dispatcher* dispatcher)
|
| - : InterfaceProxy(dispatcher) {
|
| - if (dispatcher->IsPlugin()) {
|
| - combined_interface_.reset(
|
| - new PPP_Instance_Combined(*static_cast<const PPP_Instance_1_0*>(
|
| - dispatcher->local_get_interface()(PPP_INSTANCE_INTERFACE_1_0))));
|
| - }
|
| -}
|
| -
|
| PPP_Instance_Proxy::~PPP_Instance_Proxy() {
|
| }
|
|
|
| @@ -130,7 +125,7 @@
|
| PPP_INSTANCE_INTERFACE_1_0,
|
| INTERFACE_ID_PPP_INSTANCE,
|
| false,
|
| - &CreateInstanceProxy
|
| + &CreateInstanceProxy<PPP_Instance_1_0>,
|
| };
|
| return &info;
|
| }
|
|
|