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 bool IsRequestIDInUse(const GlobalRequestID& id) const; | 536 bool IsRequestIDInUse(const GlobalRequestID& id) const; |
537 | 537 |
538 // Update the ResourceRequestInfo and internal maps when a request is | 538 // Update the ResourceRequestInfo and internal maps when a request is |
539 // transferred from one process to another. | 539 // transferred from one process to another. |
540 void UpdateRequestForTransfer(int child_id, | 540 void UpdateRequestForTransfer(int child_id, |
541 int route_id, | 541 int route_id, |
542 int request_id, | 542 int request_id, |
543 const ResourceRequest& request_data, | 543 const ResourceRequest& request_data, |
544 LoaderMap::iterator iter); | 544 LoaderMap::iterator iter); |
545 | 545 |
| 546 // If |request_data| is for a request being transferred from another process, |
| 547 // then CompleteTransfer method can be used to complete the transfer. |
| 548 void CompleteTransfer(int request_id, |
| 549 const ResourceRequest& request_data, |
| 550 int route_id); |
| 551 |
546 void BeginRequest( | 552 void BeginRequest( |
547 int request_id, | 553 int request_id, |
548 const ResourceRequest& request_data, | 554 const ResourceRequest& request_data, |
549 const SyncLoadResultCallback& sync_result_handler, // only valid for sync | 555 const SyncLoadResultCallback& sync_result_handler, // only valid for sync |
550 int route_id, // only valid for async | 556 int route_id, // only valid for async |
551 mojo::InterfaceRequest<mojom::URLLoader> mojo_request, | 557 mojo::InterfaceRequest<mojom::URLLoader> mojo_request, |
552 mojom::URLLoaderClientPtr url_loader_client); | 558 mojom::URLLoaderClientPtr url_loader_client); |
553 | 559 |
554 // There are requests which need decisions to be made like the following: | 560 // There are requests which need decisions to be made like the following: |
555 // Whether the presence of certain HTTP headers like the Origin header are | 561 // 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... |
761 | 767 |
762 // Points to the registered download handler intercept. | 768 // Points to the registered download handler intercept. |
763 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 769 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
764 | 770 |
765 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 771 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
766 }; | 772 }; |
767 | 773 |
768 } // namespace content | 774 } // namespace content |
769 | 775 |
770 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 776 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |