OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/browser/loader/resource_handler.h" | 10 #include "content/browser/loader/resource_handler.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 virtual bool OnReadCompleted(int request_id, | 56 virtual bool OnReadCompleted(int request_id, |
57 int bytes_read, | 57 int bytes_read, |
58 bool* defer) OVERRIDE; | 58 bool* defer) OVERRIDE; |
59 | 59 |
60 virtual bool OnResponseCompleted(int request_id, | 60 virtual bool OnResponseCompleted(int request_id, |
61 const net::URLRequestStatus& status, | 61 const net::URLRequestStatus& status, |
62 const std::string& sec_info) OVERRIDE; | 62 const std::string& sec_info) OVERRIDE; |
63 | 63 |
64 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) OVERRIDE; | 64 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) OVERRIDE; |
65 | 65 |
66 Stream* stream() { return stream_; } | 66 Stream* stream() { return stream_.get(); } |
67 | 67 |
68 private: | 68 private: |
69 virtual void OnSpaceAvailable(Stream* stream) OVERRIDE; | 69 virtual void OnSpaceAvailable(Stream* stream) OVERRIDE; |
70 virtual void OnClose(Stream* stream) OVERRIDE; | 70 virtual void OnClose(Stream* stream) OVERRIDE; |
71 | 71 |
72 net::URLRequest* request_; | 72 net::URLRequest* request_; |
73 scoped_refptr<Stream> stream_; | 73 scoped_refptr<Stream> stream_; |
74 scoped_refptr<net::IOBuffer> read_buffer_; | 74 scoped_refptr<net::IOBuffer> read_buffer_; |
75 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler); | 75 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace content | 78 } // namespace content |
79 | 79 |
80 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 80 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
81 | 81 |
OLD | NEW |