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_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
11 #include "content/browser/renderer_host/layered_resource_handler.h" | 11 #include "content/browser/renderer_host/layered_resource_handler.h" |
12 #include "content/public/browser/resource_throttle_controller.h" | 12 #include "content/public/browser/resource_throttle_controller.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 class ResourceDispatcherHostImpl; | 17 class ResourceDispatcherHostImpl; |
18 class ResourceThrottle; | 18 class ResourceThrottle; |
19 struct ResourceResponse; | 19 class ResourceResponse; |
20 | 20 |
21 // Used to apply a list of ResourceThrottle instances to an URLRequest. | 21 // Used to apply a list of ResourceThrottle instances to an URLRequest. |
22 class ThrottlingResourceHandler : public LayeredResourceHandler, | 22 class ThrottlingResourceHandler : public LayeredResourceHandler, |
23 public ResourceThrottleController { | 23 public ResourceThrottleController { |
24 public: | 24 public: |
25 // Takes ownership of the ResourceThrottle instances. | 25 // Takes ownership of the ResourceThrottle instances. |
26 ThrottlingResourceHandler(ResourceDispatcherHostImpl* host, | 26 ThrottlingResourceHandler(ResourceDispatcherHostImpl* host, |
27 ResourceHandler* next_handler, | 27 ResourceHandler* next_handler, |
28 int child_id, | 28 int child_id, |
29 int request_id, | 29 int request_id, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 ScopedVector<ResourceThrottle> throttles_; | 65 ScopedVector<ResourceThrottle> throttles_; |
66 size_t index_; | 66 size_t index_; |
67 | 67 |
68 GURL deferred_url_; | 68 GURL deferred_url_; |
69 scoped_refptr<ResourceResponse> deferred_response_; | 69 scoped_refptr<ResourceResponse> deferred_response_; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace content | 72 } // namespace content |
73 | 73 |
74 #endif // CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ | 74 #endif // CONTENT_BROWSER_RENDERER_HOST_THROTTLING_RESOURCE_HANDLER_H_ |
OLD | NEW |