diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 20:06:57 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 20:06:57 +0000 |
commit | 363347b61871d82d0f84d14d5a24288ac79eddc3 (patch) | |
tree | 5cfc6dc4c874e9d23d3fc66ae4b9294bf549921b /chrome/common/resource_dispatcher.cc | |
parent | cc7948aeb5fe21af08a2d5e868c0087ded0d244a (diff) | |
download | chromium_src-363347b61871d82d0f84d14d5a24288ac79eddc3.zip chromium_src-363347b61871d82d0f84d14d5a24288ac79eddc3.tar.gz chromium_src-363347b61871d82d0f84d14d5a24288ac79eddc3.tar.bz2 |
Highlights of changes:
1. Added entry to ResourceResponseHead so that it contains
either a base::PlatformFile (OS_WIN) or
base::FileDescriptor (OS_POSIX) for passing the file
handle from browser to renderer process.
2. Also added IPC messages for reporting download progress
and ACK message for it. ResourceLoaderBridge::Peer::OnDownloadProgress
is added so that the peer is notified of the download
progress in the renderer process.
3. Load flag to kick start the resource loading for media
files. LOAD_MEDIA_RESOURCE is added so that
ResourceDispatcherHost knows how to use a different
ResourceHandler for handling media resource request.
Review URL: http://codereview.chromium.org/27168
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11661 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/resource_dispatcher.cc')
-rw-r--r-- | chrome/common/resource_dispatcher.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc index 61c5013..32f15b1 100644 --- a/chrome/common/resource_dispatcher.cc +++ b/chrome/common/resource_dispatcher.cc @@ -275,6 +275,13 @@ bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) { return true; } +void ResourceDispatcher::OnDownloadProgress( + int request_id, int64 position, int64 size) { + // TODO(hclam): delegate this message to + // ResourceLoaderBridge::Peer::OnDownloadProgress and send an ACK message + // back to ResourceDispatcherHost. +} + void ResourceDispatcher::OnUploadProgress( const IPC::Message& message, int request_id, int64 position, int64 size) { PendingRequestList::iterator it = pending_requests_.find(request_id); @@ -453,6 +460,7 @@ void ResourceDispatcher::SetDefersLoading(int request_id, bool value) { void ResourceDispatcher::DispatchMessage(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(ResourceDispatcher, message) IPC_MESSAGE_HANDLER(ViewMsg_Resource_UploadProgress, OnUploadProgress) + IPC_MESSAGE_HANDLER(ViewMsg_Resource_DownloadProgress, OnDownloadProgress) IPC_MESSAGE_HANDLER(ViewMsg_Resource_ReceivedResponse, OnReceivedResponse) IPC_MESSAGE_HANDLER(ViewMsg_Resource_ReceivedRedirect, OnReceivedRedirect) IPC_MESSAGE_HANDLER(ViewMsg_Resource_DataReceived, OnReceivedData) @@ -502,6 +510,7 @@ webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge( bool ResourceDispatcher::IsResourceMessage(const IPC::Message& message) const { switch (message.type()) { + case ViewMsg_Resource_DownloadProgress::ID: case ViewMsg_Resource_UploadProgress::ID: case ViewMsg_Resource_ReceivedResponse::ID: case ViewMsg_Resource_ReceivedRedirect::ID: |