diff options
author | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-20 02:32:53 +0000 |
---|---|---|
committer | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-20 02:32:53 +0000 |
commit | 2d5bba18947058986654c1fa85ee3abe196e0121 (patch) | |
tree | 3b8707e08196185dfadd1cfde8dd56c824ba7ab0 /content/browser/loader/resource_dispatcher_host_impl.h | |
parent | 947cc5b22e65135dd88f84316ac419dd8c94e1b0 (diff) | |
download | chromium_src-2d5bba18947058986654c1fa85ee3abe196e0121.zip chromium_src-2d5bba18947058986654c1fa85ee3abe196e0121.tar.gz chromium_src-2d5bba18947058986654c1fa85ee3abe196e0121.tar.bz2 |
Add a ResourceScheduler to ResourceDispatcherHost.
For this CL, ResourceScheduler mimicks WebKit's ResourceLoadScheduler. That means only JS and CSS are loaded before first paint.
Eventually, we will improve it to do things like:
- Lower priority of background tabs.
- Preconnect for low priority resources.
- Dynamically adapt scheduling to the user's connection.
- Experiment with other scheduling ideas.
BUG=157763
Review URL: https://chromiumcodereview.appspot.com/11270027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/loader/resource_dispatcher_host_impl.h')
-rw-r--r-- | content/browser/loader/resource_dispatcher_host_impl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h index edffcf7..0627227 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.h +++ b/content/browser/loader/resource_dispatcher_host_impl.h @@ -27,6 +27,7 @@ #include "content/browser/download/download_resource_handler.h" #include "content/browser/loader/resource_loader.h" #include "content/browser/loader/resource_loader_delegate.h" +#include "content/browser/loader/resource_scheduler.h" #include "content/common/content_export.h" #include "content/public/browser/child_process_data.h" #include "content/public/browser/download_id.h" @@ -217,6 +218,8 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request); + ResourceScheduler* scheduler() { return scheduler_.get(); } + private: FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, TestBlockedRequestsProcessDies); @@ -256,6 +259,9 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl int* render_process_host_id, int* render_view_host_id); + // An init helper that runs on the IO thread. + void OnInit(); + // A shutdown helper that runs on the IO thread. void OnShutdown(); @@ -429,6 +435,8 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl ObserverList<ResourceMessageDelegate>*> DelegateMap; DelegateMap delegate_map_; + scoped_ptr<ResourceScheduler> scheduler_; + DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); }; |