OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BUFFERED_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "content/browser/loader/layered_resource_handler.h" | 12 #include "content/browser/loader/layered_resource_handler.h" |
| 13 #include "content/common/content_export.h" |
13 #include "content/public/browser/resource_controller.h" | 14 #include "content/public/browser/resource_controller.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 class URLRequest; | 17 class URLRequest; |
17 } | 18 } |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 class ResourceDispatcherHostImpl; | 21 class ResourceDispatcherHostImpl; |
21 struct WebPluginInfo; | 22 struct WebPluginInfo; |
22 | 23 |
23 // Used to buffer a request until enough data has been received. | 24 // Used to buffer a request until enough data has been received. |
24 class BufferedResourceHandler | 25 class CONTENT_EXPORT BufferedResourceHandler |
25 : public LayeredResourceHandler, | 26 : public LayeredResourceHandler, |
26 public ResourceController { | 27 public ResourceController { |
27 public: | 28 public: |
28 BufferedResourceHandler(scoped_ptr<ResourceHandler> next_handler, | 29 BufferedResourceHandler(scoped_ptr<ResourceHandler> next_handler, |
29 ResourceDispatcherHostImpl* host, | 30 ResourceDispatcherHostImpl* host, |
30 net::URLRequest* request); | 31 net::URLRequest* request); |
31 ~BufferedResourceHandler() override; | 32 ~BufferedResourceHandler() override; |
32 | 33 |
33 private: | 34 private: |
34 // ResourceHandler implementation: | 35 // ResourceHandler implementation: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 bool must_download_is_set_; | 101 bool must_download_is_set_; |
101 | 102 |
102 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; | 103 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; |
103 | 104 |
104 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); | 105 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); |
105 }; | 106 }; |
106 | 107 |
107 } // namespace content | 108 } // namespace content |
108 | 109 |
109 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ | 110 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ |
OLD | NEW |