summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webkit_glue.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-02 23:24:06 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-02 23:24:06 +0000
commitf499e170777ed789fbe58f6697e3b5a46fa8deda (patch)
tree439601b6410c9cb2367644714ced54f1a742f911 /webkit/glue/webkit_glue.cc
parent9a0737126e932380b53a2c1dda5364f67871f1f7 (diff)
downloadchromium_src-f499e170777ed789fbe58f6697e3b5a46fa8deda.zip
chromium_src-f499e170777ed789fbe58f6697e3b5a46fa8deda.tar.gz
chromium_src-f499e170777ed789fbe58f6697e3b5a46fa8deda.tar.bz2
Minor cleanup in webkit/glue:
- created dom_operations_private.h for things that mention WebCore types that are only needed within webkit/glue. - moved contents of webkit_glue.h to the right locations. - moved FilePath::StringType <-> WebString conversion out of glue_util into webkit_glue since it is part of the public API. - minimized includes in webkit_glue.h R=dglazkov Review URL: http://codereview.chromium.org/27351 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.cc')
-rw-r--r--webkit/glue/webkit_glue.cc34
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.