| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 fowards the messages from the | 7 // dispatches them to URLRequests. It then fowards 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // renderer in the event of a download. | 230 // renderer in the event of a download. |
| 231 void CancelRequest(int process_id, | 231 void CancelRequest(int process_id, |
| 232 int request_id, | 232 int request_id, |
| 233 bool from_renderer); | 233 bool from_renderer); |
| 234 | 234 |
| 235 // Decrements the pending_data_count for the request and resumes | 235 // Decrements the pending_data_count for the request and resumes |
| 236 // the request if it was paused due to too many pending data | 236 // the request if it was paused due to too many pending data |
| 237 // messages sent. | 237 // messages sent. |
| 238 void OnDataReceivedACK(int process_id, int request_id); | 238 void OnDataReceivedACK(int process_id, int request_id); |
| 239 | 239 |
| 240 // Called when the renderer process confirms the reception of a download |
| 241 // progress message. |
| 242 void OnDownloadProgressACK(int process_id, int request_id); |
| 243 |
| 240 // Resets the waiting_for_upload_progress_ack flag. | 244 // Resets the waiting_for_upload_progress_ack flag. |
| 241 void OnUploadProgressACK(int process_id, int request_id); | 245 void OnUploadProgressACK(int process_id, int request_id); |
| 242 | 246 |
| 243 // Returns true if it's ok to send the data. If there are already too many | 247 // Returns true if it's ok to send the data. If there are already too many |
| 244 // data messages pending, it pauses the request and returns false. In this | 248 // data messages pending, it pauses the request and returns false. In this |
| 245 // case the caller should not send the data. | 249 // case the caller should not send the data. |
| 246 bool WillSendData(int process_id, int request_id); | 250 bool WillSendData(int process_id, int request_id); |
| 247 | 251 |
| 248 // Pauses or resumes network activity for a particular request. | 252 // Pauses or resumes network activity for a particular request. |
| 249 void PauseRequest(int process_id, int request_id, bool pause); | 253 void PauseRequest(int process_id, int request_id, bool pause); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 // individual requests is given by CalculateApproximateMemoryCost). | 525 // individual requests is given by CalculateApproximateMemoryCost). |
| 522 // The total number of outstanding requests is roughly: | 526 // The total number of outstanding requests is roughly: |
| 523 // (max_outstanding_requests_cost_per_process_ / | 527 // (max_outstanding_requests_cost_per_process_ / |
| 524 // kAvgBytesPerOutstandingRequest) | 528 // kAvgBytesPerOutstandingRequest) |
| 525 int max_outstanding_requests_cost_per_process_; | 529 int max_outstanding_requests_cost_per_process_; |
| 526 | 530 |
| 527 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 531 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 528 }; | 532 }; |
| 529 | 533 |
| 530 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 534 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |