Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: base/gfx/native_widget_types.h

Issue 118469: compile on openbsd: mostly ifdefs and missing includes,... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/gfx/native_widget_types.h
===================================================================
--- base/gfx/native_widget_types.h (revision 17958)
+++ base/gfx/native_widget_types.h (working copy)
@@ -46,7 +46,7 @@
class NSWindow;
class NSTextField;
#endif // __OBJC__
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_OPENBSD)
typedef struct _GdkCursor GdkCursor;
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkWindow GtkWindow;
@@ -69,7 +69,7 @@
typedef CGContext* NativeDrawingContext;
typedef void* NativeCursor;
typedef void* NativeMenu;
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_OPENBSD)
typedef GtkWidget* NativeView;
typedef GtkWindow* NativeWindow;
typedef GtkWidget* NativeEditView;
@@ -93,7 +93,7 @@
static inline NativeView NativeViewFromId(NativeViewId id) {
return reinterpret_cast<NativeView>(id);
}
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_OPENBSD)
// 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
@@ -101,7 +101,7 @@
#define NativeViewFromId(x) NATIVE_VIEW_FROM_ID_NOT_AVAILIBLE_ON_LINUX
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_OPENBSD)
// Convert a NativeView to a NativeViewId. See the comments above
// NativeViewFromId.
@@ -109,10 +109,10 @@
static inline NativeViewId IdFromNativeView(NativeView view) {
return reinterpret_cast<NativeViewId>(view);
}
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_OPENBSD)
// Not inlined because it involves pulling too many headers.
NativeViewId IdFromNativeView(NativeView view);
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_OPENBSD)
} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698