OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards 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 10 matching lines...) Expand all Loading... |
21 #include "base/gtest_prod_util.h" | 21 #include "base/gtest_prod_util.h" |
22 #include "base/memory/linked_ptr.h" | 22 #include "base/memory/linked_ptr.h" |
23 #include "base/memory/scoped_ptr.h" | 23 #include "base/memory/scoped_ptr.h" |
24 #include "base/observer_list.h" | 24 #include "base/observer_list.h" |
25 #include "base/time.h" | 25 #include "base/time.h" |
26 #include "base/timer.h" | 26 #include "base/timer.h" |
27 #include "content/browser/download/download_resource_handler.h" | 27 #include "content/browser/download/download_resource_handler.h" |
28 #include "content/browser/loader/resource_loader.h" | 28 #include "content/browser/loader/resource_loader.h" |
29 #include "content/browser/loader/resource_loader_delegate.h" | 29 #include "content/browser/loader/resource_loader_delegate.h" |
30 #include "content/browser/loader/resource_scheduler.h" | 30 #include "content/browser/loader/resource_scheduler.h" |
| 31 #include "content/browser/loader/resource_scheduler_view_observer.h" |
31 #include "content/common/content_export.h" | 32 #include "content/common/content_export.h" |
32 #include "content/public/browser/child_process_data.h" | 33 #include "content/public/browser/child_process_data.h" |
33 #include "content/public/browser/download_id.h" | 34 #include "content/public/browser/download_id.h" |
34 #include "content/public/browser/notification_types.h" | 35 #include "content/public/browser/notification_types.h" |
35 #include "content/public/browser/resource_dispatcher_host.h" | 36 #include "content/public/browser/resource_dispatcher_host.h" |
36 #include "ipc/ipc_message.h" | 37 #include "ipc/ipc_message.h" |
37 #include "net/cookies/canonical_cookie.h" | 38 #include "net/cookies/canonical_cookie.h" |
38 #include "net/url_request/url_request.h" | 39 #include "net/url_request/url_request.h" |
39 #include "webkit/glue/resource_type.h" | 40 #include "webkit/glue/resource_type.h" |
40 | 41 |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 bool allow_cross_origin_auth_prompt_; | 429 bool allow_cross_origin_auth_prompt_; |
429 | 430 |
430 // http://crbug.com/90971 - Assists in tracking down use-after-frees on | 431 // http://crbug.com/90971 - Assists in tracking down use-after-frees on |
431 // shutdown. | 432 // shutdown. |
432 std::set<const ResourceContext*> active_resource_contexts_; | 433 std::set<const ResourceContext*> active_resource_contexts_; |
433 | 434 |
434 typedef std::map<GlobalRequestID, | 435 typedef std::map<GlobalRequestID, |
435 ObserverList<ResourceMessageDelegate>*> DelegateMap; | 436 ObserverList<ResourceMessageDelegate>*> DelegateMap; |
436 DelegateMap delegate_map_; | 437 DelegateMap delegate_map_; |
437 | 438 |
438 scoped_ptr<ResourceScheduler> scheduler_; | 439 scoped_ptr<ResourceScheduler> scheduler_; // Lives on IO thread. |
| 440 ResourceSchedulerViewObserver scheduler_observer_; // Lives on UI thread. |
439 | 441 |
440 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 442 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
441 }; | 443 }; |
442 | 444 |
443 } // namespace content | 445 } // namespace content |
444 | 446 |
445 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 447 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |