summaryrefslogtreecommitdiffstats
path: root/webkit/glue/resource_loader_bridge.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-22 20:52:49 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-22 20:52:49 +0000
commitbb55162dcf0c1100e27b1088125e3ad5175a6621 (patch)
treeb3b5049237b3f5889c6a681cc4104beff8003de6 /webkit/glue/resource_loader_bridge.h
parentad5de0edcc8f43260e23c8dc0e300133072b5c68 (diff)
downloadchromium_src-bb55162dcf0c1100e27b1088125e3ad5175a6621.zip
chromium_src-bb55162dcf0c1100e27b1088125e3ad5175a6621.tar.gz
chromium_src-bb55162dcf0c1100e27b1088125e3ad5175a6621.tar.bz2
Pepper stream-to-file plumbing.
This just hooks up the renderer side of the IPC. R=brettw BUG=49789 TEST=none Review URL: http://codereview.chromium.org/3053009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53378 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/resource_loader_bridge.h')
-rw-r--r--webkit/glue/resource_loader_bridge.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index e66181f5ec..7d85bd3 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -21,6 +21,7 @@
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
#endif
+#include "base/file_path.h"
#include "base/platform_file.h"
#include "base/ref_counted.h"
#include "base/time.h"
@@ -32,8 +33,6 @@ namespace net {
class HttpResponseHeaders;
}
-class FilePath;
-
namespace webkit_glue {
class ResourceLoaderBridge {
@@ -84,6 +83,10 @@ class ResourceLoaderBridge {
// Used to associated the bridge with a frame's network context.
int routing_id;
+
+ // If true, then the response body will be downloaded to a file and the
+ // path to that file will be provided in ResponseInfo::download_file_path.
+ bool download_to_file;
};
// Structure containing timing information for the request. It addresses
@@ -191,6 +194,11 @@ class ResourceLoaderBridge {
// Tools.
LoadTimingInfo load_timing;
+ // The path to a file that will contain the response body. It may only
+ // contain a portion of the response body at the time that the ResponseInfo
+ // becomes available.
+ FilePath download_file_path;
+
// True if the response was delivered using SPDY.
bool was_fetched_via_spdy;
@@ -258,6 +266,12 @@ class ResourceLoaderBridge {
virtual void OnReceivedResponse(const ResponseInfo& info,
bool content_filtered) = 0;
+ // Called when a chunk of response data is downloaded. This method may be
+ // called multiple times or not at all if an error occurs. This method is
+ // only called if RequestInfo::download_to_file was set to true, and in
+ // that case, OnReceivedData will not be called.
+ virtual void OnDownloadedData(int len) = 0;
+
// Called when a chunk of response data is available. This method may
// be called multiple times or not at all if an error occurs.
virtual void OnReceivedData(const char* data, int len) = 0;