diff options
author | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-27 00:56:45 +0000 |
---|---|---|
committer | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-27 00:56:45 +0000 |
commit | a9344092dd13f47783119c292bc9b77a3cf71662 (patch) | |
tree | d11a0c901b0544e4fbbd1d32a3220cbcc2f83ca8 /content/common/resource_messages.h | |
parent | 5d11c136e0b8a46d1dc0d0afe4d6f455cbb8bd15 (diff) | |
download | chromium_src-a9344092dd13f47783119c292bc9b77a3cf71662.zip chromium_src-a9344092dd13f47783119c292bc9b77a3cf71662.tar.gz chromium_src-a9344092dd13f47783119c292bc9b77a3cf71662.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/12330060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/resource_messages.h')
-rw-r--r-- | content/common/resource_messages.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h index e065419..abe4964 100644 --- a/content/common/resource_messages.h +++ b/content/common/resource_messages.h @@ -13,6 +13,7 @@ #include "content/public/common/common_param_traits.h" #include "content/public/common/resource_response.h" #include "ipc/ipc_message_macros.h" +#include "net/base/request_priority.h" #include "webkit/glue/resource_request_body.h" #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ @@ -147,7 +148,7 @@ IPC_STRUCT_BEGIN(ResourceHostMsg_Request) IPC_STRUCT_MEMBER(ResourceType::Type, resource_type) // The priority of this request. - IPC_STRUCT_MEMBER(WebKit::WebURLRequest::Priority, priority) + IPC_STRUCT_MEMBER(net::RequestPriority, priority) // Used by plugin->browser requests to get the correct net::URLRequestContext. IPC_STRUCT_MEMBER(uint32, request_context) @@ -300,3 +301,8 @@ IPC_MESSAGE_ROUTED1(ResourceHostMsg_UploadProgress_ACK, // Sent when the renderer process deletes a resource loader. IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, int /* request_id */) + +// Sent by the renderer when a resource request changes priority. +IPC_MESSAGE_ROUTED2(ResourceHostMsg_DidChangePriority, + int /* request_id */, + net::RequestPriority) |