diff options
Diffstat (limited to 'webkit/glue/webkit_glue.cc')
-rw-r--r-- | webkit/glue/webkit_glue.cc | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index 70f17fd..ae783e3 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -31,6 +31,8 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "SharedBuffer.h" MSVC_POP_WARNING(); +#include "WebString.h" + #undef LOG #include "webkit/glue/webkit_glue.h" @@ -66,7 +68,6 @@ void SetRecordPlaybackMode(bool value) { #endif } - void SetShouldExposeGCController(bool enable) { #if USE(V8) WebCore::ScriptController::setShouldExposeGCController(enable); @@ -276,6 +277,22 @@ bool DecodeImage(const std::string& image_data, SkBitmap* image) { #endif } +FilePath::StringType WebStringToFilePathString(const WebKit::WebString& str) { +#if defined(OS_POSIX) + return base::SysWideToNativeMB(UTF16ToWideHack(str)); +#elif defined(OS_WIN) + return UTF16ToWideHack(str); +#endif +} + +WebKit::WebString FilePathStringToWebString(const FilePath::StringType& str) { +#if defined(OS_POSIX) + return WideToUTF16Hack(base::SysNativeMBToWide(str)); +#elif defined(OS_WIN) + return WideToUTF16Hack(str); +#endif +} + // Convert from WebKit types to Glue types and notify the embedder. This should // not perform complex processing since it may be called a lot. void NotifyFormStateChanged(const WebCore::Document* document) { @@ -408,21 +425,6 @@ const std::string& GetUserAgent(const GURL& url) { return g_user_agent->user_agent; } -void NotifyJSOutOfMemory(WebCore::Frame* frame) { - if (!frame) - return; - - // Dispatch to the delegate of the view that owns the frame. - WebFrame* webframe = WebFrameImpl::FromFrame(frame); - WebView* webview = webframe->GetView(); - if (!webview) - return; - WebViewDelegate* delegate = webview->GetDelegate(); - if (!delegate) - return; - delegate->JSOutOfMemory(); -} - void SetForcefullyTerminatePluginProcess(bool value) { if (IsPluginRunningInRendererProcess()) { // Ignore this quirk when the plugins are not running in their own process. |