OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/base/ui_export.h" | 10 #include "ui/base/ui_export.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 // window id. | 220 // window id. |
221 #if defined(OS_WIN) | 221 #if defined(OS_WIN) |
222 typedef HWND PluginWindowHandle; | 222 typedef HWND PluginWindowHandle; |
223 const PluginWindowHandle kNullPluginWindow = NULL; | 223 const PluginWindowHandle kNullPluginWindow = NULL; |
224 #elif defined(USE_WAYLAND) | 224 #elif defined(USE_WAYLAND) |
225 typedef struct wl_egl_window* PluginWindowHandle; | 225 typedef struct wl_egl_window* PluginWindowHandle; |
226 const PluginWindowHandle kNullPluginWindow = NULL; | 226 const PluginWindowHandle kNullPluginWindow = NULL; |
227 #elif defined(USE_X11) | 227 #elif defined(USE_X11) |
228 typedef unsigned long PluginWindowHandle; | 228 typedef unsigned long PluginWindowHandle; |
229 const PluginWindowHandle kNullPluginWindow = 0; | 229 const PluginWindowHandle kNullPluginWindow = 0; |
230 #elif defined(USE_WEBKIT_COMPOSITOR) && defined(OS_MACOSX) | |
Ken Russell (switch to Gerrit)
2011/11/17 00:14:40
I think that this should be defined as defined(USE
dhollowa
2011/11/17 01:41:51
Done. Yes, I'd addressed this in Patch Set 4. It
| |
231 // USE_WEBKIT_COMPOSITOR is defined in service of the USE_AURA port. These | |
232 // definitions are currently not in use (or tested) beyond that. | |
233 typedef NSView* PluginWindowHandle; | |
234 const PluginWindowHandle kNullPluginWindow = 0; | |
230 #else | 235 #else |
231 // On OS X we don't have windowed plugins. | 236 // On OS X we don't have windowed plugins. |
232 // We use a NULL/0 PluginWindowHandle in shared code to indicate there | 237 // We use a NULL/0 PluginWindowHandle in shared code to indicate there |
233 // is no window present, so mirror that behavior here. | 238 // is no window present, so mirror that behavior here. |
234 // | 239 // |
235 // The GPU plugin is currently an exception to this rule. As of this | 240 // The GPU plugin is currently an exception to this rule. As of this |
236 // writing it uses some NPAPI infrastructure, and minimally we need | 241 // writing it uses some NPAPI infrastructure, and minimally we need |
237 // to identify the plugin instance via this window handle. When the | 242 // to identify the plugin instance via this window handle. When the |
238 // GPU plugin becomes a full-on GPU process, this typedef can be | 243 // GPU plugin becomes a full-on GPU process, this typedef can be |
239 // returned to a bool. For now we use a type large enough to hold a | 244 // returned to a bool. For now we use a type large enough to hold a |
240 // pointer on 64-bit architectures in case we need this capability. | 245 // pointer on 64-bit architectures in case we need this capability. |
241 typedef uint64 PluginWindowHandle; | 246 typedef uint64 PluginWindowHandle; |
242 const PluginWindowHandle kNullPluginWindow = 0; | 247 const PluginWindowHandle kNullPluginWindow = 0; |
243 #endif | 248 #endif |
244 | 249 |
245 // AcceleratedWidget provides a surface to compositors to paint pixels. | 250 // AcceleratedWidget provides a surface to compositors to paint pixels. |
246 #if defined(OS_WIN) | 251 #if defined(OS_WIN) |
247 typedef HWND AcceleratedWidget; | 252 typedef HWND AcceleratedWidget; |
248 const AcceleratedWidget kNullAcceleratedWidget = NULL; | 253 const AcceleratedWidget kNullAcceleratedWidget = NULL; |
249 #elif defined(USE_WAYLAND) | 254 #elif defined(USE_WAYLAND) |
250 typedef struct wl_egl_window* AcceleratedWidget; | 255 typedef struct wl_egl_window* AcceleratedWidget; |
251 const AcceleratedWidget kNullAcceleratedWidget = NULL; | 256 const AcceleratedWidget kNullAcceleratedWidget = NULL; |
252 #elif defined(USE_X11) | 257 #elif defined(USE_X11) |
253 typedef unsigned long AcceleratedWidget; | 258 typedef unsigned long AcceleratedWidget; |
254 const AcceleratedWidget kNullAcceleratedWidget = 0; | 259 const AcceleratedWidget kNullAcceleratedWidget = 0; |
260 #elif defined(USE_WEBKIT_COMPOSITOR) && defined(OS_MACOSX) | |
261 // USE_WEBKIT_COMPOSITOR is defined in service of the USE_AURA port. These | |
262 // definitions are currently not in use (or tested) beyond that. | |
263 typedef NSView* AcceleratedWidget; | |
264 const AcceleratedWidget kNullAcceleratedWidget = 0; | |
255 #else | 265 #else |
256 typedef void* AcceleratedWidget; | 266 typedef void* AcceleratedWidget; |
257 const AcceleratedWidget kNullAcceleratedWidget = NULL; | 267 const AcceleratedWidget kNullAcceleratedWidget = NULL; |
258 #endif | 268 #endif |
259 | 269 |
260 } // namespace gfx | 270 } // namespace gfx |
261 | 271 |
262 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ | 272 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ |
OLD | NEW |