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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 7 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void SetResourceSchedulingFilter( | 146 void SetResourceSchedulingFilter( |
147 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter); | 147 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter); |
148 | 148 |
149 base::WeakPtr<ResourceDispatcher> GetWeakPtr() { | 149 base::WeakPtr<ResourceDispatcher> GetWeakPtr() { |
150 return weak_factory_.GetWeakPtr(); | 150 return weak_factory_.GetWeakPtr(); |
151 } | 151 } |
152 | 152 |
153 void OnTransferSizeUpdated(int request_id, int32_t transfer_size_diff); | 153 void OnTransferSizeUpdated(int request_id, int32_t transfer_size_diff); |
154 | 154 |
155 private: | 155 private: |
| 156 friend class URLLoaderClientImpl; |
156 friend class URLResponseBodyConsumer; | 157 friend class URLResponseBodyConsumer; |
157 friend class ResourceDispatcherTest; | 158 friend class ResourceDispatcherTest; |
158 | 159 |
159 typedef std::deque<IPC::Message*> MessageQueue; | 160 typedef std::deque<IPC::Message*> MessageQueue; |
160 struct PendingRequestInfo { | 161 struct PendingRequestInfo { |
161 PendingRequestInfo(std::unique_ptr<RequestPeer> peer, | 162 PendingRequestInfo(std::unique_ptr<RequestPeer> peer, |
162 ResourceType resource_type, | 163 ResourceType resource_type, |
163 int origin_pid, | 164 int origin_pid, |
164 const url::Origin& frame_origin, | 165 const url::Origin& frame_origin, |
165 const GURL& request_url, | 166 const GURL& request_url, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter_; | 276 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter_; |
276 | 277 |
277 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; | 278 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; |
278 | 279 |
279 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 280 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
280 }; | 281 }; |
281 | 282 |
282 } // namespace content | 283 } // namespace content |
283 | 284 |
284 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 285 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
OLD | NEW |