Chromium Code Reviews| Index: ui/gfx/native_widget_types.h |
| =================================================================== |
| --- ui/gfx/native_widget_types.h (revision 98084) |
| +++ ui/gfx/native_widget_types.h (working copy) |
| @@ -78,12 +78,31 @@ |
| #endif |
| class SkBitmap; |
| +#if defined(USE_AURA) |
|
sky
2011/08/24 22:29:34
Before class SkBitmap?
|
| +#include "aura/window.h" |
| +#endif |
| + |
| namespace gfx { |
| +#if defined(USE_AURA) |
| +typedef aura::Window* NativeView; |
| +typedef aura::Window* NativeWindow; |
| +#elif defined(OS_WIN) |
| +typedef HWND NativeView; |
| +typedef HWND NativeWindow; |
| +#elif defined(OS_MACOSX) |
| +typedef NSView* NativeView; |
| +typedef NSWindow* NativeWindow; |
| +#elif defined(USE_WAYLAND) |
| +typedef ui::WaylandWindow* NativeView; |
| +typedef ui::WaylandWindow* NativeWindow; |
| +#elif defined(USE_X11) |
| +typedef GtkWidget* NativeView; |
| +typedef GtkWindow* NativeWindow; |
| +#endif |
| + |
| #if defined(OS_WIN) |
| typedef HFONT NativeFont; |
| -typedef HWND NativeView; |
| -typedef HWND NativeWindow; |
| typedef HWND NativeEditView; |
| typedef HDC NativeDrawingContext; |
| typedef HCURSOR NativeCursor; |
| @@ -92,8 +111,6 @@ |
| typedef IAccessible* NativeViewAccessible; |
| #elif defined(OS_MACOSX) |
| typedef NSFont* NativeFont; |
| -typedef NSView* NativeView; |
| -typedef NSWindow* NativeWindow; |
| typedef NSTextField* NativeEditView; |
| typedef CGContext* NativeDrawingContext; |
| typedef void* NativeCursor; |
| @@ -101,8 +118,6 @@ |
| typedef void* NativeViewAccessible; |
| #elif defined(USE_WAYLAND) |
| typedef PangoFontDescription* NativeFont; |
| -typedef ui::WaylandWindow* NativeView; |
| -typedef ui::WaylandWindow* NativeWindow; |
| typedef void* NativeEditView; |
| typedef cairo_t* NativeDrawingContext; |
| typedef void* NativeCursor; |
| @@ -113,8 +128,6 @@ |
| typedef void* NativeViewAccessible; |
| #elif defined(USE_X11) |
| typedef PangoFontDescription* NativeFont; |
| -typedef GtkWidget* NativeView; |
| -typedef GtkWindow* NativeWindow; |
| typedef GtkWidget* NativeEditView; |
| typedef cairo_t* NativeDrawingContext; |
| typedef GdkCursor* NativeCursor; |
| @@ -139,7 +152,7 @@ |
| // See comment at the top of the file for usage. |
| typedef intptr_t NativeViewId; |
| -#if defined(OS_WIN) |
| +#if defined(OS_WIN) && !defined(USE_AURA) |
| // Convert a NativeViewId to a NativeView. |
| // |
| // On Windows, we pass an HWND into the renderer. As stated above, the renderer |
| @@ -148,7 +161,7 @@ |
| return reinterpret_cast<NativeView>(id); |
| } |
| #define NativeViewFromIdInBrowser(x) NativeViewFromId(x) |
| -#elif defined(OS_POSIX) |
| +#elif defined(OS_POSIX) || defined(USE_AURA) |
| // On Mac and Linux, a NativeView is a pointer to an object, and is useless |
|
sky
2011/08/24 22:29:34
Update comment.
|
| // outside the process in which it was created. NativeViewFromId should only be |
| // used inside the appropriate platform ifdef outside of the browser. |