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