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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 const GURL& url, | 357 const GURL& url, |
358 ResourceType::Type resource_type, | 358 ResourceType::Type resource_type, |
359 const net::URLRequestJobFactory& job_factory, | 359 const net::URLRequestJobFactory& job_factory, |
360 ResourceHandler* handler); | 360 ResourceHandler* handler); |
361 | 361 |
362 // Checks all pending requests and updates the load states and upload | 362 // Checks all pending requests and updates the load states and upload |
363 // progress if necessary. | 363 // progress if necessary. |
364 void UpdateLoadStates(); | 364 void UpdateLoadStates(); |
365 | 365 |
366 // Checks the upload state and sends an update if one is necessary. | 366 // Checks the upload state and sends an update if one is necessary. |
367 bool MaybeUpdateUploadProgress(ResourceDispatcherHostRequestInfo *info, | 367 void MaybeUpdateUploadProgress(ResourceDispatcherHostRequestInfo *info, |
368 net::URLRequest *request); | 368 net::URLRequest *request); |
369 | 369 |
370 // Resumes or cancels (if |cancel_requests| is true) any blocked requests. | 370 // Resumes or cancels (if |cancel_requests| is true) any blocked requests. |
371 void ProcessBlockedRequestsForRoute(int process_unique_id, | 371 void ProcessBlockedRequestsForRoute(int process_unique_id, |
372 int route_id, | 372 int route_id, |
373 bool cancel_requests); | 373 bool cancel_requests); |
374 | 374 |
375 void OnRequestResource(const IPC::Message& msg, | 375 void OnRequestResource(const IPC::Message& msg, |
376 int request_id, | 376 int request_id, |
377 const ResourceHostMsg_Request& request_data); | 377 const ResourceHostMsg_Request& request_data); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 | 498 |
499 ResourceDispatcherHostDelegate* delegate_; | 499 ResourceDispatcherHostDelegate* delegate_; |
500 | 500 |
501 static bool is_prefetch_enabled_; | 501 static bool is_prefetch_enabled_; |
502 bool allow_cross_origin_auth_prompt_; | 502 bool allow_cross_origin_auth_prompt_; |
503 | 503 |
504 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 504 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
505 }; | 505 }; |
506 | 506 |
507 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 507 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |