| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // If it was, message_was_ok will be false iff the message was corrupt. | 102 // If it was, message_was_ok will be false iff the message was corrupt. |
| 103 bool OnMessageReceived(const IPC::Message& message, | 103 bool OnMessageReceived(const IPC::Message& message, |
| 104 Receiver* receiver, | 104 Receiver* receiver, |
| 105 bool* message_was_ok); | 105 bool* message_was_ok); |
| 106 | 106 |
| 107 // Initiates a download from the browser process (as opposed to a resource | 107 // Initiates a download from the browser process (as opposed to a resource |
| 108 // request from the renderer or another child process). | 108 // request from the renderer or another child process). |
| 109 void BeginDownload(const GURL& url, | 109 void BeginDownload(const GURL& url, |
| 110 const GURL& referrer, | 110 const GURL& referrer, |
| 111 const DownloadSaveInfo& save_info, | 111 const DownloadSaveInfo& save_info, |
| 112 bool prompt_for_save_location, | |
| 113 int process_unique_id, | 112 int process_unique_id, |
| 114 int route_id, | 113 int route_id, |
| 115 URLRequestContext* request_context); | 114 URLRequestContext* request_context); |
| 116 | 115 |
| 117 // Initiates a save file from the browser process (as opposed to a resource | 116 // Initiates a save file from the browser process (as opposed to a resource |
| 118 // request from the renderer or another child process). | 117 // request from the renderer or another child process). |
| 119 void BeginSaveFile(const GURL& url, | 118 void BeginSaveFile(const GURL& url, |
| 120 const GURL& referrer, | 119 const GURL& referrer, |
| 121 int process_unique_id, | 120 int process_unique_id, |
| 122 int route_id, | 121 int route_id, |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 int max_outstanding_requests_cost_per_process_; | 493 int max_outstanding_requests_cost_per_process_; |
| 495 | 494 |
| 496 // Used during IPC message dispatching so that the handlers can get a pointer | 495 // Used during IPC message dispatching so that the handlers can get a pointer |
| 497 // to the source of the message. | 496 // to the source of the message. |
| 498 Receiver* receiver_; | 497 Receiver* receiver_; |
| 499 | 498 |
| 500 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 499 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 501 }; | 500 }; |
| 502 | 501 |
| 503 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 502 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |