OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This is the browser side of the resource dispatcher, it receives requests | 5 // This is the browser side of the resource dispatcher, it receives requests |
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and | 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and |
7 // dispatches them to URLRequests. It then forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards the messages from the |
8 // URLRequests back to the correct process for handling. | 8 // URLRequests back to the correct process for handling. |
9 // | 9 // |
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 // This does not take ownership of the delegate. It is expected that the | 258 // This does not take ownership of the delegate. It is expected that the |
259 // delegate have a longer lifetime than the ResourceDispatcherHost. | 259 // delegate have a longer lifetime than the ResourceDispatcherHost. |
260 void set_delegate(content::ResourceDispatcherHostDelegate* delegate) { | 260 void set_delegate(content::ResourceDispatcherHostDelegate* delegate) { |
261 delegate_ = delegate; | 261 delegate_ = delegate; |
262 } | 262 } |
263 content::ResourceDispatcherHostDelegate* delegate() { | 263 content::ResourceDispatcherHostDelegate* delegate() { |
264 return delegate_; | 264 return delegate_; |
265 } | 265 } |
266 | 266 |
| 267 // Marks the request as "parked". This happens if a request is |
| 268 // redirected cross-site and needs to be resumed by a new render view. |
| 269 void MarkAsTransferredNavigation( |
| 270 const GlobalRequestID& transferred_request_id, |
| 271 net::URLRequest* transferred_request); |
| 272 |
267 private: | 273 private: |
268 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 274 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
269 TestBlockedRequestsProcessDies); | 275 TestBlockedRequestsProcessDies); |
270 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 276 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
271 IncrementOutstandingRequestsMemoryCost); | 277 IncrementOutstandingRequestsMemoryCost); |
272 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 278 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
273 CalculateApproximateMemoryCost); | 279 CalculateApproximateMemoryCost); |
274 | 280 |
275 class ShutdownTask; | 281 class ShutdownTask; |
276 | 282 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 499 |
494 // Used during IPC message dispatching so that the handlers can get a pointer | 500 // Used during IPC message dispatching so that the handlers can get a pointer |
495 // to the source of the message. | 501 // to the source of the message. |
496 ResourceMessageFilter* filter_; | 502 ResourceMessageFilter* filter_; |
497 | 503 |
498 content::ResourceDispatcherHostDelegate* delegate_; | 504 content::ResourceDispatcherHostDelegate* delegate_; |
499 | 505 |
500 static bool is_prefetch_enabled_; | 506 static bool is_prefetch_enabled_; |
501 bool allow_cross_origin_auth_prompt_; | 507 bool allow_cross_origin_auth_prompt_; |
502 | 508 |
| 509 // Maps the request ID of request that is being transferred to a new RVH |
| 510 // to the respective request. |
| 511 typedef std::map<GlobalRequestID, net::URLRequest*> TransferredNavigations; |
| 512 TransferredNavigations transferred_navigations_; |
| 513 |
503 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 514 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
504 }; | 515 }; |
505 | 516 |
506 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 517 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |