| 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 27 matching lines...) Expand all Loading... |
| 38 class ResourceDispatcherHostRequestInfo; | 38 class ResourceDispatcherHostRequestInfo; |
| 39 class ResourceHandler; | 39 class ResourceHandler; |
| 40 class ResourceMessageFilter; | 40 class ResourceMessageFilter; |
| 41 class SafeBrowsingService; | 41 class SafeBrowsingService; |
| 42 class SaveFileManager; | 42 class SaveFileManager; |
| 43 class SSLClientAuthHandler; | 43 class SSLClientAuthHandler; |
| 44 class WebKitThread; | 44 class WebKitThread; |
| 45 struct DownloadSaveInfo; | 45 struct DownloadSaveInfo; |
| 46 struct GlobalRequestID; | 46 struct GlobalRequestID; |
| 47 struct ResourceHostMsg_Request; | 47 struct ResourceHostMsg_Request; |
| 48 struct ViewMsg_ClosePage_Params; | 48 struct ViewMsg_SwapOut_Params; |
| 49 | 49 |
| 50 namespace net { | 50 namespace net { |
| 51 class URLRequestContext; | 51 class URLRequestContext; |
| 52 } // namespace net | 52 } // namespace net |
| 53 | 53 |
| 54 namespace webkit_blob { | 54 namespace webkit_blob { |
| 55 class DeletableFileReference; | 55 class DeletableFileReference; |
| 56 } | 56 } |
| 57 | 57 |
| 58 class ResourceDispatcherHost : public net::URLRequest::Delegate { | 58 class ResourceDispatcherHost : public net::URLRequest::Delegate { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } | 164 } |
| 165 | 165 |
| 166 SafeBrowsingService* safe_browsing_service() const { | 166 SafeBrowsingService* safe_browsing_service() const { |
| 167 return safe_browsing_; | 167 return safe_browsing_; |
| 168 } | 168 } |
| 169 | 169 |
| 170 WebKitThread* webkit_thread() const { | 170 WebKitThread* webkit_thread() const { |
| 171 return webkit_thread_.get(); | 171 return webkit_thread_.get(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 // Called when the onunload handler for a cross-site request has finished. | 174 // Called when the unload handler for a cross-site request has finished. |
| 175 void OnClosePageACK(const ViewMsg_ClosePage_Params& params); | 175 void OnSwapOutACK(const ViewMsg_SwapOut_Params& params); |
| 176 | 176 |
| 177 // Force cancels any pending requests for the given process. | 177 // Force cancels any pending requests for the given process. |
| 178 void CancelRequestsForProcess(int process_unique_id); | 178 void CancelRequestsForProcess(int process_unique_id); |
| 179 | 179 |
| 180 // Force cancels any pending requests for the given route id. This method | 180 // Force cancels any pending requests for the given route id. This method |
| 181 // acts like CancelRequestsForProcess when route_id is -1. | 181 // acts like CancelRequestsForProcess when route_id is -1. |
| 182 void CancelRequestsForRoute(int process_unique_id, int route_id); | 182 void CancelRequestsForRoute(int process_unique_id, int route_id); |
| 183 | 183 |
| 184 // net::URLRequest::Delegate | 184 // net::URLRequest::Delegate |
| 185 virtual void OnReceivedRedirect(net::URLRequest* request, | 185 virtual void OnReceivedRedirect(net::URLRequest* request, |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 ResourceMessageFilter* filter_; | 508 ResourceMessageFilter* filter_; |
| 509 | 509 |
| 510 static bool is_prefetch_enabled_; | 510 static bool is_prefetch_enabled_; |
| 511 PrerenderChildRouteIdPairs prerender_child_route_pairs_; | 511 PrerenderChildRouteIdPairs prerender_child_route_pairs_; |
| 512 | 512 |
| 513 | 513 |
| 514 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 514 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 515 }; | 515 }; |
| 516 | 516 |
| 517 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 517 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |