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

Unified Diff: ui/gfx/native_widget_types.h

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 9 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
« no previous file with comments | « ui/gfx/gpu_memory_buffer.cc ('k') | ui/gfx/test/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/native_widget_types.h
diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h
index 71a9899c189fefac17286ca2696ac3cec75d4eba..31bba67ea7cb86f91d7ade25e74fe7242e3fc966 100644
--- a/ui/gfx/native_widget_types.h
+++ b/ui/gfx/native_widget_types.h
@@ -47,47 +47,7 @@ namespace ui {
class Event;
}
-#if defined(OS_WIN)
-#include <windows.h> // NOLINT
-typedef struct HFONT__* HFONT;
-struct IAccessible;
-#elif defined(OS_IOS)
-struct CGContext;
-#ifdef __OBJC__
-@class UIEvent;
-@class UIFont;
-@class UIImage;
-@class UIView;
-@class UIWindow;
-@class UITextField;
-#else
-class UIEvent;
-class UIFont;
-class UIImage;
-class UIView;
-class UIWindow;
-class UITextField;
-#endif // __OBJC__
-#elif defined(OS_MACOSX)
-struct CGContext;
-#ifdef __OBJC__
-@class NSCursor;
-@class NSEvent;
-@class NSFont;
-@class NSImage;
-@class NSView;
-@class NSWindow;
-@class NSTextField;
-#else
-class NSCursor;
-class NSEvent;
-class NSFont;
-class NSImage;
-struct NSView;
-class NSWindow;
-class NSTextField;
-#endif // __OBJC__
-#elif defined(OS_POSIX)
+#if defined(OS_POSIX)
typedef struct _PangoFontDescription PangoFontDescription;
typedef struct _cairo cairo_t;
#endif
@@ -103,43 +63,15 @@ class SkBitmap;
namespace gfx {
-#if defined(OS_LINUX) || defined(OS_WIN)
+#if defined(OS_LINUX)
typedef SkRegion* NativeRegion;
typedef ui::Event* NativeEvent;
-#elif defined(OS_IOS)
-typedef UIEvent* NativeEvent;
-#elif defined(OS_MACOSX)
-typedef void* NativeRegion;
-typedef NSEvent* NativeEvent;
#elif defined(OS_ANDROID)
typedef void* NativeRegion;
typedef jobject NativeEvent;
#endif
-#if defined(OS_WIN)
-typedef HFONT NativeFont;
-typedef HWND NativeEditView;
-typedef HDC NativeDrawingContext;
-typedef IAccessible* NativeViewAccessible;
-#elif defined(OS_IOS)
-typedef UIFont* NativeFont;
-typedef UITextField* NativeEditView;
-typedef CGContext* NativeDrawingContext;
-#ifdef __OBJC__
-typedef id NativeViewAccessible;
-#else
-typedef void* NativeViewAccessible;
-#endif
-#elif defined(OS_MACOSX)
-typedef NSFont* NativeFont;
-typedef NSTextField* NativeEditView;
-typedef CGContext* NativeDrawingContext;
-#ifdef __OBJC__
-typedef id NativeViewAccessible;
-#else
-typedef void* NativeViewAccessible;
-#endif
-#elif defined(USE_CAIRO)
+#if defined(USE_CAIRO)
typedef PangoFontDescription* NativeFont;
typedef void* NativeEditView;
typedef cairo_t* NativeDrawingContext;
@@ -152,17 +84,11 @@ typedef void* NativeViewAccessible;
#endif
// A constant value to indicate that gfx::NativeCursor refers to no cursor.
-#if defined(OS_LINUX) || defined(OS_WIN)
+#if defined(OS_LINUX)
const int kNullCursor = 0;
#endif
-#if defined(OS_IOS)
-typedef UIImage NativeImageType;
-#elif defined(OS_MACOSX)
-typedef NSImage NativeImageType;
-#else
typedef SkBitmap NativeImageType;
-#endif
typedef NativeImageType* NativeImage;
// Note: for test_shell we're packing a pointer into the NativeViewId. So, if
@@ -175,10 +101,7 @@ typedef intptr_t NativeViewId;
// PluginWindowHandle is an abstraction wrapping "the types of windows
// used by NPAPI plugins". On Windows it's an HWND, on X it's an X
// window id.
-#if defined(OS_WIN)
- typedef HWND PluginWindowHandle;
- const PluginWindowHandle kNullPluginWindow = NULL;
-#elif defined(USE_X11)
+#if defined(USE_X11)
typedef unsigned long PluginWindowHandle;
const PluginWindowHandle kNullPluginWindow = 0;
#elif defined(OS_ANDROID)
@@ -225,18 +148,9 @@ struct GLSurfaceHandle {
};
// AcceleratedWidget provides a surface to compositors to paint pixels.
-#if defined(OS_WIN)
-typedef HWND AcceleratedWidget;
-const AcceleratedWidget kNullAcceleratedWidget = NULL;
-#elif defined(USE_X11)
+#if defined(USE_X11)
typedef unsigned long AcceleratedWidget;
const AcceleratedWidget kNullAcceleratedWidget = 0;
-#elif defined(OS_IOS)
-typedef UIView* AcceleratedWidget;
-const AcceleratedWidget kNullAcceleratedWidget = 0;
-#elif defined(OS_MACOSX)
-typedef NSView* AcceleratedWidget;
-const AcceleratedWidget kNullAcceleratedWidget = 0;
#elif defined(OS_ANDROID)
typedef ANativeWindow* AcceleratedWidget;
const AcceleratedWidget kNullAcceleratedWidget = 0;
« no previous file with comments | « ui/gfx/gpu_memory_buffer.cc ('k') | ui/gfx/test/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698