OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 // specified |id|. | 408 // specified |id|. |
409 void RegisterResourceMessageDelegate(const GlobalRequestID& id, | 409 void RegisterResourceMessageDelegate(const GlobalRequestID& id, |
410 ResourceMessageDelegate* delegate); | 410 ResourceMessageDelegate* delegate); |
411 void UnregisterResourceMessageDelegate(const GlobalRequestID& id, | 411 void UnregisterResourceMessageDelegate(const GlobalRequestID& id, |
412 ResourceMessageDelegate* delegate); | 412 ResourceMessageDelegate* delegate); |
413 | 413 |
414 int BuildLoadFlagsForRequest(const ResourceHostMsg_Request& request_data, | 414 int BuildLoadFlagsForRequest(const ResourceHostMsg_Request& request_data, |
415 int child_id, | 415 int child_id, |
416 bool is_sync_load); | 416 bool is_sync_load); |
417 | 417 |
| 418 bool DetachableType(const ResourceType::Type type) const; |
| 419 |
418 LoaderMap pending_loaders_; | 420 LoaderMap pending_loaders_; |
419 | 421 |
420 // Collection of temp files downloaded for child processes via | 422 // Collection of temp files downloaded for child processes via |
421 // the download_to_file mechanism. We avoid deleting them until | 423 // the download_to_file mechanism. We avoid deleting them until |
422 // the client no longer needs them. | 424 // the client no longer needs them. |
423 typedef std::map<int, scoped_refptr<webkit_blob::ShareableFileReference> > | 425 typedef std::map<int, scoped_refptr<webkit_blob::ShareableFileReference> > |
424 DeletableFilesMap; // key is request id | 426 DeletableFilesMap; // key is request id |
425 typedef std::map<int, DeletableFilesMap> | 427 typedef std::map<int, DeletableFilesMap> |
426 RegisteredTempFiles; // key is child process id | 428 RegisteredTempFiles; // key is child process id |
427 RegisteredTempFiles registered_temp_files_; | 429 RegisteredTempFiles registered_temp_files_; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; | 510 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; |
509 | 511 |
510 OfflineMap offline_policy_map_; | 512 OfflineMap offline_policy_map_; |
511 | 513 |
512 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 514 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
513 }; | 515 }; |
514 | 516 |
515 } // namespace content | 517 } // namespace content |
516 | 518 |
517 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 519 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |