summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/clipboard.h4
-rwxr-xr-xbase/gfx/rect.cc6
-rwxr-xr-xbase/gfx/rect.h8
-rw-r--r--base/message_loop.cc6
-rw-r--r--build/common.gypi3
-rw-r--r--chrome/common/chrome_paths_linux.cc4
-rw-r--r--chrome/common/gfx/chrome_canvas.h2
-rw-r--r--chrome/common/gfx/path.h2
-rw-r--r--chrome/common/native_web_keyboard_event.h6
-rw-r--r--chrome/common/resource_bundle.cc4
-rw-r--r--chrome/common/resource_bundle.h6
-rw-r--r--chrome/common/resource_bundle_linux.cc6
-rw-r--r--chrome/views/widget/root_view.h4
-rw-r--r--skia/include/corecg/SkUserConfig.h7
-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
20 files changed, 30 insertions, 79 deletions
diff --git a/base/clipboard.h b/base/clipboard.h
index 0e4363d..98f3b31 100644
--- a/base/clipboard.h
+++ b/base/clipboard.h
@@ -18,9 +18,7 @@ class Clipboard {
public:
typedef std::string FormatType;
#if defined(OS_LINUX)
-#if defined(TOOLKIT_GTK)
typedef struct _GtkClipboard GtkClipboard;
-#endif
typedef std::map<FormatType, std::pair<char*, size_t> > TargetMap;
#endif
@@ -197,10 +195,8 @@ class Clipboard {
void InsertMapping(const char* key, char* data, size_t data_len);
TargetMap* clipboard_data_;
-#if defined(TOOLKIT_GTK)
GtkClipboard* clipboard_;
#endif
-#endif
DISALLOW_EVIL_CONSTRUCTORS(Clipboard);
};
diff --git a/base/gfx/rect.cc b/base/gfx/rect.cc
index b54c13b..e0226f3 100755
--- a/base/gfx/rect.cc
+++ b/base/gfx/rect.cc
@@ -8,7 +8,7 @@
#include <windows.h>
#elif defined(OS_MACOSX)
#include <CoreGraphics/CGGeometry.h>
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
#include <gdk/gdk.h>
#endif
@@ -74,7 +74,7 @@ Rect& Rect::operator=(const CGRect& r) {
set_height(r.size.height);
return *this;
}
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
Rect::Rect(const GdkRectangle& r)
: origin_(r.x, r.y) {
set_width(r.width);
@@ -126,7 +126,7 @@ RECT Rect::ToRECT() const {
r.bottom = bottom();
return r;
}
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
GdkRectangle Rect::ToGdkRectangle() const {
GdkRectangle r = {x(), y(), width(), height()};
return r;
diff --git a/base/gfx/rect.h b/base/gfx/rect.h
index 16c16c1..6da1b55 100755
--- a/base/gfx/rect.h
+++ b/base/gfx/rect.h
@@ -19,7 +19,7 @@
#if defined(OS_WIN)
typedef struct tagRECT RECT;
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
typedef struct _GdkRectangle GdkRectangle;
#endif
@@ -34,7 +34,7 @@ class Rect {
explicit Rect(const RECT& r);
#elif defined(OS_MACOSX)
explicit Rect(const CGRect& r);
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
explicit Rect(const GdkRectangle& r);
#endif
Rect(const gfx::Point& origin, const gfx::Size& size);
@@ -45,7 +45,7 @@ class Rect {
Rect& operator=(const RECT& r);
#elif defined(OS_MACOSX)
Rect& operator=(const CGRect& r);
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
Rect& operator=(const GdkRectangle& r);
#endif
@@ -97,7 +97,7 @@ class Rect {
#if defined(OS_WIN)
// Construct an equivalent Win32 RECT object.
RECT ToRECT() const;
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
GdkRectangle ToGdkRectangle() const;
#elif defined(OS_MACOSX)
// Construct an equivalent CoreGraphics object.
diff --git a/base/message_loop.cc b/base/message_loop.cc
index d836c92..764a963 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -19,7 +19,7 @@
#if defined(OS_POSIX)
#include "base/message_pump_libevent.h"
#endif
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX)
#include "base/message_pump_glib.h"
#endif
@@ -99,11 +99,7 @@ MessageLoop::MessageLoop(Type type)
#if defined(OS_MACOSX)
pump_ = base::MessagePumpMac::Create();
#elif defined(OS_LINUX)
-#if defined(TOOLKIT_GTK)
pump_ = new base::MessagePumpForUI();
-#else
- pump_ = new base::MessagePumpDefault();
-#endif
#endif // OS_LINUX
} else if (type_ == TYPE_IO) {
pump_ = new base::MessagePumpLibevent();
diff --git a/build/common.gypi b/build/common.gypi
index 7b2604a..49b030d 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -57,9 +57,6 @@
}, { # else: branding!="Chrome"
'defines': ['CHROMIUM_BUILD'],
}],
- ['OS=="linux"', {
- 'defines': ['TOOLKIT_GTK=1'],
- }],
['coverage!=0', {
'conditions': [
['OS=="mac"', {
diff --git a/chrome/common/chrome_paths_linux.cc b/chrome/common/chrome_paths_linux.cc
index b1151c5..d3ce207 100644
--- a/chrome/common/chrome_paths_linux.cc
+++ b/chrome/common/chrome_paths_linux.cc
@@ -4,9 +4,7 @@
#include "chrome/common/chrome_paths_internal.h"
-#if defined(TOOLKIT_GTK)
#include <glib.h>
-#endif
#include <stdlib.h>
#include "base/file_path.h"
@@ -21,11 +19,9 @@ FilePath GetHomeDir() {
if (home_dir && home_dir[0])
return FilePath(home_dir);
-#if defined(TOOLKIT_GTK)
home_dir = g_get_home_dir();
if (home_dir && home_dir[0])
return FilePath(home_dir);
-#endif
FilePath rv;
if (PathService::Get(base::DIR_TEMP, &rv))
diff --git a/chrome/common/gfx/chrome_canvas.h b/chrome/common/gfx/chrome_canvas.h
index cfb0c28..dbf9466 100644
--- a/chrome/common/gfx/chrome_canvas.h
+++ b/chrome/common/gfx/chrome_canvas.h
@@ -195,7 +195,7 @@ class ChromeCanvas : public skia::PlatformCanvas {
DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas);
};
-#if defined(OS_WIN) || defined(TOOLKIT_GTK)
+#if defined(OS_WIN) || defined(OS_LINUX)
typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint;
#endif
diff --git a/chrome/common/gfx/path.h b/chrome/common/gfx/path.h
index 7d6d3a0..ac7537c 100644
--- a/chrome/common/gfx/path.h
+++ b/chrome/common/gfx/path.h
@@ -25,7 +25,7 @@ class Path : public SkPath {
// Creates a HRGN from the path. The caller is responsible for freeing
// resources used by this region. This only supports polygon paths.
HRGN CreateHRGN() const;
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
// Creates a Gdkregion from the path. The caller is responsible for freeing
// resources used by this region. This only supports polygon paths.
GdkRegion* CreateGdkRegion() const;
diff --git a/chrome/common/native_web_keyboard_event.h b/chrome/common/native_web_keyboard_event.h
index c055528..0400b41 100644
--- a/chrome/common/native_web_keyboard_event.h
+++ b/chrome/common/native_web_keyboard_event.h
@@ -16,7 +16,7 @@
#else
class NSEvent;
#endif // __OBJC__
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
#include <gdk/gdk.h>
#endif
@@ -29,7 +29,7 @@ struct NativeWebKeyboardEvent : public WebKit::WebKeyboardEvent {
NativeWebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
#elif defined(OS_MACOSX)
explicit NativeWebKeyboardEvent(NSEvent *event);
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
explicit NativeWebKeyboardEvent(const GdkEventKey* event);
#endif
@@ -42,7 +42,7 @@ struct NativeWebKeyboardEvent : public WebKit::WebKeyboardEvent {
MSG os_event;
#elif defined(OS_MACOSX)
NSEvent* os_event;
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
GdkEventKey* os_event;
#endif
};
diff --git a/chrome/common/resource_bundle.cc b/chrome/common/resource_bundle.cc
index f87560d..3ffc026 100644
--- a/chrome/common/resource_bundle.cc
+++ b/chrome/common/resource_bundle.cc
@@ -52,9 +52,7 @@ void ResourceBundle::FreeImages() {
}
void ResourceBundle::SetThemeExtension(const Extension& e) {
-#if !defined(LINUX2)
theme_extension_.reset(new Extension(e));
-#endif
}
/* static */
@@ -65,7 +63,6 @@ SkBitmap* ResourceBundle::LoadBitmap(DataHandle data_handle, int resource_id) {
// it can handle this resource.
// TODO(erikkay): It would be nice to use something less brittle than
// resource_id here.
-#if !defined(LINUX2)
if (g_shared_instance_->theme_extension_.get()) {
FilePath path =
g_shared_instance_->theme_extension_->GetThemeResourcePath(resource_id);
@@ -87,7 +84,6 @@ SkBitmap* ResourceBundle::LoadBitmap(DataHandle data_handle, int resource_id) {
}
}
}
-#endif
if (!success)
success = LoadResourceBytes(data_handle, resource_id, &raw_data);
if (!success)
diff --git a/chrome/common/resource_bundle.h b/chrome/common/resource_bundle.h
index 2532953..77cb88d 100644
--- a/chrome/common/resource_bundle.h
+++ b/chrome/common/resource_bundle.h
@@ -25,7 +25,7 @@ namespace base {
class DataPack;
};
#endif
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX)
typedef struct _GdkPixbuf GdkPixbuf;
#endif
class ChromeFont;
@@ -113,7 +113,7 @@ class ResourceBundle {
// Loads and returns a cursor from the app module.
HCURSOR LoadCursor(int cursor_id);
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
// Gets the GdkPixbuf with the specified resource_id, first by looking into
// the theme data, than in the current module data if applicable. Returns a
// pointer to a shared instance of the GdkPixbuf. This shared GdkPixbuf is
@@ -183,7 +183,7 @@ class ResourceBundle {
// ownership of the pointers.
typedef std::map<int, SkBitmap*> SkImageMap;
SkImageMap skia_images_;
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX)
typedef std::map<int, GdkPixbuf*> GdkPixbufMap;
GdkPixbufMap gdk_pixbufs_;
#endif
diff --git a/chrome/common/resource_bundle_linux.cc b/chrome/common/resource_bundle_linux.cc
index e982db8..bad1da7 100644
--- a/chrome/common/resource_bundle_linux.cc
+++ b/chrome/common/resource_bundle_linux.cc
@@ -4,9 +4,7 @@
#include "chrome/common/resource_bundle.h"
-#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
-#endif
#include "base/base_paths.h"
#include "base/data_pack.h"
@@ -25,7 +23,6 @@
namespace {
-#if defined(TOOLKIT_GTK)
// Convert the raw image data into a GdkPixbuf. The GdkPixbuf that is returned
// has a ref count of 1 so the caller must call g_object_unref to free the
// memory.
@@ -51,7 +48,6 @@ GdkPixbuf* LoadPixbuf(std::vector<unsigned char>& data) {
return pixbuf;
}
-#endif
} // namespace
@@ -163,7 +159,6 @@ string16 ResourceBundle::GetLocalizedString(int message_id) {
return msg;
}
-#if defined(TOOLKIT_GTK)
GdkPixbuf* ResourceBundle::GetPixbufNamed(int resource_id) {
// Check to see if we already have the pixbuf in the cache.
{
@@ -212,4 +207,3 @@ GdkPixbuf* ResourceBundle::GetPixbufNamed(int resource_id) {
return empty_bitmap;
}
}
-#endif
diff --git a/chrome/views/widget/root_view.h b/chrome/views/widget/root_view.h
index 091e48d..0eaaa1d 100644
--- a/chrome/views/widget/root_view.h
+++ b/chrome/views/widget/root_view.h
@@ -7,7 +7,7 @@
#include "build/build_config.h"
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX)
#include <gtk/gtk.h>
#endif
@@ -184,7 +184,7 @@ class RootView : public View,
#if defined(OS_WIN)
// Invoked from the Widget to service a WM_PAINT call.
void OnPaint(HWND hwnd);
-#elif defined(TOOLKIT_GTK)
+#elif defined(OS_LINUX)
void OnPaint(GdkEventExpose* event);
#endif
diff --git a/skia/include/corecg/SkUserConfig.h b/skia/include/corecg/SkUserConfig.h
index 97ab2fc..34340e1 100644
--- a/skia/include/corecg/SkUserConfig.h
+++ b/skia/include/corecg/SkUserConfig.h
@@ -145,19 +145,12 @@ typedef unsigned uint32_t;
#error Read the comment at this location
#endif
-#ifdef LINUX2
-#define SK_A32_SHIFT 24
-#define SK_B32_SHIFT 16
-#define SK_G32_SHIFT 8
-#define SK_R32_SHIFT 0
-#else
// For Linux we want to match the most common X visual, which is
// ARGB (in registers)
#define SK_A32_SHIFT 24
#define SK_R32_SHIFT 16
#define SK_G32_SHIFT 8
#define SK_B32_SHIFT 0
-#endif
#endif
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_;