diff options
Diffstat (limited to 'ppapi/proxy/ppb_url_loader_proxy.h')
-rw-r--r-- | ppapi/proxy/ppb_url_loader_proxy.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ppapi/proxy/ppb_url_loader_proxy.h b/ppapi/proxy/ppb_url_loader_proxy.h index c05926a..49f49ea 100644 --- a/ppapi/proxy/ppb_url_loader_proxy.h +++ b/ppapi/proxy/ppb_url_loader_proxy.h @@ -12,6 +12,7 @@ #include "ppapi/c/pp_size.h" #include "ppapi/c/pp_var.h" #include "ppapi/cpp/completion_callback.h" +#include "ppapi/proxy/host_resource.h" #include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" @@ -21,6 +22,8 @@ struct PPB_URLLoaderTrusted; namespace pp { namespace proxy { +struct PPBURLLoader_UpdateProgress_Params; + class PPB_URLLoader_Proxy : public InterfaceProxy { public: PPB_URLLoader_Proxy(Dispatcher* dispatcher, const void* target_interface); @@ -30,8 +33,8 @@ class PPB_URLLoader_Proxy : public InterfaceProxy { // they are also provided to PPP_Instance.OnMsgHandleDocumentLoad. This // function allows the proxy for DocumentLoad to create the correct plugin // proxied info for the given browser-supplied URLLoader resource ID. - static void TrackPluginResource(PP_Instance instance, - PP_Resource url_loader_resource); + static PP_Resource TrackPluginResource( + const HostResource& url_loader_resource); const PPB_URLLoader* ppb_url_loader_target() const { return reinterpret_cast<const PPB_URLLoader*>(target_interface()); @@ -48,27 +51,24 @@ class PPB_URLLoader_Proxy : public InterfaceProxy { // Plugin->renderer message handlers. void OnMsgCreate(PP_Instance instance, - PP_Resource* result); - void OnMsgOpen(PP_Resource loader, - PP_Resource request_info, + HostResource* result); + void OnMsgOpen(const HostResource& loader, + const HostResource& request_info, uint32_t serialized_callback); - void OnMsgFollowRedirect(PP_Resource loader, + void OnMsgFollowRedirect(const HostResource& loader, uint32_t serialized_callback); - void OnMsgGetResponseInfo(PP_Resource loader, - PP_Resource* result); - void OnMsgReadResponseBody(PP_Resource loader, + void OnMsgGetResponseInfo(const HostResource& loader, + HostResource* result); + void OnMsgReadResponseBody(const HostResource& loader, int32_t bytes_to_read); - void OnMsgFinishStreamingToFile(PP_Resource loader, + void OnMsgFinishStreamingToFile(const HostResource& loader, uint32_t serialized_callback); - void OnMsgClose(PP_Resource loader); + void OnMsgClose(const HostResource& loader); // Renderer->plugin message handlers. - void OnMsgUpdateProgress(PP_Resource resource, - int64_t bytes_sent, - int64_t total_bytes_to_be_sent, - int64_t bytes_received, - int64_t total_bytes_to_be_received); - void OnMsgReadResponseBodyAck(PP_Resource pp_resource, + void OnMsgUpdateProgress( + const PPBURLLoader_UpdateProgress_Params& params); + void OnMsgReadResponseBodyAck(const HostResource& pp_resource, int32_t result, const std::string& data); @@ -97,7 +97,7 @@ class PPB_URLLoaderTrusted_Proxy : public InterfaceProxy { private: // Plugin->renderer message handlers. - void OnMsgGrantUniversalAccess(PP_Resource loader); + void OnMsgGrantUniversalAccess(const HostResource& loader); }; } // namespace proxy |