summaryrefslogtreecommitdiffstats
path: root/base/gfx
diff options
context:
space:
mode:
authorbenl@chromium.org <benl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-07 16:39:46 +0000
committerbenl@chromium.org <benl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-07 16:39:46 +0000
commitfb66f9deac79dfe9e0eedc184705e824ae9144c3 (patch)
tree019f94cbb5f93009383182cffe8184009adcb6e6 /base/gfx
parentccf440ed5cf9f0a3368457c73a7496a900e03c06 (diff)
downloadchromium_src-fb66f9deac79dfe9e0eedc184705e824ae9144c3.zip
chromium_src-fb66f9deac79dfe9e0eedc184705e824ae9144c3.tar.gz
chromium_src-fb66f9deac79dfe9e0eedc184705e824ae9144c3.tar.bz2
Added USE_GDK, set when either TOOLKIT_GTK or TOOLKIT_VIEWS is set but
not OS_WIN. Added USE_X11. Set when OS_LINUX or OS_FREEBSD is set. Added USE_BASE_DATA_PACK for base::DataPack usage, set for OS_MACOSX, OS_LINUX or OS_FREEBSD. Added USE_NSS for ... nss (for crypto). Windows and MacOS use platform-specific libraries. All of the above cause slightly odd formulations like: #if defined(OS_WIN) ... #elif defined(USE_BASE_DATA_PACK) ... #endif Possibly should also define USE_DLL_FOR_DATA, etc? Or something? Wrapped various references to struct stat64 and stat64() to use struct stat and stat() for FreeBSD - but a "man stat64" on Linux suggests that we could do the same thing for at least Linux, too, and perhaps eliminate the wrapper? git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx')
-rw-r--r--base/gfx/native_widget_types.h16
-rw-r--r--base/gfx/rect.h8
2 files changed, 12 insertions, 12 deletions
diff --git a/base/gfx/native_widget_types.h b/base/gfx/native_widget_types.h
index 08bf76f..0ca82f2 100644
--- a/base/gfx/native_widget_types.h
+++ b/base/gfx/native_widget_types.h
@@ -46,7 +46,7 @@ class NSView;
class NSWindow;
class NSTextField;
#endif // __OBJC__
-#elif defined(OS_LINUX)
+#elif defined(USE_X11)
typedef struct _GdkCursor GdkCursor;
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkWindow GtkWindow;
@@ -69,7 +69,7 @@ typedef NSTextField* NativeEditView;
typedef CGContext* NativeDrawingContext;
typedef void* NativeCursor;
typedef void* NativeMenu;
-#elif defined(OS_LINUX)
+#elif defined(USE_X11)
typedef GtkWidget* NativeView;
typedef GtkWindow* NativeWindow;
typedef GtkWidget* NativeEditView;
@@ -102,15 +102,15 @@ static inline NativeView NativeViewFromId(NativeViewId id) {
#define NativeViewFromId(x) NATIVE_VIEW_FROM_ID_NOT_AVAILABLE_ON_MAC
-#elif defined(OS_LINUX)
+#elif defined(USE_X11)
// A NativeView on Linux is a GtkWidget*. However, we can't go directly from an
// X window ID to a GtkWidget. Thus, functions which handle NativeViewIds from
// the renderer have to use Xlib. This is fine since these functions are
// generally performed on the BACKGROUND_X thread which can't use GTK anyway.
-#define NativeViewFromId(x) NATIVE_VIEW_FROM_ID_NOT_AVAILIBLE_ON_LINUX
+#define NativeViewFromId(x) NATIVE_VIEW_FROM_ID_NOT_AVAILIBLE_ON_X11
-#endif // defined(OS_LINUX)
+#endif // defined(USE_X11)
// Convert a NativeView to a NativeViewId. See the comments above
// NativeViewFromId.
@@ -118,10 +118,10 @@ static inline NativeView NativeViewFromId(NativeViewId id) {
static inline NativeViewId IdFromNativeView(NativeView view) {
return reinterpret_cast<NativeViewId>(view);
}
-#elif defined(OS_LINUX)
+#elif defined(USE_X11)
// Not inlined because it involves pulling too many headers.
NativeViewId IdFromNativeView(NativeView view);
-#endif // defined(OS_LINUX)
+#endif // defined(USE_X11)
// PluginWindowHandle is an abstraction wrapping "the types of windows
@@ -129,7 +129,7 @@ NativeViewId IdFromNativeView(NativeView view);
// window id.
#if defined(OS_WIN)
typedef HWND PluginWindowHandle;
-#elif defined(OS_LINUX)
+#elif defined(USE_X11)
typedef unsigned long PluginWindowHandle;
#else
// On OS X we don't have windowed plugins.
diff --git a/base/gfx/rect.h b/base/gfx/rect.h
index f944dd7..414a348 100644
--- a/base/gfx/rect.h
+++ b/base/gfx/rect.h
@@ -19,7 +19,7 @@
#if defined(OS_WIN)
typedef struct tagRECT RECT;
-#elif defined(OS_LINUX)
+#elif defined(USE_X11)
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(OS_LINUX)
+#elif defined(USE_X11)
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(OS_LINUX)
+#elif defined(USE_X11)
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(OS_LINUX)
+#elif defined(USE_X11)
GdkRectangle ToGdkRectangle() const;
#elif defined(OS_MACOSX)
// Construct an equivalent CoreGraphics object.