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 |
11 | 11 |
12 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 12 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
13 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 13 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
14 | 14 |
15 #include <map> | 15 #include <map> |
16 #include <string> | 16 #include <string> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "base/basictypes.h" | 19 #include "base/basictypes.h" |
20 #include "base/gtest_prod_util.h" | 20 #include "base/gtest_prod_util.h" |
21 #include "base/logging.h" | 21 #include "base/logging.h" |
22 #include "base/observer_list.h" | 22 #include "base/observer_list.h" |
23 #include "base/process.h" | 23 #include "base/process.h" |
24 #include "base/timer.h" | 24 #include "base/timer.h" |
25 #include "chrome/common/child_process_info.h" | 25 #include "chrome/common/child_process_info.h" |
26 #include "chrome/browser/privacy_blacklist/blacklist_interceptor.h" | |
27 #include "chrome/browser/renderer_host/resource_queue.h" | 26 #include "chrome/browser/renderer_host/resource_queue.h" |
28 #include "ipc/ipc_message.h" | 27 #include "ipc/ipc_message.h" |
29 #include "net/url_request/url_request.h" | 28 #include "net/url_request/url_request.h" |
30 #include "webkit/glue/resource_type.h" | 29 #include "webkit/glue/resource_type.h" |
31 | 30 |
32 class CrossSiteResourceHandler; | 31 class CrossSiteResourceHandler; |
33 class DownloadFileManager; | 32 class DownloadFileManager; |
34 class DownloadRequestManager; | 33 class DownloadRequestManager; |
35 class LoginHandler; | 34 class LoginHandler; |
36 class PluginService; | 35 class PluginService; |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 427 |
429 // We own the download file writing thread and manager | 428 // We own the download file writing thread and manager |
430 scoped_refptr<DownloadFileManager> download_file_manager_; | 429 scoped_refptr<DownloadFileManager> download_file_manager_; |
431 | 430 |
432 // Determines whether a download is allowed. | 431 // Determines whether a download is allowed. |
433 scoped_refptr<DownloadRequestManager> download_request_manager_; | 432 scoped_refptr<DownloadRequestManager> download_request_manager_; |
434 | 433 |
435 // We own the save file manager. | 434 // We own the save file manager. |
436 scoped_refptr<SaveFileManager> save_file_manager_; | 435 scoped_refptr<SaveFileManager> save_file_manager_; |
437 | 436 |
438 // Handles requests blocked by privacy blacklists. | |
439 BlacklistInterceptor blacklist_interceptor_; | |
440 | |
441 scoped_refptr<UserScriptListener> user_script_listener_; | 437 scoped_refptr<UserScriptListener> user_script_listener_; |
442 | 438 |
443 scoped_refptr<SafeBrowsingService> safe_browsing_; | 439 scoped_refptr<SafeBrowsingService> safe_browsing_; |
444 | 440 |
445 scoped_ptr<SocketStreamDispatcherHost> socket_stream_dispatcher_host_; | 441 scoped_ptr<SocketStreamDispatcherHost> socket_stream_dispatcher_host_; |
446 | 442 |
447 // We own the WebKit thread and see to its destruction. | 443 // We own the WebKit thread and see to its destruction. |
448 scoped_ptr<WebKitThread> webkit_thread_; | 444 scoped_ptr<WebKitThread> webkit_thread_; |
449 | 445 |
450 // Request ID for browser initiated requests. request_ids generated by | 446 // Request ID for browser initiated requests. request_ids generated by |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 int max_outstanding_requests_cost_per_process_; | 481 int max_outstanding_requests_cost_per_process_; |
486 | 482 |
487 // Used during IPC message dispatching so that the handlers can get a pointer | 483 // Used during IPC message dispatching so that the handlers can get a pointer |
488 // to the source of the message. | 484 // to the source of the message. |
489 Receiver* receiver_; | 485 Receiver* receiver_; |
490 | 486 |
491 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); | 487 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
492 }; | 488 }; |
493 | 489 |
494 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ | 490 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ |
OLD | NEW |