summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-27 18:17:24 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-27 18:17:24 +0000
commite5cd46b27d3591663ba43428e4b2e2249bf9733e (patch)
tree0812842b1917d201e7610412d35d31c4d3c72c80 /webkit
parente1a853a919b8011cec35b1ba6eb170e16f56391c (diff)
downloadchromium_src-e5cd46b27d3591663ba43428e4b2e2249bf9733e.zip
chromium_src-e5cd46b27d3591663ba43428e4b2e2249bf9733e.tar.gz
chromium_src-e5cd46b27d3591663ba43428e4b2e2249bf9733e.tar.bz2
More linux ifdef tweaks. This reverts my earlier change (13503).
BUG=none TEST=none Review URL: http://codereview.chromium.org/100046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14628 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webcursor.h4
-rw-r--r--webkit/glue/webframe_impl.cc2
-rw-r--r--webkit/glue/webplugin_impl.cc7
-rwxr-xr-xwebkit/tools/test_shell/test_shell.cc8
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h6
-rw-r--r--webkit/tools/test_shell/webwidget_host.h14
6 files changed, 12 insertions, 29 deletions
diff --git a/webkit/glue/webcursor.h b/webkit/glue/webcursor.h
index a411ebc..8ecc9d0 100644
--- a/webkit/glue/webcursor.h
+++ b/webkit/glue/webcursor.h
@@ -15,7 +15,7 @@
typedef struct HINSTANCE__* HINSTANCE;
typedef struct HICON__* HICON;
typedef HICON HCURSOR;
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
// GdkCursorType is an enum, which we can't forward-declare. :(
// If you work around this, be sure to fix webkit.gyp:glue to not put
// GTK in the export_dependent_settings section!
@@ -73,7 +73,7 @@ class WebCursor {
// APIs on it.
void InitFromExternalCursor(HCURSOR handle);
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
// Return the stock GdkCursorType for this cursor, or GDK_CURSOR_IS_PIXMAP
// if it's a custom cursor. Return GDK_LAST_CURSOR to indicate that the cursor
// should be set to the system default.
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 1d21d0a..dfed0aa 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -155,7 +155,7 @@ MSVC_POP_WARNING();
#include "webkit/glue/webtextinput_impl.h"
#include "webkit/glue/webview_impl.h"
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX)
#include <gdk/gdk.h>
#endif
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 2ddc777..de428a3 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -706,15 +706,12 @@ void WebPluginImpl::paint(WebCore::GraphicsContext* gc,
gc->translate(static_cast<float>(origin.x()),
static_cast<float>(origin.y()));
-#if defined(OS_WIN) || defined(TOOLKIT_GTK)
+#if defined(OS_WIN) || defined(OS_LINUX)
// Note that |context| is only used when in windowless mode.
gfx::NativeDrawingContext context =
gc->platformContext()->canvas()->beginPlatformPaint();
#elif defined(OS_MACOSX)
gfx::NativeDrawingContext context = gc->platformContext();
-#else
- NOTIMPLEMENTED();
- gfx::NativeDrawingContext context = NULL;
#endif
WebCore::IntRect window_rect =
@@ -723,7 +720,7 @@ void WebPluginImpl::paint(WebCore::GraphicsContext* gc,
delegate_->Paint(context, webkit_glue::FromIntRect(window_rect));
-#if defined(OS_WIN) || defined(TOOLKIT_GTK)
+#if defined(OS_WIN) || defined(OS_LINUX)
gc->platformContext()->canvas()->endPlatformPaint();
#endif
gc->restore();
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index ea141528..6256ebb 100755
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -582,11 +582,9 @@ void AppendToLog(const char* file, int line, const char* msg) {
logging::LogMessage(file, line).stream() << msg;
}
-#if !defined(LINUX2)
bool GetApplicationDirectory(std::wstring *path) {
return PathService::Get(base::DIR_EXE, path);
}
-#endif
GURL GetInspectorURL() {
return GURL("test-shell-resource://inspector/inspector.html");
@@ -596,11 +594,9 @@ std::string GetUIResourceProtocol() {
return "test-shell-resource";
}
-#if !defined(LINUX2)
bool GetExeDirectory(std::wstring *path) {
return PathService::Get(base::DIR_EXE, path);
}
-#endif
bool SpellCheckWord(const wchar_t* word, int word_len,
int* misspelling_start, int* misspelling_len) {
@@ -610,17 +606,14 @@ bool SpellCheckWord(const wchar_t* word, int word_len,
return true;
}
-#if !defined(LINUX2)
bool IsPluginRunningInRendererProcess() {
return true;
}
-#endif
bool GetPluginFinderURL(std::string* plugin_finder_url) {
return false;
}
-#if !defined(LINUX2)
bool IsDefaultPluginEnabled() {
#if defined(OS_WIN)
FilePath exe_path;
@@ -638,6 +631,5 @@ bool IsDefaultPluginEnabled() {
std::wstring GetWebKitLocale() {
return L"en-US";
}
-#endif
} // namespace webkit_glue
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index 8826752..413fe8d 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -16,7 +16,7 @@
#endif
#include <map>
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX)
#include <gdk/gdkcursor.h>
#endif
@@ -69,7 +69,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
#else
, select_trailing_whitespace_enabled_(false)
#endif
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX)
, cursor_type_(GDK_X_CURSOR)
#endif
{
@@ -342,7 +342,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
scoped_refptr<TestDropDelegate> drop_delegate_;
#endif
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX)
// The type of cursor the window is currently using.
// Used for judging whether a new SetCursor call is actually changing the
// cursor.
diff --git a/webkit/tools/test_shell/webwidget_host.h b/webkit/tools/test_shell/webwidget_host.h
index 96235a9..e74638e 100644
--- a/webkit/tools/test_shell/webwidget_host.h
+++ b/webkit/tools/test_shell/webwidget_host.h
@@ -8,13 +8,16 @@
#include "base/basictypes.h"
#include "base/gfx/native_widget_types.h"
#include "base/gfx/rect.h"
-#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
#include "skia/ext/platform_canvas.h"
class WebWidget;
class WebWidgetDelegate;
+namespace gfx {
+class Size;
+}
+
namespace WebKit {
struct WebScreenInfo;
}
@@ -48,9 +51,6 @@ class WebWidgetHost {
#if defined(OS_WIN)
void SetCursor(HCURSOR cursor);
#endif
-#if defined(LINUX2)
- const gfx::Size& size() const { return size_; }
-#endif
void DiscardBackingStore();
// Allow clients to update the paint rect. For example, if we get a gdk
@@ -114,12 +114,6 @@ class WebWidgetHost {
#endif
}
-#if defined(LINUX2)
- void ScheduleRepaint(const gfx::Rect& bounds);
-
- gfx::Size size_;
-#endif
-
gfx::NativeView view_;
WebWidget* webwidget_;
scoped_ptr<skia::PlatformCanvas> canvas_;