Index: ppapi/proxy/ppb_url_response_info_proxy.cc |
=================================================================== |
--- ppapi/proxy/ppb_url_response_info_proxy.cc (revision 100753) |
+++ ppapi/proxy/ppb_url_response_info_proxy.cc (working copy) |
@@ -20,6 +20,15 @@ |
namespace ppapi { |
namespace proxy { |
+namespace { |
+ |
+InterfaceProxy* CreateURLResponseInfoProxy(Dispatcher* dispatcher, |
+ const void* target_interface) { |
+ return new PPB_URLResponseInfo_Proxy(dispatcher, target_interface); |
+} |
+ |
+} // namespace |
+ |
// URLResponseInfo ------------------------------------------------------------- |
class URLResponseInfo : public Resource, public PPB_URLResponseInfo_API { |
@@ -71,14 +80,28 @@ |
// PPB_URLResponseInfo_Proxy --------------------------------------------------- |
-PPB_URLResponseInfo_Proxy::PPB_URLResponseInfo_Proxy(Dispatcher* dispatcher) |
- : InterfaceProxy(dispatcher) { |
+PPB_URLResponseInfo_Proxy::PPB_URLResponseInfo_Proxy( |
+ Dispatcher* dispatcher, |
+ const void* target_interface) |
+ : InterfaceProxy(dispatcher, target_interface) { |
} |
PPB_URLResponseInfo_Proxy::~PPB_URLResponseInfo_Proxy() { |
} |
// static |
+const InterfaceProxy::Info* PPB_URLResponseInfo_Proxy::GetInfo() { |
+ static const Info info = { |
+ ppapi::thunk::GetPPB_URLResponseInfo_Thunk(), |
+ PPB_URLRESPONSEINFO_INTERFACE, |
+ INTERFACE_ID_PPB_URL_RESPONSE_INFO, |
+ false, |
+ &CreateURLResponseInfoProxy, |
+ }; |
+ return &info; |
+} |
+ |
+// static |
PP_Resource PPB_URLResponseInfo_Proxy::CreateResponseForResource( |
const HostResource& resource) { |
return (new URLResponseInfo(resource))->GetReference(); |
@@ -119,8 +142,10 @@ |
file_ref = enter.object()->GetBodyAsFileRef(); |
// Use the FileRef proxy to serialize. |
+ DCHECK(!dispatcher()->IsPlugin()); |
+ HostDispatcher* host_disp = static_cast<HostDispatcher*>(dispatcher()); |
PPB_FileRef_Proxy* file_ref_proxy = static_cast<PPB_FileRef_Proxy*>( |
- dispatcher()->GetInterfaceProxy(INTERFACE_ID_PPB_FILE_REF)); |
+ host_disp->GetOrCreatePPBInterfaceProxy(INTERFACE_ID_PPB_FILE_REF)); |
file_ref_proxy->SerializeFileRef(file_ref, result); |
} |