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, |
112 int process_unique_id, | 113 int process_unique_id, |
113 int route_id, | 114 int route_id, |
114 URLRequestContext* request_context); | 115 URLRequestContext* request_context); |
115 | 116 |
116 // Initiates a save file from the browser process (as opposed to a resource | 117 // Initiates a save file from the browser process (as opposed to a resource |
117 // request from the renderer or another child process). | 118 // request from the renderer or another child process). |
118 void BeginSaveFile(const GURL& url, | 119 void BeginSaveFile(const GURL& url, |
119 const GURL& referrer, | 120 const GURL& referrer, |
120 int process_unique_id, | 121 int process_unique_id, |
121 int route_id, | 122 int route_id, |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 int max_outstanding_requests_cost_per_process_; | 484 int max_outstanding_requests_cost_per_process_; |
484 | 485 |
485 // Used during IPC message dispatching so that the handlers can get a pointer | 486 // Used during IPC message dispatching so that the handlers can get a pointer |
486 // to the source of the message. | 487 // to the source of the message. |
487 Receiver* receiver_; | 488 Receiver* receiver_; |
488 | 489 |
489 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 490 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
490 }; | 491 }; |
491 | 492 |
492 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 493 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |