| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 mojom::URLLoaderClientAssociatedPtr url_loader_client); | 536 mojom::URLLoaderClientAssociatedPtr url_loader_client); |
| 537 | 537 |
| 538 void OnSyncLoad(int request_id, | 538 void OnSyncLoad(int request_id, |
| 539 const ResourceRequest& request_data, | 539 const ResourceRequest& request_data, |
| 540 IPC::Message* sync_result); | 540 IPC::Message* sync_result); |
| 541 | 541 |
| 542 bool IsRequestIDInUse(const GlobalRequestID& id) const; | 542 bool IsRequestIDInUse(const GlobalRequestID& id) const; |
| 543 | 543 |
| 544 // Update the ResourceRequestInfo and internal maps when a request is | 544 // Update the ResourceRequestInfo and internal maps when a request is |
| 545 // transferred from one process to another. | 545 // transferred from one process to another. |
| 546 void UpdateRequestForTransfer(int child_id, | 546 void UpdateRequestForTransfer( |
| 547 int route_id, | 547 int child_id, |
| 548 int request_id, | 548 int route_id, |
| 549 const ResourceRequest& request_data, | 549 int request_id, |
| 550 LoaderMap::iterator iter); | 550 const ResourceRequest& request_data, |
| 551 LoaderMap::iterator iter, |
| 552 mojom::URLLoaderAssociatedRequest mojo_request, |
| 553 mojom::URLLoaderClientAssociatedPtr url_loader_client); |
| 551 | 554 |
| 552 // If |request_data| is for a request being transferred from another process, | 555 // If |request_data| is for a request being transferred from another process, |
| 553 // then CompleteTransfer method can be used to complete the transfer. | 556 // then CompleteTransfer method can be used to complete the transfer. |
| 554 void CompleteTransfer(int request_id, | 557 void CompleteTransfer(int request_id, |
| 555 const ResourceRequest& request_data, | 558 const ResourceRequest& request_data, |
| 556 int route_id); | 559 int route_id, |
| 560 mojom::URLLoaderAssociatedRequest mojo_request, |
| 561 mojom::URLLoaderClientAssociatedPtr url_loader_client); |
| 557 | 562 |
| 558 void BeginRequest( | 563 void BeginRequest( |
| 559 int request_id, | 564 int request_id, |
| 560 const ResourceRequest& request_data, | 565 const ResourceRequest& request_data, |
| 561 const SyncLoadResultCallback& sync_result_handler, // only valid for sync | 566 const SyncLoadResultCallback& sync_result_handler, // only valid for sync |
| 562 int route_id, | 567 int route_id, |
| 563 mojom::URLLoaderAssociatedRequest mojo_request, | 568 mojom::URLLoaderAssociatedRequest mojo_request, |
| 564 mojom::URLLoaderClientAssociatedPtr url_loader_client); | 569 mojom::URLLoaderClientAssociatedPtr url_loader_client); |
| 565 | 570 |
| 566 // There are requests which need decisions to be made like the following: | 571 // There are requests which need decisions to be made like the following: |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 | 777 |
| 773 // Points to the registered download handler intercept. | 778 // Points to the registered download handler intercept. |
| 774 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 779 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
| 775 | 780 |
| 776 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 781 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 777 }; | 782 }; |
| 778 | 783 |
| 779 } // namespace content | 784 } // namespace content |
| 780 | 785 |
| 781 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 786 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |