OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GFX_NATIVE_WIDGET_TYPES_H_ | 5 #ifndef UI_GFX_NATIVE_WIDGET_TYPES_H_ |
6 #define UI_GFX_NATIVE_WIDGET_TYPES_H_ | 6 #define UI_GFX_NATIVE_WIDGET_TYPES_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 typedef struct _GdkPixbuf GdkPixbuf; | 105 typedef struct _GdkPixbuf GdkPixbuf; |
106 typedef struct _GdkRegion GdkRegion; | 106 typedef struct _GdkRegion GdkRegion; |
107 typedef struct _GtkWidget GtkWidget; | 107 typedef struct _GtkWidget GtkWidget; |
108 typedef struct _GtkWindow GtkWindow; | 108 typedef struct _GtkWindow GtkWindow; |
109 #elif defined(OS_ANDROID) | 109 #elif defined(OS_ANDROID) |
110 struct ANativeWindow; | 110 struct ANativeWindow; |
111 namespace ui { | 111 namespace ui { |
112 class WindowAndroid; | 112 class WindowAndroid; |
113 class ViewAndroid; | 113 class ViewAndroid; |
114 } | 114 } |
| 115 #elif defined(USE_WAYLAND) |
| 116 namespace ui { |
| 117 class WaylandWindow; |
| 118 } |
115 #endif | 119 #endif |
116 class SkBitmap; | 120 class SkBitmap; |
117 | 121 |
118 namespace gfx { | 122 namespace gfx { |
119 | 123 |
120 #if defined(USE_AURA) | 124 #if defined(USE_AURA) |
121 typedef ui::Cursor NativeCursor; | 125 typedef ui::Cursor NativeCursor; |
122 typedef aura::Window* NativeView; | 126 typedef aura::Window* NativeView; |
123 typedef aura::Window* NativeWindow; | 127 typedef aura::Window* NativeWindow; |
124 typedef SkRegion* NativeRegion; | 128 typedef SkRegion* NativeRegion; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // Mac-Aura uses NSView-backed GLSurface. Regular Mac does not. | 250 // Mac-Aura uses NSView-backed GLSurface. Regular Mac does not. |
247 // TODO(dhollowa): Rationalize these two definitions. http://crbug.com/104551. | 251 // TODO(dhollowa): Rationalize these two definitions. http://crbug.com/104551. |
248 typedef NSView* PluginWindowHandle; | 252 typedef NSView* PluginWindowHandle; |
249 const PluginWindowHandle kNullPluginWindow = 0; | 253 const PluginWindowHandle kNullPluginWindow = 0; |
250 #elif defined(OS_ANDROID) | 254 #elif defined(OS_ANDROID) |
251 typedef uint64 PluginWindowHandle; | 255 typedef uint64 PluginWindowHandle; |
252 const PluginWindowHandle kNullPluginWindow = 0; | 256 const PluginWindowHandle kNullPluginWindow = 0; |
253 #elif defined(USE_OZONE) | 257 #elif defined(USE_OZONE) |
254 typedef intptr_t PluginWindowHandle; | 258 typedef intptr_t PluginWindowHandle; |
255 const PluginWindowHandle kNullPluginWindow = 0; | 259 const PluginWindowHandle kNullPluginWindow = 0; |
| 260 #elif defined(USE_WAYLAND) |
| 261 typedef ui::WaylandWindow* PluginWindowHandle; |
| 262 const PluginWindowHandle kNullPluginWindow = NULL; |
256 #else | 263 #else |
257 // On OS X we don't have windowed plugins. | 264 // On OS X we don't have windowed plugins. |
258 // We use a NULL/0 PluginWindowHandle in shared code to indicate there | 265 // We use a NULL/0 PluginWindowHandle in shared code to indicate there |
259 // is no window present, so mirror that behavior here. | 266 // is no window present, so mirror that behavior here. |
260 // | 267 // |
261 // The GPU plugin is currently an exception to this rule. As of this | 268 // The GPU plugin is currently an exception to this rule. As of this |
262 // writing it uses some NPAPI infrastructure, and minimally we need | 269 // writing it uses some NPAPI infrastructure, and minimally we need |
263 // to identify the plugin instance via this window handle. When the | 270 // to identify the plugin instance via this window handle. When the |
264 // GPU plugin becomes a full-on GPU process, this typedef can be | 271 // GPU plugin becomes a full-on GPU process, this typedef can be |
265 // returned to a bool. For now we use a type large enough to hold a | 272 // returned to a bool. For now we use a type large enough to hold a |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 const AcceleratedWidget kNullAcceleratedWidget = 0; | 321 const AcceleratedWidget kNullAcceleratedWidget = 0; |
315 #elif defined(OS_MACOSX) | 322 #elif defined(OS_MACOSX) |
316 typedef NSView* AcceleratedWidget; | 323 typedef NSView* AcceleratedWidget; |
317 const AcceleratedWidget kNullAcceleratedWidget = 0; | 324 const AcceleratedWidget kNullAcceleratedWidget = 0; |
318 #elif defined(OS_ANDROID) | 325 #elif defined(OS_ANDROID) |
319 typedef ANativeWindow* AcceleratedWidget; | 326 typedef ANativeWindow* AcceleratedWidget; |
320 const AcceleratedWidget kNullAcceleratedWidget = 0; | 327 const AcceleratedWidget kNullAcceleratedWidget = 0; |
321 #elif defined(USE_OZONE) | 328 #elif defined(USE_OZONE) |
322 typedef intptr_t AcceleratedWidget; | 329 typedef intptr_t AcceleratedWidget; |
323 const AcceleratedWidget kNullAcceleratedWidget = 0; | 330 const AcceleratedWidget kNullAcceleratedWidget = 0; |
| 331 #elif defined(USE_WAYLAND) |
| 332 typedef ui::WaylandWindow* AcceleratedWidget; |
| 333 const AcceleratedWidget kNullAcceleratedWidget = NULL; |
324 #else | 334 #else |
325 #error unknown platform | 335 #error unknown platform |
326 #endif | 336 #endif |
327 | 337 |
328 typedef void* GpuMemoryBufferHandle; | 338 typedef void* GpuMemoryBufferHandle; |
329 | 339 |
330 } // namespace gfx | 340 } // namespace gfx |
331 | 341 |
332 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ | 342 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ |
OLD | NEW |