diff options
Diffstat (limited to 'webkit/glue/glue_util.cc')
-rw-r--r-- | webkit/glue/glue_util.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/webkit/glue/glue_util.cc b/webkit/glue/glue_util.cc index 113d413..359eb40 100644 --- a/webkit/glue/glue_util.cc +++ b/webkit/glue/glue_util.cc @@ -16,8 +16,9 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "KURL.h" MSVC_POP_WARNING(); -#undef LOG +#include "WebString.h" +#undef LOG #include "base/compiler_specific.h" #include "base/gfx/rect.h" #include "base/string_piece.h" @@ -98,6 +99,22 @@ WebCore::String FilePathStringToString(const FilePath::StringType& str) { #endif } +FilePath::StringType WebStringToFilePathString(const WebKit::WebString& str) { +#if defined(OS_POSIX) + return base::SysWideToNativeMB(UTF16ToWide(str)); +#elif defined(OS_WIN) + return UTF16ToWide(str); +#endif +} + +WebKit::WebString FilePathStringToWebString(const FilePath::StringType& str) { +#if defined(OS_POSIX) + return WideToUTF16(base::SysNativeMBToWide(str)); +#elif defined(OS_WIN) + return WideToUTF16(str); +#endif +} + // URL conversions ------------------------------------------------------------- GURL KURLToGURL(const WebCore::KURL& url) { |