| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 class CrossSiteResourceHandler; | 31 class CrossSiteResourceHandler; |
| 32 class DownloadFileManager; | 32 class DownloadFileManager; |
| 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 UserScriptListener; |
| 40 class URLRequestContext; | 41 class URLRequestContext; |
| 41 class WebKitThread; | 42 class WebKitThread; |
| 42 struct ViewHostMsg_Resource_Request; | 43 struct ViewHostMsg_Resource_Request; |
| 43 struct ViewMsg_ClosePage_Params; | 44 struct ViewMsg_ClosePage_Params; |
| 44 | 45 |
| 45 class ResourceDispatcherHost : public URLRequest::Delegate { | 46 class ResourceDispatcherHost : public URLRequest::Delegate { |
| 46 public: | 47 public: |
| 47 // Implemented by the client of ResourceDispatcherHost to receive messages in | 48 // Implemented by the client of ResourceDispatcherHost to receive messages in |
| 48 // response to a resource load. The messages are intended to be forwarded to | 49 // response to a resource load. The messages are intended to be forwarded to |
| 49 // the ResourceDispatcher in the child process via an IPC channel that the | 50 // the ResourceDispatcher in the child process via an IPC channel that the |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 | 531 |
| 531 // We own the download file writing thread and manager | 532 // We own the download file writing thread and manager |
| 532 scoped_refptr<DownloadFileManager> download_file_manager_; | 533 scoped_refptr<DownloadFileManager> download_file_manager_; |
| 533 | 534 |
| 534 // Determines whether a download is allowed. | 535 // Determines whether a download is allowed. |
| 535 scoped_refptr<DownloadRequestManager> download_request_manager_; | 536 scoped_refptr<DownloadRequestManager> download_request_manager_; |
| 536 | 537 |
| 537 // We own the save file manager. | 538 // We own the save file manager. |
| 538 scoped_refptr<SaveFileManager> save_file_manager_; | 539 scoped_refptr<SaveFileManager> save_file_manager_; |
| 539 | 540 |
| 541 scoped_refptr<UserScriptListener> user_script_listener_; |
| 542 |
| 540 scoped_refptr<SafeBrowsingService> safe_browsing_; | 543 scoped_refptr<SafeBrowsingService> safe_browsing_; |
| 541 | 544 |
| 542 // We own the WebKit thread and see to its destruction. | 545 // We own the WebKit thread and see to its destruction. |
| 543 scoped_ptr<WebKitThread> webkit_thread_; | 546 scoped_ptr<WebKitThread> webkit_thread_; |
| 544 | 547 |
| 545 // Request ID for browser initiated requests. request_ids generated by | 548 // Request ID for browser initiated requests. request_ids generated by |
| 546 // child processes are counted up from 0, while browser created requests | 549 // child processes are counted up from 0, while browser created requests |
| 547 // start at -2 and go down from there. (We need to start at -2 because -1 is | 550 // start at -2 and go down from there. (We need to start at -2 because -1 is |
| 548 // used as a special value all over the resource_dispatcher_host for | 551 // used as a special value all over the resource_dispatcher_host for |
| 549 // uninitialized variables.) This way, we no longer have the unlikely (but | 552 // uninitialized variables.) This way, we no longer have the unlikely (but |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 // Used during IPC message dispatching so that the handlers can get a pointer | 585 // Used during IPC message dispatching so that the handlers can get a pointer |
| 583 // to the source of the message. | 586 // to the source of the message. |
| 584 Receiver* receiver_; | 587 Receiver* receiver_; |
| 585 | 588 |
| 586 static bool g_is_http_prioritization_enabled; | 589 static bool g_is_http_prioritization_enabled; |
| 587 | 590 |
| 588 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 591 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
| 589 }; | 592 }; |
| 590 | 593 |
| 591 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 594 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |