summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 18:22:47 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 18:22:47 +0000
commitcaae541927bcc33ed0a90b224f614ed99e1ca893 (patch)
treea53a8562f5ccd139e80b8a460d45a44bb5de07ea /webkit
parent13402c4a0c0bfd170f3949fae948e54eca72721b (diff)
downloadchromium_src-caae541927bcc33ed0a90b224f614ed99e1ca893.zip
chromium_src-caae541927bcc33ed0a90b224f614ed99e1ca893.tar.gz
chromium_src-caae541927bcc33ed0a90b224f614ed99e1ca893.tar.bz2
removed a bunch of minor glue dependencies from port
Review URL: http://codereview.chromium.org/10919 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/chromium_bridge_impl.cc17
-rw-r--r--webkit/port/bindings/v8/v8_proxy.cpp11
-rw-r--r--webkit/port/platform/StateTrackingString.h5
-rw-r--r--webkit/port/platform/chromium/ChromiumBridge.h11
-rw-r--r--webkit/port/platform/chromium/FileSystemPosix.cpp15
-rw-r--r--webkit/port/platform/graphics/mac/FontCacheMacPending.cpp1
6 files changed, 41 insertions, 19 deletions
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index a68ee6b..eece6dd 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -204,6 +204,17 @@ bool ChromiumBridge::ensureFontLoaded(HFONT font) {
}
#endif
+// Forms ----------------------------------------------------------------------
+
+void ChromiumBridge::notifyFormStateChanged(const Document* doc) {
+ webkit_glue::NotifyFormStateChanged(doc);
+}
+
+// JavaScript -----------------------------------------------------------------
+
+void ChromiumBridge::notifyJSOutOfMemory(Frame* frame) {
+ webkit_glue::NotifyJSOutOfMemory(frame);
+}
// Language -------------------------------------------------------------------
@@ -279,6 +290,12 @@ IntRect ChromiumBridge::screenAvailableRect(Widget* widget) {
webkit_glue::GetScreenInfo(ToPlatform(widget)).available_rect);
}
+// URL ----------------------------------------------------------------
+KURL ChromiumBridge::inspectorURL() {
+ return webkit_glue::GURLToKURL(webkit_glue::GetInspectorURL());
+}
+
+
// Widget ---------------------------------------------------------------------
void ChromiumBridge::widgetSetCursor(Widget* widget, const Cursor& cursor) {
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp
index 17ae8c1..93d639a 100644
--- a/webkit/port/bindings/v8/v8_proxy.cpp
+++ b/webkit/port/bindings/v8/v8_proxy.cpp
@@ -113,8 +113,6 @@
#undef LOG
#include "base/stats_table.h"
#include "base/trace_event.h"
-#include "webkit/glue/glue_util.h"
-#include "webkit/glue/webkit_glue.h"
namespace WebCore {
@@ -1024,7 +1022,7 @@ bool V8Proxy::HandleOutOfMemory()
// Destroy the global object.
proxy->DestroyGlobal();
- webkit_glue::NotifyJSOutOfMemory(frame);
+ ChromiumBridge::notifyJSOutOfMemory(frame);
// Disable JS.
Settings* settings = frame->settings();
@@ -1545,11 +1543,10 @@ bool V8Proxy::isEnabled()
// If the scheme is ftp: or file:, an empty file name indicates a directory
// listing, which requires JavaScript to function properly.
const char* kDirProtocols[] = { "ftp", "file" };
- GURL url = webkit_glue::KURLToGURL(document->url());
for (size_t i = 0; i < arraysize(kDirProtocols); ++i) {
if (origin->protocol() == kDirProtocols[i]) {
- ASSERT(url.SchemeIs(kDirProtocols[i]));
- return url.ExtractFileName().empty();
+ const KURL& url = document->url();
+ return url.pathAfterLastSlash() == url.pathEnd();
}
}
@@ -1690,7 +1687,7 @@ bool V8Proxy::CanAccessPrivate(DOMWindow* target_window)
String ui_resource_protocol = ChromiumBridge::uiResourceProtocol();
if (active_security_origin->protocol() == ui_resource_protocol) {
- KURL inspector_url = webkit_glue::GURLToKURL(webkit_glue::GetInspectorURL());
+ KURL inspector_url = ChromiumBridge::inspectorURL();
ASSERT(inspector_url.protocol() == ui_resource_protocol);
ASSERT(inspector_url.protocol().endsWith("-resource"));
diff --git a/webkit/port/platform/StateTrackingString.h b/webkit/port/platform/StateTrackingString.h
index 31f6ee7..5f9e786 100644
--- a/webkit/port/platform/StateTrackingString.h
+++ b/webkit/port/platform/StateTrackingString.h
@@ -6,10 +6,9 @@
#define StateTrackingString_h
#include "config.h"
+#include "ChromiumBridge.h"
#include "PlatformString.h"
-#include "webkit/glue/webkit_glue.h"
-
namespace WebCore {
// This string class emulates the necessary calls that the form code makes
@@ -57,7 +56,7 @@ public:
private:
void Notify() const {
- webkit_glue::NotifyFormStateChanged(m_parentNode->ownerDocument());
+ ChromiumBridge::NotifyFormStateChanged(m_parentNode->ownerDocument());
}
// The node that owns this value.
diff --git a/webkit/port/platform/chromium/ChromiumBridge.h b/webkit/port/platform/chromium/ChromiumBridge.h
index d64abbc..50b58aa 100644
--- a/webkit/port/platform/chromium/ChromiumBridge.h
+++ b/webkit/port/platform/chromium/ChromiumBridge.h
@@ -43,6 +43,8 @@ typedef struct HFONT__* HFONT;
namespace WebCore {
class Cursor;
+ class Document;
+ class Frame;
class IntRect;
class KURL;
class String;
@@ -74,6 +76,12 @@ namespace WebCore {
#if PLATFORM(WIN_OS)
static bool ensureFontLoaded(HFONT font);
#endif
+
+ // Forms --------------------------------------------------------------
+ static void notifyFormStateChanged(const Document* doc);
+
+ // JavaScript ---------------------------------------------------------
+ static void notifyJSOutOfMemory(Frame* frame);
// Language -----------------------------------------------------------
static String computedDefaultLanguage();
@@ -96,6 +104,9 @@ namespace WebCore {
static IntRect screenRect(Widget*);
static IntRect screenAvailableRect(Widget*);
+ // URL ----------------------------------------------------------------
+ static KURL inspectorURL();
+
// Widget -------------------------------------------------------------
static void widgetSetCursor(Widget*, const Cursor&);
static void widgetSetFocus(Widget*);
diff --git a/webkit/port/platform/chromium/FileSystemPosix.cpp b/webkit/port/platform/chromium/FileSystemPosix.cpp
index 0264d9e..32069a0 100644
--- a/webkit/port/platform/chromium/FileSystemPosix.cpp
+++ b/webkit/port/platform/chromium/FileSystemPosix.cpp
@@ -9,19 +9,18 @@
#include "FileSystem.h"
#include "CString.h"
-#include "base/sys_string_conversions.h"
-#include "webkit/glue/glue_util.h"
-
namespace WebCore {
// This function is tasked with transforming a String to a CString for the
// underlying operating system. On Linux the kernel doesn't care about the
// filenames so long as NUL and '/' are respected. UTF8 filenames seem to be
-// pretty common, but are not universal so we punt on the decision here and pass
-// the buck to a function in base.
-CString fileSystemRepresentation(const String &path) {
- return webkit_glue::StdStringToCString(
- base::SysWideToNativeMB(webkit_glue::StringToStdWString(path)));
+// pretty common, but are not universal, so this could potentially be different
+// on different systems. Until we figure out how to pick the right encoding,
+// we use UTF8.
+// TODO(evanm) - when we figure out how this works in base, abstract this
+// concept into ChromiumBridge.
+CString fileSystemRepresentation(const String& path) {
+ return path.utf8();
}
}
diff --git a/webkit/port/platform/graphics/mac/FontCacheMacPending.cpp b/webkit/port/platform/graphics/mac/FontCacheMacPending.cpp
index 325b57d..c368827 100644
--- a/webkit/port/platform/graphics/mac/FontCacheMacPending.cpp
+++ b/webkit/port/platform/graphics/mac/FontCacheMacPending.cpp
@@ -31,7 +31,6 @@
#include "ChromiumBridge.h"
#include "FontCache.h"
#include "FontDescription.h"
-#include "webkit_glue.h"
//
// This file contains implementations of methods in the "pending" version