Index: webkit/glue/resource_loader_bridge.h |
=================================================================== |
--- webkit/glue/resource_loader_bridge.h (revision 9942) |
+++ webkit/glue/resource_loader_bridge.h (working copy) |
@@ -14,26 +14,29 @@ |
// In turn, the bridge's owner on the WebKit end will implement the Peer |
// interface, which we will use to communicate notifications back. |
-#ifndef RESOURCE_LOADER_BRIDGE_H__ |
-#define RESOURCE_LOADER_BRIDGE_H__ |
+#ifndef RESOURCE_LOADER_BRIDGE_H_ |
+#define RESOURCE_LOADER_BRIDGE_H_ |
-#include <string> |
- |
-#include "base/basictypes.h" |
#include "base/ref_counted.h" |
#include "base/time.h" |
#include "googleurl/src/gurl.h" |
-#include "net/http/http_response_headers.h" |
#include "net/url_request/url_request_status.h" |
#include "webkit/glue/resource_type.h" |
class WebFrame; |
+namespace net { |
+class HttpResponseHeaders; |
+} |
+ |
namespace webkit_glue { |
class ResourceLoaderBridge { |
public: |
struct ResponseInfo { |
+ ResponseInfo(); |
+ ~ResponseInfo(); |
+ |
// The time at which the request was made that resulted in this response. |
// For cached responses, this time could be "far" in the past. |
base::Time request_time; |
@@ -60,7 +63,24 @@ |
int64 content_length; |
}; |
- // generated by the bridge. This is implemented by our custom resource loader |
+ // See the SyncLoad method declared below. (The name of this struct is not |
+ // suffixed with "Info" because it also contains the response data.) |
+ struct SyncLoadResponse : ResponseInfo { |
+ SyncLoadResponse(); |
+ ~SyncLoadResponse(); |
+ |
+ // The response status. |
+ URLRequestStatus status; |
+ |
+ // The final URL of the response. This may differ from the request URL in |
+ // the case of a server redirect. |
+ GURL url; |
+ |
+ // The response data. |
+ std::string data; |
+ }; |
+ |
+ // Generated by the bridge. This is implemented by our custom resource loader |
// within webkit. The Peer and it's bridge should have identical lifetimes |
// as they represent each end of a communication channel. |
// |
@@ -100,7 +120,7 @@ |
// use Create() for construction, but anybody can delete at any time, |
// INCLUDING during processing of callbacks. |
- virtual ~ResourceLoaderBridge() {} |
+ virtual ~ResourceLoaderBridge(); |
// Call this method to make a new instance. The method name is a HTTP-style |
// method name (e.g., "GET" or "POST"). The URL should be an absolute URL |
@@ -169,20 +189,6 @@ |
// method may only be called after a successful call to the Start method. |
virtual void SetDefersLoading(bool value) = 0; |
- // See the SyncLoad method declared below. (The name of this struct is not |
- // suffixed with "Info" because it also contains the response data.) |
- struct SyncLoadResponse : ResponseInfo { |
- // The response status. |
- URLRequestStatus status; |
- |
- // The final URL of the response. This may differ from the request URL in |
- // the case of a server redirect. |
- GURL url; |
- |
- // The response data. |
- std::string data; |
- }; |
- |
// Call this method to load the resource synchronously (i.e., in one shot). |
// This is an alternative to the Start method. Be warned that this method |
// will block the calling thread until the resource is fully downloaded or an |
@@ -194,7 +200,7 @@ |
protected: |
// construction must go through Create() |
- ResourceLoaderBridge() {} |
+ ResourceLoaderBridge(); |
private: |
DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge); |
@@ -202,5 +208,4 @@ |
} // namespace webkit_glue |
-#endif // RESOURCE_LOADER_BRIDGE__ |
- |
+#endif // RESOURCE_LOADER_BRIDGE_ |