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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 const GURL& url, | 371 const GURL& url, |
372 ResourceType::Type resource_type, | 372 ResourceType::Type resource_type, |
373 const net::URLRequestJobFactory& job_factory, | 373 const net::URLRequestJobFactory& job_factory, |
374 ResourceHandler* handler); | 374 ResourceHandler* handler); |
375 | 375 |
376 // Checks all pending requests and updates the load states and upload | 376 // Checks all pending requests and updates the load states and upload |
377 // progress if necessary. | 377 // progress if necessary. |
378 void UpdateLoadStates(); | 378 void UpdateLoadStates(); |
379 | 379 |
380 // Checks the upload state and sends an update if one is necessary. | 380 // Checks the upload state and sends an update if one is necessary. |
381 bool MaybeUpdateUploadProgress(ResourceDispatcherHostRequestInfo *info, | 381 void MaybeUpdateUploadProgress(ResourceDispatcherHostRequestInfo *info, |
382 net::URLRequest *request); | 382 net::URLRequest *request); |
383 | 383 |
384 // Resumes or cancels (if |cancel_requests| is true) any blocked requests. | 384 // Resumes or cancels (if |cancel_requests| is true) any blocked requests. |
385 void ProcessBlockedRequestsForRoute(int process_unique_id, | 385 void ProcessBlockedRequestsForRoute(int process_unique_id, |
386 int route_id, | 386 int route_id, |
387 bool cancel_requests); | 387 bool cancel_requests); |
388 | 388 |
389 void OnRequestResource(const IPC::Message& msg, | 389 void OnRequestResource(const IPC::Message& msg, |
390 int request_id, | 390 int request_id, |
391 const ResourceHostMsg_Request& request_data); | 391 const ResourceHostMsg_Request& request_data); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 517 |
518 ResourceDispatcherHostDelegate* delegate_; | 518 ResourceDispatcherHostDelegate* delegate_; |
519 | 519 |
520 static bool is_prefetch_enabled_; | 520 static bool is_prefetch_enabled_; |
521 bool allow_cross_origin_auth_prompt_; | 521 bool allow_cross_origin_auth_prompt_; |
522 | 522 |
523 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 523 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
524 }; | 524 }; |
525 | 525 |
526 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 526 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |