| Index: ppapi/proxy/ppp_instance_proxy.cc
|
| diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
|
| index 1da10bea074fdf76ba3793f3d3b87896f8e2f47e..aa4b7e7b8ff7e5c88422b3cc4abb7001498673a9 100644
|
| --- a/ppapi/proxy/ppp_instance_proxy.cc
|
| +++ b/ppapi/proxy/ppp_instance_proxy.cc
|
| @@ -50,7 +50,7 @@ void DidChangeView(PP_Instance instance,
|
| HostDispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
|
| const PPB_Fullscreen_Dev* fullscreen_interface =
|
| static_cast<const PPB_Fullscreen_Dev*>(
|
| - dispatcher->GetLocalInterface(PPB_FULLSCREEN_DEV_INTERFACE));
|
| + dispatcher->local_get_interface()(PPB_FULLSCREEN_DEV_INTERFACE));
|
| DCHECK(fullscreen_interface);
|
| PP_Bool fullscreen = fullscreen_interface->IsFullscreen(instance);
|
| dispatcher->Send(
|
| @@ -73,7 +73,7 @@ PP_Bool HandleDocumentLoad(PP_Instance instance,
|
| // Set up the URLLoader for proxying.
|
|
|
| PPB_URLLoader_Proxy* url_loader_proxy = static_cast<PPB_URLLoader_Proxy*>(
|
| - dispatcher->GetOrCreatePPBInterfaceProxy(INTERFACE_ID_PPB_URL_LOADER));
|
| + dispatcher->GetInterfaceProxy(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 @@ PP_Bool HandleDocumentLoad(PP_Instance instance,
|
| // 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->GetLocalInterface(PPB_CORE_INTERFACE));
|
| + dispatcher->local_get_interface()(PPB_CORE_INTERFACE));
|
| if (!core) {
|
| NOTREACHED();
|
| return PP_FALSE;
|
| @@ -105,16 +105,21 @@ static const PPP_Instance_1_0 instance_interface_1_0 = {
|
| &HandleDocumentLoad
|
| };
|
|
|
| -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));
|
| +InterfaceProxy* CreateInstanceProxy(Dispatcher* dispatcher) {
|
| + return new PPP_Instance_Proxy(dispatcher);
|
| }
|
|
|
| } // 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() {
|
| }
|
|
|
| @@ -125,7 +130,7 @@ const InterfaceProxy::Info* PPP_Instance_Proxy::GetInfo1_0() {
|
| PPP_INSTANCE_INTERFACE_1_0,
|
| INTERFACE_ID_PPP_INSTANCE,
|
| false,
|
| - &CreateInstanceProxy<PPP_Instance_1_0>,
|
| + &CreateInstanceProxy
|
| };
|
| return &info;
|
| }
|
|
|