| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 int process_unique_id, | 93 int process_unique_id, |
| 94 int route_id, | 94 int route_id, |
| 95 const content::ResourceContext& context); | 95 const content::ResourceContext& context); |
| 96 | 96 |
| 97 // Cancels the given request if it still exists. We ignore cancels from the | 97 // Cancels the given request if it still exists. We ignore cancels from the |
| 98 // renderer in the event of a download. | 98 // renderer in the event of a download. |
| 99 void CancelRequest(int process_unique_id, | 99 void CancelRequest(int process_unique_id, |
| 100 int request_id, | 100 int request_id, |
| 101 bool from_renderer); | 101 bool from_renderer); |
| 102 | 102 |
| 103 // Assigns the pending request a new routing_id because it was transferred |
| 104 // to a new page. |
| 105 void TransferRequestToNewPage(int process_unique_id, |
| 106 int new_routing_id, |
| 107 int request_id); |
| 108 |
| 103 // Follows a deferred redirect for the given request. | 109 // Follows a deferred redirect for the given request. |
| 104 // new_first_party_for_cookies, if non-empty, is the new cookie policy URL | 110 // new_first_party_for_cookies, if non-empty, is the new cookie policy URL |
| 105 // for the redirected URL. If the cookie policy URL needs changing, pass | 111 // for the redirected URL. If the cookie policy URL needs changing, pass |
| 106 // true as has_new_first_party_for_cookies and the new cookie policy URL as | 112 // true as has_new_first_party_for_cookies and the new cookie policy URL as |
| 107 // new_first_party_for_cookies. Otherwise, pass false as | 113 // new_first_party_for_cookies. Otherwise, pass false as |
| 108 // has_new_first_party_for_cookies, and new_first_party_for_cookies will not | 114 // has_new_first_party_for_cookies, and new_first_party_for_cookies will not |
| 109 // be used. | 115 // be used. |
| 110 void FollowDeferredRedirect(int process_unique_id, | 116 void FollowDeferredRedirect(int process_unique_id, |
| 111 int request_id, | 117 int request_id, |
| 112 bool has_new_first_party_for_cookies, | 118 bool has_new_first_party_for_cookies, |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 const ResourceHostMsg_Request& request_data, | 395 const ResourceHostMsg_Request& request_data, |
| 390 IPC::Message* sync_result); | 396 IPC::Message* sync_result); |
| 391 void BeginRequest(int request_id, | 397 void BeginRequest(int request_id, |
| 392 const ResourceHostMsg_Request& request_data, | 398 const ResourceHostMsg_Request& request_data, |
| 393 IPC::Message* sync_result, // only valid for sync | 399 IPC::Message* sync_result, // only valid for sync |
| 394 int route_id); // only valid for async | 400 int route_id); // only valid for async |
| 395 void OnDataReceivedACK(int request_id); | 401 void OnDataReceivedACK(int request_id); |
| 396 void OnDataDownloadedACK(int request_id); | 402 void OnDataDownloadedACK(int request_id); |
| 397 void OnUploadProgressACK(int request_id); | 403 void OnUploadProgressACK(int request_id); |
| 398 void OnCancelRequest(int request_id); | 404 void OnCancelRequest(int request_id); |
| 405 void OnTransferRequestToNewPage(const IPC::Message& msg, int request_id); |
| 399 void OnFollowRedirect(int request_id, | 406 void OnFollowRedirect(int request_id, |
| 400 bool has_new_first_party_for_cookies, | 407 bool has_new_first_party_for_cookies, |
| 401 const GURL& new_first_party_for_cookies); | 408 const GURL& new_first_party_for_cookies); |
| 402 void OnReleaseDownloadedFile(int request_id); | 409 void OnReleaseDownloadedFile(int request_id); |
| 403 | 410 |
| 404 // Creates ResourceDispatcherHostRequestInfo for a browser-initiated request | 411 // Creates ResourceDispatcherHostRequestInfo for a browser-initiated request |
| 405 // (a download or a page save). |download| should be true if the request | 412 // (a download or a page save). |download| should be true if the request |
| 406 // is a file download. | 413 // is a file download. |
| 407 ResourceDispatcherHostRequestInfo* CreateRequestInfoForBrowserRequest( | 414 ResourceDispatcherHostRequestInfo* CreateRequestInfoForBrowserRequest( |
| 408 ResourceHandler* handler, | 415 ResourceHandler* handler, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 | 515 |
| 509 ResourceDispatcherHostDelegate* delegate_; | 516 ResourceDispatcherHostDelegate* delegate_; |
| 510 | 517 |
| 511 static bool is_prefetch_enabled_; | 518 static bool is_prefetch_enabled_; |
| 512 bool allow_cross_origin_auth_prompt_; | 519 bool allow_cross_origin_auth_prompt_; |
| 513 | 520 |
| 514 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 521 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 515 }; | 522 }; |
| 516 | 523 |
| 517 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 524 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |