| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 SaveFileManager* save_file_manager() const { | 286 SaveFileManager* save_file_manager() const { |
| 287 return save_file_manager_; | 287 return save_file_manager_; |
| 288 } | 288 } |
| 289 | 289 |
| 290 SafeBrowsingService* safe_browsing_service() const { | 290 SafeBrowsingService* safe_browsing_service() const { |
| 291 return safe_browsing_; | 291 return safe_browsing_; |
| 292 } | 292 } |
| 293 | 293 |
| 294 WebKitThread* webkit_thread() const { | 294 WebKitThread* webkit_thread() const { |
| 295 return webkit_thread_; | 295 return webkit_thread_.get(); |
| 296 } | 296 } |
| 297 | 297 |
| 298 MessageLoop* ui_loop() const { return ui_loop_; } | 298 MessageLoop* ui_loop() const { return ui_loop_; } |
| 299 | 299 |
| 300 // Called when the onunload handler for a cross-site request has finished. | 300 // Called when the onunload handler for a cross-site request has finished. |
| 301 void OnClosePageACK(int process_id, int request_id); | 301 void OnClosePageACK(int process_id, int request_id); |
| 302 | 302 |
| 303 // Force cancels any pending requests for the given process. | 303 // Force cancels any pending requests for the given process. |
| 304 void CancelRequestsForProcess(int process_id); | 304 void CancelRequestsForProcess(int process_id); |
| 305 | 305 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 scoped_refptr<DownloadFileManager> download_file_manager_; | 522 scoped_refptr<DownloadFileManager> download_file_manager_; |
| 523 | 523 |
| 524 // Determines whether a download is allowed. | 524 // Determines whether a download is allowed. |
| 525 scoped_refptr<DownloadRequestManager> download_request_manager_; | 525 scoped_refptr<DownloadRequestManager> download_request_manager_; |
| 526 | 526 |
| 527 // We own the save file manager. | 527 // We own the save file manager. |
| 528 scoped_refptr<SaveFileManager> save_file_manager_; | 528 scoped_refptr<SaveFileManager> save_file_manager_; |
| 529 | 529 |
| 530 scoped_refptr<SafeBrowsingService> safe_browsing_; | 530 scoped_refptr<SafeBrowsingService> safe_browsing_; |
| 531 | 531 |
| 532 scoped_refptr<WebKitThread> webkit_thread_; | 532 // We own the WebKit thread and see to its destruction. |
| 533 scoped_ptr<WebKitThread> webkit_thread_; |
| 533 | 534 |
| 534 // Request ID for browser initiated requests. request_ids generated by | 535 // Request ID for browser initiated requests. request_ids generated by |
| 535 // child processes are counted up from 0, while browser created requests | 536 // child processes are counted up from 0, while browser created requests |
| 536 // start at -2 and go down from there. (We need to start at -2 because -1 is | 537 // start at -2 and go down from there. (We need to start at -2 because -1 is |
| 537 // used as a special value all over the resource_dispatcher_host for | 538 // used as a special value all over the resource_dispatcher_host for |
| 538 // uninitialized variables.) This way, we no longer have the unlikely (but | 539 // uninitialized variables.) This way, we no longer have the unlikely (but |
| 539 // observed in the real world!) event where we have two requests with the same | 540 // observed in the real world!) event where we have two requests with the same |
| 540 // request_id_. | 541 // request_id_. |
| 541 int request_id_; | 542 int request_id_; |
| 542 | 543 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 573 // Used during IPC message dispatching so that the handlers can get a pointer | 574 // Used during IPC message dispatching so that the handlers can get a pointer |
| 574 // to the source of the message. | 575 // to the source of the message. |
| 575 Receiver* receiver_; | 576 Receiver* receiver_; |
| 576 | 577 |
| 577 static bool g_is_http_prioritization_enabled; | 578 static bool g_is_http_prioritization_enabled; |
| 578 | 579 |
| 579 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 580 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 580 }; | 581 }; |
| 581 | 582 |
| 582 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 583 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |