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