Index: android_webview/browser/aw_web_resource_response.h |
diff --git a/android_webview/browser/intercepted_request_data.h b/android_webview/browser/aw_web_resource_response.h |
similarity index 61% |
rename from android_webview/browser/intercepted_request_data.h |
rename to android_webview/browser/aw_web_resource_response.h |
index acf031d338c788eef6583ccd393d90aaf6779a31..870d88d58b26b5d201cb4d97d393ee6c5aa09cc2 100644 |
--- a/android_webview/browser/intercepted_request_data.h |
+++ b/android_webview/browser/aw_web_resource_response.h |
@@ -11,9 +11,10 @@ |
#include "base/memory/scoped_ptr.h" |
namespace net { |
+class HttpResponseHeaders; |
+class NetworkDelegate; |
class URLRequest; |
class URLRequestJob; |
-class NetworkDelegate; |
} |
namespace android_webview { |
@@ -22,28 +23,36 @@ class InputStream; |
// This class represents the Java-side data that is to be used to complete a |
// particular URLRequest. |
-class InterceptedRequestData { |
+class AwWebResourceResponse { |
public: |
- virtual ~InterceptedRequestData() {} |
+ virtual ~AwWebResourceResponse() {} |
virtual scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const = 0; |
virtual bool GetMimeType(JNIEnv* env, std::string* mime_type) const = 0; |
virtual bool GetCharset(JNIEnv* env, std::string* charset) const = 0; |
+ virtual bool GetStatusInfo(JNIEnv* env, |
+ int* status_code, |
+ std::string* reason_phrase) const = 0; |
+ // If true is returned then |headers| contain the headers, if false is |
+ // returned |headers| were not updated. |
+ virtual bool GetResponseHeaders( |
+ JNIEnv* env, |
+ net::HttpResponseHeaders* headers) const = 0; |
// This creates a URLRequestJob for the |request| wich will read data from |
- // the |intercepted_request_data| structure (instead of going to the network |
+ // the |aw_web_resource_response| structure (instead of going to the network |
// or to the cache). |
- // The newly created job takes ownership of |intercepted_request_data|. |
+ // The newly created job takes ownership of |aw_web_resource_response|. |
static net::URLRequestJob* CreateJobFor( |
- scoped_ptr<InterceptedRequestData> intercepted_request_data, |
+ scoped_ptr<AwWebResourceResponse> aw_web_resource_response, |
net::URLRequest* request, |
net::NetworkDelegate* network_delegate); |
protected: |
- InterceptedRequestData() {} |
+ AwWebResourceResponse() {} |
private: |
- DISALLOW_COPY_AND_ASSIGN(InterceptedRequestData); |
+ DISALLOW_COPY_AND_ASSIGN(AwWebResourceResponse); |
}; |
} // namespace android_webview |