| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 main_thread_task_runner_ = main_thread_task_runner; | 142 main_thread_task_runner_ = main_thread_task_runner; |
| 143 } | 143 } |
| 144 | 144 |
| 145 void SetResourceSchedulingFilter( | 145 void SetResourceSchedulingFilter( |
| 146 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter); | 146 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter); |
| 147 | 147 |
| 148 base::WeakPtr<ResourceDispatcher> GetWeakPtr() { | 148 base::WeakPtr<ResourceDispatcher> GetWeakPtr() { |
| 149 return weak_factory_.GetWeakPtr(); | 149 return weak_factory_.GetWeakPtr(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void OnTransferSizeUpdated(int request_id, int transfer_size_diff); |
| 153 |
| 152 private: | 154 private: |
| 153 friend class URLResponseBodyConsumer; | 155 friend class URLResponseBodyConsumer; |
| 154 friend class ResourceDispatcherTest; | 156 friend class ResourceDispatcherTest; |
| 155 | 157 |
| 156 typedef std::deque<IPC::Message*> MessageQueue; | 158 typedef std::deque<IPC::Message*> MessageQueue; |
| 157 struct PendingRequestInfo { | 159 struct PendingRequestInfo { |
| 158 PendingRequestInfo(std::unique_ptr<RequestPeer> peer, | 160 PendingRequestInfo(std::unique_ptr<RequestPeer> peer, |
| 159 ResourceType resource_type, | 161 ResourceType resource_type, |
| 160 int origin_pid, | 162 int origin_pid, |
| 161 const url::Origin& frame_origin, | 163 const url::Origin& frame_origin, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter_; | 274 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter_; |
| 273 | 275 |
| 274 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; | 276 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; |
| 275 | 277 |
| 276 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 278 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
| 277 }; | 279 }; |
| 278 | 280 |
| 279 } // namespace content | 281 } // namespace content |
| 280 | 282 |
| 281 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 283 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
| OLD | NEW |