OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 int route_id, | 374 int route_id, |
375 const GURL& url, | 375 const GURL& url, |
376 ResourceType::Type resource_type, | 376 ResourceType::Type resource_type, |
377 ResourceHandler* handler); | 377 ResourceHandler* handler); |
378 | 378 |
379 // Checks all pending requests and updates the load states and upload | 379 // Checks all pending requests and updates the load states and upload |
380 // progress if necessary. | 380 // progress if necessary. |
381 void UpdateLoadStates(); | 381 void UpdateLoadStates(); |
382 | 382 |
383 // Checks the upload state and sends an update if one is necessary. | 383 // Checks the upload state and sends an update if one is necessary. |
384 void MaybeUpdateUploadProgress(ResourceDispatcherHostRequestInfo *info, | 384 bool MaybeUpdateUploadProgress(ResourceDispatcherHostRequestInfo *info, |
385 URLRequest *request); | 385 URLRequest *request); |
386 | 386 |
387 // Resumes or cancels (if |cancel_requests| is true) any blocked requests. | 387 // Resumes or cancels (if |cancel_requests| is true) any blocked requests. |
388 void ProcessBlockedRequestsForRoute(int process_unique_id, | 388 void ProcessBlockedRequestsForRoute(int process_unique_id, |
389 int route_id, | 389 int route_id, |
390 bool cancel_requests); | 390 bool cancel_requests); |
391 | 391 |
392 void OnRequestResource(const IPC::Message& msg, | 392 void OnRequestResource(const IPC::Message& msg, |
393 int request_id, | 393 int request_id, |
394 const ViewHostMsg_Resource_Request& request_data); | 394 const ViewHostMsg_Resource_Request& request_data); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 // Used during IPC message dispatching so that the handlers can get a pointer | 476 // Used during IPC message dispatching so that the handlers can get a pointer |
477 // to the source of the message. | 477 // to the source of the message. |
478 Receiver* receiver_; | 478 Receiver* receiver_; |
479 | 479 |
480 static bool g_is_http_prioritization_enabled; | 480 static bool g_is_http_prioritization_enabled; |
481 | 481 |
482 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 482 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
483 }; | 483 }; |
484 | 484 |
485 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 485 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |