| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 // Called when loading a request with mojo. | 302 // Called when loading a request with mojo. |
| 303 void OnRequestResourceWithMojo( | 303 void OnRequestResourceWithMojo( |
| 304 int routing_id, | 304 int routing_id, |
| 305 int request_id, | 305 int request_id, |
| 306 const ResourceRequest& request, | 306 const ResourceRequest& request, |
| 307 mojo::InterfaceRequest<mojom::URLLoader> mojo_request, | 307 mojo::InterfaceRequest<mojom::URLLoader> mojo_request, |
| 308 mojom::URLLoaderClientPtr url_loader_client, | 308 mojom::URLLoaderClientPtr url_loader_client, |
| 309 ResourceMessageFilter* filter); | 309 ResourceMessageFilter* filter); |
| 310 | 310 |
| 311 void OnSyncLoadWithMojo(int routing_id, |
| 312 int request_id, |
| 313 const ResourceRequest& request_data, |
| 314 ResourceMessageFilter* filter, |
| 315 const SyncLoadResultCallback& result_handler); |
| 316 |
| 311 // Helper function for initializing the |request| passed in. By initializing | 317 // Helper function for initializing the |request| passed in. By initializing |
| 312 // we mean setting the |referrer| on the |request|, associating the | 318 // we mean setting the |referrer| on the |request|, associating the |
| 313 // ResourceRequestInfoImpl structure with the |request|, etc. | 319 // ResourceRequestInfoImpl structure with the |request|, etc. |
| 314 // This function should be called for invoking the BeginURLRequest() function | 320 // This function should be called for invoking the BeginURLRequest() function |
| 315 // to initiate a URL request. | 321 // to initiate a URL request. |
| 316 void InitializeURLRequest(net::URLRequest* request, | 322 void InitializeURLRequest(net::URLRequest* request, |
| 317 const Referrer& referrer, | 323 const Referrer& referrer, |
| 318 bool is_download, | 324 bool is_download, |
| 319 int render_process_host_id, | 325 int render_process_host_id, |
| 320 int render_view_routing_id, | 326 int render_view_routing_id, |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 | 763 |
| 758 // Points to the registered download handler intercept. | 764 // Points to the registered download handler intercept. |
| 759 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 765 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
| 760 | 766 |
| 761 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 767 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 762 }; | 768 }; |
| 763 | 769 |
| 764 } // namespace content | 770 } // namespace content |
| 765 | 771 |
| 766 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 772 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |