| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 // The average private bytes increase of the browser for each new pending | 157 // The average private bytes increase of the browser for each new pending |
| 158 // request. Experimentally obtained. | 158 // request. Experimentally obtained. |
| 159 static const int kAvgBytesPerOutstandingRequest = 4400; | 159 static const int kAvgBytesPerOutstandingRequest = 4400; |
| 160 | 160 |
| 161 SaveFileManager* save_file_manager() const { | 161 SaveFileManager* save_file_manager() const { |
| 162 return save_file_manager_.get(); | 162 return save_file_manager_.get(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 // Called when the renderer loads a resource from its internal cache. | |
| 166 void OnDidLoadResourceFromMemoryCache(const GURL& url, | |
| 167 const std::string& security_info, | |
| 168 const std::string& http_method, | |
| 169 const std::string& mime_type, | |
| 170 ResourceType::Type resource_type); | |
| 171 | |
| 172 // Called when a RenderViewHost is created. | 165 // Called when a RenderViewHost is created. |
| 173 void OnRenderViewHostCreated(int child_id, int route_id); | 166 void OnRenderViewHostCreated(int child_id, int route_id); |
| 174 | 167 |
| 175 // Called when a RenderViewHost is deleted. | 168 // Called when a RenderViewHost is deleted. |
| 176 void OnRenderViewHostDeleted(int child_id, int route_id); | 169 void OnRenderViewHostDeleted(int child_id, int route_id); |
| 177 | 170 |
| 178 // Force cancels any pending requests for the given process. | 171 // Force cancels any pending requests for the given process. |
| 179 void CancelRequestsForProcess(int child_id); | 172 void CancelRequestsForProcess(int child_id); |
| 180 | 173 |
| 181 void OnUserGesture(WebContentsImpl* contents); | 174 void OnUserGesture(WebContentsImpl* contents); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; | 499 typedef std::map<GlobalRoutingID, OfflinePolicy*> OfflineMap; |
| 507 | 500 |
| 508 OfflineMap offline_policy_map_; | 501 OfflineMap offline_policy_map_; |
| 509 | 502 |
| 510 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 503 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 511 }; | 504 }; |
| 512 | 505 |
| 513 } // namespace content | 506 } // namespace content |
| 514 | 507 |
| 515 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 508 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |