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 // 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 int route_id, | 123 int route_id, |
124 ResourceContext* context); | 124 ResourceContext* context); |
125 | 125 |
126 // Cancels the given request if it still exists. | 126 // Cancels the given request if it still exists. |
127 void CancelRequest(int child_id, int request_id); | 127 void CancelRequest(int child_id, int request_id); |
128 | 128 |
129 // Marks the request as "parked". This happens if a request is | 129 // Marks the request as "parked". This happens if a request is |
130 // redirected cross-site and needs to be resumed by a new render view. | 130 // redirected cross-site and needs to be resumed by a new render view. |
131 void MarkAsTransferredNavigation(const GlobalRequestID& id); | 131 void MarkAsTransferredNavigation(const GlobalRequestID& id); |
132 | 132 |
| 133 // Cancels a request previously marked as being transferred, for use when a |
| 134 // navigation was cancelled. |
| 135 void CancelTransferringNavigation(const GlobalRequestID& id); |
| 136 |
133 // Resumes the request without transferring it to a new render view. | 137 // Resumes the request without transferring it to a new render view. |
134 void ResumeDeferredNavigation(const GlobalRequestID& id); | 138 void ResumeDeferredNavigation(const GlobalRequestID& id); |
135 | 139 |
136 // Returns the number of pending requests. This is designed for the unittests | 140 // Returns the number of pending requests. This is designed for the unittests |
137 int pending_requests() const { | 141 int pending_requests() const { |
138 return static_cast<int>(pending_loaders_.size()); | 142 return static_cast<int>(pending_loaders_.size()); |
139 } | 143 } |
140 | 144 |
141 // Intended for unit-tests only. Overrides the outstanding requests bound. | 145 // Intended for unit-tests only. Overrides the outstanding requests bound. |
142 void set_max_outstanding_requests_cost_per_process(int limit) { | 146 void set_max_outstanding_requests_cost_per_process(int limit) { |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; | 509 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; |
506 | 510 |
507 OfflineMap offline_policy_map_; | 511 OfflineMap offline_policy_map_; |
508 | 512 |
509 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 513 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
510 }; | 514 }; |
511 | 515 |
512 } // namespace content | 516 } // namespace content |
513 | 517 |
514 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 518 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |