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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 // sending it to the renderer. Returns true if there are enough file | 231 // sending it to the renderer. Returns true if there are enough file |
232 // descriptors available for the shared memory buffer. If false is returned, | 232 // descriptors available for the shared memory buffer. If false is returned, |
233 // the request should cancel. | 233 // the request should cancel. |
234 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); | 234 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); |
235 | 235 |
236 // Called by a ResourceHandler after it has finished its request and is done | 236 // Called by a ResourceHandler after it has finished its request and is done |
237 // using its shared memory buffer. Frees up that file descriptor to be used | 237 // using its shared memory buffer. Frees up that file descriptor to be used |
238 // elsewhere. | 238 // elsewhere. |
239 void FinishedWithResourcesForRequest(const net::URLRequest* request_); | 239 void FinishedWithResourcesForRequest(const net::URLRequest* request_); |
240 | 240 |
241 // PlzNavigate | |
241 // Called by NavigationRequest to start a navigation request in the node | 242 // Called by NavigationRequest to start a navigation request in the node |
242 // identified by |frame_node_id|. | 243 // identified by |frame_node_id|. |
243 void NavigationRequest(const NavigationRequestInfo& info, | 244 void StartNavigationRequest(const NavigationRequestInfo& info, |
244 scoped_refptr<ResourceRequestBody> request_body, | 245 scoped_refptr<ResourceRequestBody> request_body, |
245 int64 frame_node_id); | 246 int64 navigation_request_id, |
247 int64 frame_node_id); | |
nasko
2014/08/21 21:53:44
nit: frame_tree_node_id. I missed to add this comm
carlosk
2014/08/22 13:43:03
I'm not sure I understood you... You meant I shoul
nasko
2014/08/22 14:00:34
Yes.
carlosk
2014/08/22 16:54:41
Acknowledged.
| |
248 | |
249 // PlzNavigate | |
250 // Called by NavigationRequest to cancel a navigation request with the | |
251 // provided |navigation_request_id| from the node identified by | |
nasko
2014/08/21 21:53:44
nit: s/from/in/
carlosk
2014/08/22 13:43:03
Done.
| |
252 // |frame_node_id|. | |
253 void CancelNavigationRequest(int64 navigation_request_id, | |
254 int64 frame_node_id); | |
246 | 255 |
247 private: | 256 private: |
248 friend class ResourceDispatcherHostTest; | 257 friend class ResourceDispatcherHostTest; |
249 | 258 |
250 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 259 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
251 TestBlockedRequestsProcessDies); | 260 TestBlockedRequestsProcessDies); |
252 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 261 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
253 CalculateApproximateMemoryCost); | 262 CalculateApproximateMemoryCost); |
254 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 263 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
255 DetachableResourceTimesOut); | 264 DetachableResourceTimesOut); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
516 DelegateMap delegate_map_; | 525 DelegateMap delegate_map_; |
517 | 526 |
518 scoped_ptr<ResourceScheduler> scheduler_; | 527 scoped_ptr<ResourceScheduler> scheduler_; |
519 | 528 |
520 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 529 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
521 }; | 530 }; |
522 | 531 |
523 } // namespace content | 532 } // namespace content |
524 | 533 |
525 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 534 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |