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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(int child_id, |
547 int route_id, | 547 int route_id, |
548 int request_id, | 548 int request_id, |
549 const ResourceRequest& request_data, | 549 const ResourceRequest& request_data, |
550 LoaderMap::iterator iter); | 550 LoaderMap::iterator iter); |
551 | 551 |
| 552 // If |request_data| is for a request being transferred from another process, |
| 553 // then CompleteTransfer method can be used to complete the transfer. |
| 554 void CompleteTransfer(int request_id, |
| 555 const ResourceRequest& request_data, |
| 556 int route_id); |
| 557 |
552 void BeginRequest( | 558 void BeginRequest( |
553 int request_id, | 559 int request_id, |
554 const ResourceRequest& request_data, | 560 const ResourceRequest& request_data, |
555 const SyncLoadResultCallback& sync_result_handler, // only valid for sync | 561 const SyncLoadResultCallback& sync_result_handler, // only valid for sync |
556 int route_id, | 562 int route_id, |
557 mojo::InterfaceRequest<mojom::URLLoader> mojo_request, | 563 mojo::InterfaceRequest<mojom::URLLoader> mojo_request, |
558 mojom::URLLoaderClientPtr url_loader_client); | 564 mojom::URLLoaderClientPtr url_loader_client); |
559 | 565 |
560 // There are requests which need decisions to be made like the following: | 566 // There are requests which need decisions to be made like the following: |
561 // Whether the presence of certain HTTP headers like the Origin header are | 567 // Whether the presence of certain HTTP headers like the Origin header are |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 | 773 |
768 // Points to the registered download handler intercept. | 774 // Points to the registered download handler intercept. |
769 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 775 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
770 | 776 |
771 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 777 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
772 }; | 778 }; |
773 | 779 |
774 } // namespace content | 780 } // namespace content |
775 | 781 |
776 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 782 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |