summaryrefslogtreecommitdiffstats
path: root/webkit/glue/glue_util.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 18:45:04 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 18:45:04 +0000
commitf92eb0034a4b0a8249f739df38b82add5e36044f (patch)
treed7749b8bf473f61d86a50ce04736950d1862c574 /webkit/glue/glue_util.h
parentb72eb73e72040cdaaa8957ca7a7417f9b89843fe (diff)
downloadchromium_src-f92eb0034a4b0a8249f739df38b82add5e36044f.zip
chromium_src-f92eb0034a4b0a8249f739df38b82add5e36044f.tar.gz
chromium_src-f92eb0034a4b0a8249f739df38b82add5e36044f.tar.bz2
Start using WebURLLoader, et. al. from the WebKit API.
Moves our ResourceHandle to webkit/api/src/ResourceHandle.cpp from webkit/glue/resource_handle_impl.cc. A portion of resource_handle_impl.cc was moved into weburlloader_impl.{h,cc}, which now contains our implementation of WebURLLoader. The annoying parts of this CL involve WebPluginImpl. I had to convert it over to using WebURLLoader instead of ResourceHandle so that MultipartResourceDelegate can be shared. There is some complexity in WebURLRequest / WebURLResponse to make it cheap to wrap a ResourceRequest / ResourceResponse. I think this is worth it since there is a lot of conversion between the two types. Originally reviewed here: http://codereview.chromium.org/113928 BUG=10038 TEST=covered by existing tests R=dglazkov Review URL: http://codereview.chromium.org/118438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/glue_util.h')
-rw-r--r--webkit/glue/glue_util.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/webkit/glue/glue_util.h b/webkit/glue/glue_util.h
index 4bcebad..553802c 100644
--- a/webkit/glue/glue_util.h
+++ b/webkit/glue/glue_util.h
@@ -17,7 +17,9 @@ class IntPoint;
class IntRect;
class IntSize;
class KURL;
+class ResourceResponse;
class String;
+struct ResourceRequest;
}
namespace WebKit {
@@ -25,6 +27,8 @@ class WebCString;
class WebDragData;
class WebString;
class WebURL;
+class WebURLRequest;
+class WebURLResponse;
struct WebPoint;
struct WebRect;
struct WebSize;
@@ -68,6 +72,10 @@ WebCore::String WebStringToString(const WebKit::WebString& str);
WebKit::WebCString CStringToWebCString(const WebCore::CString& str);
WebCore::CString WebCStringToCString(const WebKit::WebCString& str);
+// std::string <-> WebString. Conversion to/from UTF-8.
+WebKit::WebString StdStringToWebString(const std::string& str);
+std::string WebStringToStdString(const WebKit::WebString& str);
+
FilePath::StringType StringToFilePathString(const WebCore::String& str);
WebCore::String FilePathStringToString(const FilePath::StringType& str);
@@ -99,6 +107,18 @@ WebKit::WebDragData ChromiumDataObjectToWebDragData(
WTF::PassRefPtr<WebCore::ChromiumDataObject> WebDragDataToChromiumDataObject(
const WebKit::WebDragData&);
+// Exposes the ResourceRequest contained by a WebURLRequest
+WebCore::ResourceRequest* WebURLRequestToMutableResourceRequest(
+ WebKit::WebURLRequest* req);
+const WebCore::ResourceRequest* WebURLRequestToResourceRequest(
+ const WebKit::WebURLRequest* req);
+
+// Exposes the ResourceResponse contained by a WebURLResponse
+WebCore::ResourceResponse* WebURLResponseToMutableResourceResponse(
+ WebKit::WebURLResponse* resp);
+const WebCore::ResourceResponse* WebURLResponseToResourceResponse(
+ const WebKit::WebURLResponse* resp);
+
} // namespace webkit_glue
#endif // #ifndef WEBKIT_GLUE_GLUE_UTIL_H_