summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_url_request_job.h
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 03:59:04 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 03:59:04 +0000
commit80f584d94f57afdfddeba1fa7384ed409cd91273 (patch)
treed6e51ebde489e245e98e56ca061c0dce78895d63 /webkit/appcache/appcache_url_request_job.h
parent204e936d3b0455b0c55f2dc5713f8a84b55e0cbf (diff)
downloadchromium_src-80f584d94f57afdfddeba1fa7384ed409cd91273.zip
chromium_src-80f584d94f57afdfddeba1fa7384ed409cd91273.tar.gz
chromium_src-80f584d94f57afdfddeba1fa7384ed409cd91273.tar.bz2
Support for playing back media from the appcache.
* add the appcache_host_id to resource requests * support for byte-range requests TEST=manual BUG=none Review URL: http://codereview.chromium.org/550040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36727 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_url_request_job.h')
-rw-r--r--webkit/appcache/appcache_url_request_job.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/webkit/appcache/appcache_url_request_job.h b/webkit/appcache/appcache_url_request_job.h
index fe87361..dab6f22 100644
--- a/webkit/appcache/appcache_url_request_job.h
+++ b/webkit/appcache/appcache_url_request_job.h
@@ -7,6 +7,7 @@
#include <string>
+#include "net/http/http_byte_range.h"
#include "net/url_request/url_request_job.h"
#include "webkit/appcache/appcache_entry.h"
#include "webkit/appcache/appcache_response.h"
@@ -91,9 +92,9 @@ class AppCacheURLRequestJob : public URLRequestJob,
virtual void OnResponseInfoLoaded(
AppCacheResponseInfo* response_info, int64 response_id);
- const net::HttpResponseInfo* http_info() const {
- return info_.get() ? info_->http_response_info() : NULL;
- }
+ const net::HttpResponseInfo* http_info() const;
+ bool is_range_request() const { return range_requested_.IsValid(); }
+ void SetupRangeResponse();
// AppCacheResponseReader completion callback
void OnReadComplete(int result);
@@ -106,8 +107,8 @@ class AppCacheURLRequestJob : public URLRequestJob,
virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
// Sets extra request headers for Job types that support request headers.
- // TODO(michaeln): support for range-requests
- virtual void SetExtraRequestHeaders(const std::string& headers) {}
+ // This is how we get informed of range-requests.
+ virtual void SetExtraRequestHeaders(const std::string& headers);
// TODO(michaeln): does this apply to our cached responses?
// The payload we store should have been fully decoded prior to
@@ -131,6 +132,8 @@ class AppCacheURLRequestJob : public URLRequestJob,
int64 cache_id_;
AppCacheEntry entry_;
scoped_refptr<AppCacheResponseInfo> info_;
+ net::HttpByteRange range_requested_;
+ scoped_ptr<net::HttpResponseInfo> range_response_info_;
scoped_ptr<AppCacheResponseReader> reader_;
net::CompletionCallbackImpl<AppCacheURLRequestJob> read_callback_;
};