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-03-31 18:08:40 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 18:08:40 +0000
commit4f999134a2e270792abc8b5ac6ad70aa500dcef4 (patch)
treee90d972ee2f29d10d6e22220d54cd142925bb2bb /webkit/glue/glue_util.h
parentb5cd43eb964e452d7a0245b9e14bd9a9d1e89b4a (diff)
downloadchromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.zip
chromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.tar.gz
chromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.tar.bz2
Use WebScriptSource and WebFindInPageRequest from the WebKit API.
This change introduces some helper functions in glue_util.cc for efficient conversion between WebString and WebCore::String when inside the implementation of webkit/glue. This is a temporary change since eventually all code in glue that uses WebCore will be moved into the WebKit API implementation. Instead of making the Chrome automation use WebFindInPageRequest, I decided to introduce AutomationMsg_Find_Params as a copy of the old FindInPageRequest structure. That preserves the IPC protocol and avoids making the automation library depend on WebKit. R=dglazkov Review URL: http://codereview.chromium.org/57060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/glue_util.h')
-rw-r--r--webkit/glue/glue_util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/glue/glue_util.h b/webkit/glue/glue_util.h
index adbaffc..5c9f90b 100644
--- a/webkit/glue/glue_util.h
+++ b/webkit/glue/glue_util.h
@@ -18,7 +18,9 @@ class String;
}
namespace WebKit {
+class WebCString;
class WebString;
+class WebURL;
}
namespace gfx {
@@ -47,6 +49,14 @@ WebCore::String String16ToString(const string16& str);
std::string StringToStdString(const WebCore::String& str);
WebCore::String StdStringToString(const std::string& str);
+// WebCore::String <-> WebString. No charset conversion.
+WebKit::WebString StringToWebString(const WebCore::String& str);
+WebCore::String WebStringToString(const WebKit::WebString& str);
+
+// WebCore::CString <-> WebCString. No charset conversion.
+WebKit::WebCString CStringToWebCString(const WebCore::CString& str);
+WebCore::CString WebCStringToCString(const WebKit::WebCString& str);
+
FilePath::StringType StringToFilePathString(const WebCore::String& str);
WebCore::String FilePathStringToString(const FilePath::StringType& str);
@@ -57,6 +67,9 @@ GURL KURLToGURL(const WebCore::KURL& url);
WebCore::KURL GURLToKURL(const GURL& url);
GURL StringToGURL(const WebCore::String& spec);
+WebKit::WebURL KURLToWebURL(const WebCore::KURL& url);
+WebCore::KURL WebURLToKURL(const WebKit::WebURL& url);
+
gfx::Rect FromIntRect(const WebCore::IntRect& r);
WebCore::IntRect ToIntRect(const gfx::Rect& r);