| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 fowards the messages from the | 7 // dispatches them to URLRequests. It then fowards 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 22 matching lines...) Expand all Loading... |
| 33 class DownloadRequestManager; | 33 class DownloadRequestManager; |
| 34 class LoginHandler; | 34 class LoginHandler; |
| 35 class MessageLoop; | 35 class MessageLoop; |
| 36 class PluginService; | 36 class PluginService; |
| 37 class SafeBrowsingService; | 37 class SafeBrowsingService; |
| 38 class SaveFileManager; | 38 class SaveFileManager; |
| 39 class SSLClientAuthHandler; | 39 class SSLClientAuthHandler; |
| 40 class URLRequestContext; | 40 class URLRequestContext; |
| 41 class WebKitThread; | 41 class WebKitThread; |
| 42 struct ViewHostMsg_Resource_Request; | 42 struct ViewHostMsg_Resource_Request; |
| 43 struct ViewMsg_ClosePage_Params; |
| 43 | 44 |
| 44 class ResourceDispatcherHost : public URLRequest::Delegate { | 45 class ResourceDispatcherHost : public URLRequest::Delegate { |
| 45 public: | 46 public: |
| 46 // Implemented by the client of ResourceDispatcherHost to receive messages in | 47 // Implemented by the client of ResourceDispatcherHost to receive messages in |
| 47 // response to a resource load. The messages are intended to be forwarded to | 48 // response to a resource load. The messages are intended to be forwarded to |
| 48 // the ResourceDispatcher in the child process via an IPC channel that the | 49 // the ResourceDispatcher in the child process via an IPC channel that the |
| 49 // client manages. | 50 // client manages. |
| 50 // | 51 // |
| 51 // NOTE: This class unfortunately cannot be named 'Delegate' because that | 52 // NOTE: This class unfortunately cannot be named 'Delegate' because that |
| 52 // conflicts with the name of ResourceDispatcherHost's base class. | 53 // conflicts with the name of ResourceDispatcherHost's base class. |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 return safe_browsing_; | 292 return safe_browsing_; |
| 292 } | 293 } |
| 293 | 294 |
| 294 WebKitThread* webkit_thread() const { | 295 WebKitThread* webkit_thread() const { |
| 295 return webkit_thread_.get(); | 296 return webkit_thread_.get(); |
| 296 } | 297 } |
| 297 | 298 |
| 298 MessageLoop* ui_loop() const { return ui_loop_; } | 299 MessageLoop* ui_loop() const { return ui_loop_; } |
| 299 | 300 |
| 300 // Called when the onunload handler for a cross-site request has finished. | 301 // Called when the onunload handler for a cross-site request has finished. |
| 301 void OnClosePageACK(int process_id, int request_id); | 302 void OnClosePageACK(const ViewMsg_ClosePage_Params& params); |
| 302 | 303 |
| 303 // Force cancels any pending requests for the given process. | 304 // Force cancels any pending requests for the given process. |
| 304 void CancelRequestsForProcess(int process_id); | 305 void CancelRequestsForProcess(int process_id); |
| 305 | 306 |
| 306 // Force cancels any pending requests for the given route id. This method | 307 // Force cancels any pending requests for the given route id. This method |
| 307 // acts like CancelRequestsForProcess when route_id is -1. | 308 // acts like CancelRequestsForProcess when route_id is -1. |
| 308 void CancelRequestsForRoute(int process_id, int route_id); | 309 void CancelRequestsForRoute(int process_id, int route_id); |
| 309 | 310 |
| 310 // URLRequest::Delegate | 311 // URLRequest::Delegate |
| 311 virtual void OnReceivedRedirect(URLRequest* request, | 312 virtual void OnReceivedRedirect(URLRequest* request, |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 // Used during IPC message dispatching so that the handlers can get a pointer | 576 // Used during IPC message dispatching so that the handlers can get a pointer |
| 576 // to the source of the message. | 577 // to the source of the message. |
| 577 Receiver* receiver_; | 578 Receiver* receiver_; |
| 578 | 579 |
| 579 static bool g_is_http_prioritization_enabled; | 580 static bool g_is_http_prioritization_enabled; |
| 580 | 581 |
| 581 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 582 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 582 }; | 583 }; |
| 583 | 584 |
| 584 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 585 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |