| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| 11 #include "base/task.h" | 11 #include "base/task.h" |
| 12 #include "net/http/http_byte_range.h" | 12 #include "net/http/http_byte_range.h" |
| 13 #include "net/url_request/url_request_job.h" | 13 #include "net/url_request/url_request_job.h" |
| 14 #include "webkit/blob/blob_data.h" | 14 #include "webkit/blob/blob_data.h" |
| 15 #include "webkit/blob/blob_export.h" |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class MessageLoopProxy; | 18 class MessageLoopProxy; |
| 18 struct PlatformFileInfo; | 19 struct PlatformFileInfo; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace net { | 22 namespace net { |
| 22 class FileStream; | 23 class FileStream; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace webkit_blob { | 26 namespace webkit_blob { |
| 26 | 27 |
| 27 // A request job that handles reading blob URLs. | 28 // A request job that handles reading blob URLs. |
| 28 class BlobURLRequestJob : public net::URLRequestJob { | 29 class BLOB_EXPORT BlobURLRequestJob : public net::URLRequestJob { |
| 29 public: | 30 public: |
| 30 BlobURLRequestJob(net::URLRequest* request, | 31 BlobURLRequestJob(net::URLRequest* request, |
| 31 BlobData* blob_data, | 32 BlobData* blob_data, |
| 32 base::MessageLoopProxy* resolving_message_loop_proxy); | 33 base::MessageLoopProxy* resolving_message_loop_proxy); |
| 33 virtual ~BlobURLRequestJob(); | 34 virtual ~BlobURLRequestJob(); |
| 34 | 35 |
| 35 // net::URLRequestJob methods. | 36 // net::URLRequestJob methods. |
| 36 virtual void Start(); | 37 virtual void Start(); |
| 37 virtual void Kill(); | 38 virtual void Kill(); |
| 38 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); | 39 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 bool byte_range_set_; | 87 bool byte_range_set_; |
| 87 net::HttpByteRange byte_range_; | 88 net::HttpByteRange byte_range_; |
| 88 scoped_ptr<net::HttpResponseInfo> response_info_; | 89 scoped_ptr<net::HttpResponseInfo> response_info_; |
| 89 | 90 |
| 90 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); | 91 DISALLOW_COPY_AND_ASSIGN(BlobURLRequestJob); |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 } // namespace webkit_blob | 94 } // namespace webkit_blob |
| 94 | 95 |
| 95 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ | 96 #endif // WEBKIT_BLOB_BLOB_URL_REQUEST_JOB_H_ |
| OLD | NEW |