Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Unified Diff: webkit/glue/resource_loader_bridge.h

Issue 3053009: Pepper stream-to-file plumbing.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/pepper_url_response_info.cc ('k') | webkit/glue/resource_loader_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/resource_loader_bridge.h
===================================================================
--- webkit/glue/resource_loader_bridge.h (revision 53197)
+++ webkit/glue/resource_loader_bridge.h (working copy)
@@ -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 @@
class HttpResponseHeaders;
}
-class FilePath;
-
namespace webkit_glue {
class ResourceLoaderBridge {
@@ -84,6 +83,10 @@
// 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 @@
// 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 @@
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;
« no previous file with comments | « webkit/glue/plugins/pepper_url_response_info.cc ('k') | webkit/glue/resource_loader_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698