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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 void UpdateRequestForTransfer(int child_id, | 365 void UpdateRequestForTransfer(int child_id, |
366 int route_id, | 366 int route_id, |
367 int request_id, | 367 int request_id, |
368 const ResourceHostMsg_Request& request_data, | 368 const ResourceHostMsg_Request& request_data, |
369 const linked_ptr<ResourceLoader>& loader); | 369 const linked_ptr<ResourceLoader>& loader); |
370 | 370 |
371 void BeginRequest(int request_id, | 371 void BeginRequest(int request_id, |
372 const ResourceHostMsg_Request& request_data, | 372 const ResourceHostMsg_Request& request_data, |
373 IPC::Message* sync_result, // only valid for sync | 373 IPC::Message* sync_result, // only valid for sync |
374 int route_id); // only valid for async | 374 int route_id); // only valid for async |
| 375 |
| 376 // Creates a ResourceHandler to be used by BeginRequest() for normal resource |
| 377 // loading. |
| 378 scoped_ptr<ResourceHandler> CreateResourceHandler( |
| 379 net::URLRequest* request, |
| 380 const ResourceHostMsg_Request& request_data, |
| 381 IPC::Message* sync_result, |
| 382 int route_id, |
| 383 int process_type, |
| 384 int child_id, |
| 385 ResourceContext* resource_context); |
| 386 |
375 void OnDataDownloadedACK(int request_id); | 387 void OnDataDownloadedACK(int request_id); |
376 void OnUploadProgressACK(int request_id); | 388 void OnUploadProgressACK(int request_id); |
377 void OnCancelRequest(int request_id); | 389 void OnCancelRequest(int request_id); |
378 void OnReleaseDownloadedFile(int request_id); | 390 void OnReleaseDownloadedFile(int request_id); |
379 | 391 |
380 // Creates ResourceRequestInfoImpl for a download or page save. | 392 // Creates ResourceRequestInfoImpl for a download or page save. |
381 // |download| should be true if the request is a file download. | 393 // |download| should be true if the request is a file download. |
382 ResourceRequestInfoImpl* CreateRequestInfo( | 394 ResourceRequestInfoImpl* CreateRequestInfo( |
383 int child_id, | 395 int child_id, |
384 int route_id, | 396 int route_id, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; | 521 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; |
510 | 522 |
511 OfflineMap offline_policy_map_; | 523 OfflineMap offline_policy_map_; |
512 | 524 |
513 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 525 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
514 }; | 526 }; |
515 | 527 |
516 } // namespace content | 528 } // namespace content |
517 | 529 |
518 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 530 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |