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/browser/renderer_host/resource_handler.h | |
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/browser/renderer_host/resource_handler.h')
-rw-r--r-- | chrome/browser/renderer_host/resource_handler.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/resource_handler.h b/chrome/browser/renderer_host/resource_handler.h index 2b843f9..e0713d9 100644 --- a/chrome/browser/renderer_host/resource_handler.h +++ b/chrome/browser/renderer_host/resource_handler.h @@ -14,6 +14,11 @@ #include <string> +#include "build/build_config.h" +#if defined(OS_POSIX) +#include "base/file_descriptor_posix.h" +#endif +#include "base/platform_file.h" #include "chrome/common/filter_policy.h" #include "net/url_request/url_request_status.h" #include "webkit/glue/resource_loader_bridge.h" @@ -31,6 +36,20 @@ struct ResourceResponseHead // Specifies if the resource should be filtered before being displayed // (insecure resources can be filtered to keep the page secure). FilterPolicy::Type filter_policy; + + // A platform specific handle for a file that carries response data. This + // entry is used if the resource request is of type ResourceType::MEDIA and + // the underlying cache layer keeps the response data in a standalone file. +#if defined(OS_POSIX) + // If the response data file is available, the file handle is stored in + // response_data_file.fd, its value is base::kInvalidPlatformFileValue + // otherwise. + base::FileDescriptor response_data_file; +#elif defined(OS_WIN) + // An asynchronous file handle to the response data file, its value is + // base::kInvalidPlatformFileValue if the file is not available. + base::PlatformFile response_data_file; +#endif }; // Parameters for a synchronous resource response. |