| OLD | NEW |
| 1 // Copyright (c) 2010 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 |
| 11 | 11 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 35 class LoginHandler; | 35 class LoginHandler; |
| 36 class NotificationDetails; | 36 class NotificationDetails; |
| 37 class PluginService; | 37 class PluginService; |
| 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 UserScriptListener; | 44 class UserScriptListener; |
| 45 class URLRequestContext; | |
| 46 class WebKitThread; | 45 class WebKitThread; |
| 47 struct DownloadSaveInfo; | 46 struct DownloadSaveInfo; |
| 48 struct GlobalRequestID; | 47 struct GlobalRequestID; |
| 49 struct ViewHostMsg_Resource_Request; | 48 struct ViewHostMsg_Resource_Request; |
| 50 struct ViewMsg_ClosePage_Params; | 49 struct ViewMsg_ClosePage_Params; |
| 51 | 50 |
| 51 namespace net { |
| 52 class URLRequestContext; |
| 53 } // namespace net |
| 54 |
| 52 namespace webkit_blob { | 55 namespace webkit_blob { |
| 53 class DeletableFileReference; | 56 class DeletableFileReference; |
| 54 } | 57 } |
| 55 | 58 |
| 56 class ResourceDispatcherHost : public net::URLRequest::Delegate { | 59 class ResourceDispatcherHost : public net::URLRequest::Delegate { |
| 57 public: | 60 public: |
| 58 class Observer { | 61 class Observer { |
| 59 public: | 62 public: |
| 60 virtual ~Observer() {} | 63 virtual ~Observer() {} |
| 61 virtual void OnRequestStarted(ResourceDispatcherHost* resource_dispatcher, | 64 virtual void OnRequestStarted(ResourceDispatcherHost* resource_dispatcher, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 84 bool* message_was_ok); | 87 bool* message_was_ok); |
| 85 | 88 |
| 86 // Initiates a download from the browser process (as opposed to a resource | 89 // Initiates a download from the browser process (as opposed to a resource |
| 87 // request from the renderer or another child process). | 90 // request from the renderer or another child process). |
| 88 void BeginDownload(const GURL& url, | 91 void BeginDownload(const GURL& url, |
| 89 const GURL& referrer, | 92 const GURL& referrer, |
| 90 const DownloadSaveInfo& save_info, | 93 const DownloadSaveInfo& save_info, |
| 91 bool prompt_for_save_location, | 94 bool prompt_for_save_location, |
| 92 int process_unique_id, | 95 int process_unique_id, |
| 93 int route_id, | 96 int route_id, |
| 94 URLRequestContext* request_context); | 97 net::URLRequestContext* request_context); |
| 95 | 98 |
| 96 // Initiates a save file from the browser process (as opposed to a resource | 99 // Initiates a save file from the browser process (as opposed to a resource |
| 97 // request from the renderer or another child process). | 100 // request from the renderer or another child process). |
| 98 void BeginSaveFile(const GURL& url, | 101 void BeginSaveFile(const GURL& url, |
| 99 const GURL& referrer, | 102 const GURL& referrer, |
| 100 int process_unique_id, | 103 int process_unique_id, |
| 101 int route_id, | 104 int route_id, |
| 102 URLRequestContext* request_context); | 105 net::URLRequestContext* request_context); |
| 103 | 106 |
| 104 // Cancels the given request if it still exists. We ignore cancels from the | 107 // Cancels the given request if it still exists. We ignore cancels from the |
| 105 // renderer in the event of a download. | 108 // renderer in the event of a download. |
| 106 void CancelRequest(int process_unique_id, | 109 void CancelRequest(int process_unique_id, |
| 107 int request_id, | 110 int request_id, |
| 108 bool from_renderer); | 111 bool from_renderer); |
| 109 | 112 |
| 110 // Follows a deferred redirect for the given request. | 113 // Follows a deferred redirect for the given request. |
| 111 // new_first_party_for_cookies, if non-empty, is the new cookie policy URL | 114 // new_first_party_for_cookies, if non-empty, is the new cookie policy URL |
| 112 // for the redirected URL. If the cookie policy URL needs changing, pass | 115 // for the redirected URL. If the cookie policy URL needs changing, pass |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // Used during IPC message dispatching so that the handlers can get a pointer | 507 // Used during IPC message dispatching so that the handlers can get a pointer |
| 505 // to the source of the message. | 508 // to the source of the message. |
| 506 ResourceMessageFilter* filter_; | 509 ResourceMessageFilter* filter_; |
| 507 | 510 |
| 508 static bool is_prefetch_enabled_; | 511 static bool is_prefetch_enabled_; |
| 509 | 512 |
| 510 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 513 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 511 }; | 514 }; |
| 512 | 515 |
| 513 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 516 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |