diff options
Diffstat (limited to 'webkit/plugins/ppapi/ppb_url_loader_impl.h')
-rw-r--r-- | webkit/plugins/ppapi/ppb_url_loader_impl.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/webkit/plugins/ppapi/ppb_url_loader_impl.h b/webkit/plugins/ppapi/ppb_url_loader_impl.h index 20f4f19..aa1acfd 100644 --- a/webkit/plugins/ppapi/ppb_url_loader_impl.h +++ b/webkit/plugins/ppapi/ppb_url_loader_impl.h @@ -12,6 +12,7 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/trusted/ppb_url_loader_trusted.h" #include "ppapi/shared_impl/resource.h" +#include "ppapi/shared_impl/scoped_pp_resource.h" #include "ppapi/shared_impl/tracked_callback.h" #include "ppapi/shared_impl/url_request_info_data.h" #include "ppapi/thunk/ppb_url_loader_api.h" @@ -25,8 +26,6 @@ class WebURL; namespace webkit { namespace ppapi { -class PPB_URLResponseInfo_Impl; - class PPB_URLLoader_Impl : public ::ppapi::Resource, public ::ppapi::thunk::PPB_URLLoader_API, public WebKit::WebURLLoaderClient { @@ -64,6 +63,8 @@ class PPB_URLLoader_Impl : public ::ppapi::Resource, virtual void GrantUniversalAccess() OVERRIDE; virtual void SetStatusCallback( PP_URLLoaderTrusted_StatusCallback cb) OVERRIDE; + virtual bool GetResponseInfoData( + ::ppapi::URLResponseInfoData* data) OVERRIDE; // WebKit::WebURLLoaderClient implementation. virtual void willSendRequest(WebKit::WebURLLoader* loader, @@ -86,8 +87,6 @@ class PPB_URLLoader_Impl : public ::ppapi::Resource, virtual void didFail(WebKit::WebURLLoader* loader, const WebKit::WebURLError& error); - PPB_URLResponseInfo_Impl* response_info() const { return response_info_; } - // Returns the number of bytes currently available for synchronous reading // in the loader. int32_t buffer_size() const { return buffer_.size(); } @@ -146,7 +145,6 @@ class PPB_URLLoader_Impl : public ::ppapi::Resource, // load, etc. since there is no loader. scoped_ptr<WebKit::WebURLLoader> loader_; - scoped_refptr<PPB_URLResponseInfo_Impl> response_info_; scoped_refptr< ::ppapi::TrackedCallback> pending_callback_; std::deque<char> buffer_; int64_t bytes_sent_; @@ -163,6 +161,12 @@ class PPB_URLLoader_Impl : public ::ppapi::Resource, PP_URLLoaderTrusted_StatusCallback status_callback_; + // When the response info is received, this stores the data. The + // ScopedResource maintains the reference to the file ref (if any) in the + // data object so we don't forget to dereference it. + scoped_ptr< ::ppapi::URLResponseInfoData > response_info_; + ::ppapi::ScopedPPResource response_info_file_ref_; + DISALLOW_COPY_AND_ASSIGN(PPB_URLLoader_Impl); }; |