summaryrefslogtreecommitdiffstats
path: root/webkit/glue/resource_loader_bridge.h
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 19:47:21 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 19:47:21 +0000
commit319d9e6f29cc2d27c0f72ce701d905d2402c350a (patch)
tree5d637ba43b9aeed5c925e694e50aa251230c0b92 /webkit/glue/resource_loader_bridge.h
parent22f21125f11953e1022f5e75e560c1af9484503e (diff)
downloadchromium_src-319d9e6f29cc2d27c0f72ce701d905d2402c350a.zip
chromium_src-319d9e6f29cc2d27c0f72ce701d905d2402c350a.tar.gz
chromium_src-319d9e6f29cc2d27c0f72ce701d905d2402c350a.tar.bz2
Reduce the amount of included header files. Vast change like in "Oh God! This revision changes half of the source files!".
Review URL: http://codereview.chromium.org/20378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9958 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/resource_loader_bridge.h')
-rw-r--r--webkit/glue/resource_loader_bridge.h55
1 files changed, 30 insertions, 25 deletions
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index ce09b21..2698cb4 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -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 @@ class ResourceLoaderBridge {
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 @@ class ResourceLoaderBridge {
// 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 @@ class ResourceLoaderBridge {
// 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 @@ class ResourceLoaderBridge {
protected:
// construction must go through Create()
- ResourceLoaderBridge() {}
+ ResourceLoaderBridge();
private:
DISALLOW_EVIL_CONSTRUCTORS(ResourceLoaderBridge);
@@ -202,5 +208,4 @@ class ResourceLoaderBridge {
} // namespace webkit_glue
-#endif // RESOURCE_LOADER_BRIDGE__
-
+#endif // RESOURCE_LOADER_BRIDGE_