| OLD | NEW |
| 1 // Copyright (c) 20010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 20010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 5 #ifndef WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| 6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 6 #define WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include "base/platform_file.h" | 8 #include "base/platform_file.h" |
| 9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
| 10 #include "base/scoped_callback_factory.h" | 10 #include "base/scoped_callback_factory.h" |
| 11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "net/base/completion_callback.h" | 12 #include "net/base/completion_callback.h" |
| 13 #include "net/base/file_stream.h" | 13 #include "net/base/file_stream.h" |
| 14 #include "net/http/http_byte_range.h" | 14 #include "net/http/http_byte_range.h" |
| 15 #include "net/url_request/url_request_job.h" | 15 #include "net/url_request/url_request_job.h" |
| 16 #include "webkit/blob/blob_data.h" | 16 #include "webkit/blob/blob_data.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class MessageLoopProxy; | 19 class MessageLoopProxy; |
| 20 struct PlatformFileInfo; | 20 struct PlatformFileInfo; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace webkit_blob { | 23 namespace webkit_blob { |
| 24 | 24 |
| 25 // A request job that handles reading blob URLs. | 25 // A request job that handles reading blob URLs. |
| 26 class BlobURLRequestJob : public URLRequestJob { | 26 class BlobURLRequestJob : public net::URLRequestJob { |
| 27 public: | 27 public: |
| 28 BlobURLRequestJob(URLRequest* request, | 28 BlobURLRequestJob(net::URLRequest* request, |
| 29 BlobData* blob_data, | 29 BlobData* blob_data, |
| 30 base::MessageLoopProxy* resolving_message_loop_proxy); | 30 base::MessageLoopProxy* resolving_message_loop_proxy); |
| 31 virtual ~BlobURLRequestJob(); | 31 virtual ~BlobURLRequestJob(); |
| 32 | 32 |
| 33 // URLRequestJob methods. | 33 // URLRequestJob methods. |
| 34 virtual void Start(); | 34 virtual void Start(); |
| 35 virtual void Kill(); | 35 virtual void Kill(); |
| 36 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); | 36 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); |
| 37 virtual bool GetMimeType(std::string* mime_type) const; | 37 virtual bool GetMimeType(std::string* mime_type) const; |
| 38 virtual void GetResponseInfo(net::HttpResponseInfo* info); | 38 virtual void GetResponseInfo(net::HttpResponseInfo* info); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 bool byte_range_set_; | 78 bool byte_range_set_; |
| 79 net::HttpByteRange byte_range_; | 79 net::HttpByteRange byte_range_; |
| 80 scoped_ptr<net::HttpResponseInfo> response_info_; | 80 scoped_ptr<net::HttpResponseInfo> response_info_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); | 82 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace webkit_blob | 85 } // namespace webkit_blob |
| 86 | 86 |
| 87 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 87 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| OLD | NEW |