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

Side by Side Diff: ui/gfx/native_widget_types.h

Issue 8486020: compositor_unittests target is unimplmented on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and nit. Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // window id. 219 // window id.
220 #if defined(OS_WIN) 220 #if defined(OS_WIN)
221 typedef HWND PluginWindowHandle; 221 typedef HWND PluginWindowHandle;
222 const PluginWindowHandle kNullPluginWindow = NULL; 222 const PluginWindowHandle kNullPluginWindow = NULL;
223 #elif defined(USE_WAYLAND) 223 #elif defined(USE_WAYLAND)
224 typedef struct wl_egl_window* PluginWindowHandle; 224 typedef struct wl_egl_window* PluginWindowHandle;
225 const PluginWindowHandle kNullPluginWindow = NULL; 225 const PluginWindowHandle kNullPluginWindow = NULL;
226 #elif defined(USE_X11) 226 #elif defined(USE_X11)
227 typedef unsigned long PluginWindowHandle; 227 typedef unsigned long PluginWindowHandle;
228 const PluginWindowHandle kNullPluginWindow = 0; 228 const PluginWindowHandle kNullPluginWindow = 0;
229 #elif defined(USE_AURA) && defined(OS_MACOSX)
230 // Mac-Aura uses NSView-backed GLSurface. Regular Mac does not.
231 // TODO(dhollowa): Rationalize these two definitions. http://crbug.com/104551.
232 typedef NSView* PluginWindowHandle;
233 const PluginWindowHandle kNullPluginWindow = 0;
229 #else 234 #else
230 // On OS X we don't have windowed plugins. 235 // On OS X we don't have windowed plugins.
231 // We use a NULL/0 PluginWindowHandle in shared code to indicate there 236 // We use a NULL/0 PluginWindowHandle in shared code to indicate there
232 // is no window present, so mirror that behavior here. 237 // is no window present, so mirror that behavior here.
233 // 238 //
234 // The GPU plugin is currently an exception to this rule. As of this 239 // The GPU plugin is currently an exception to this rule. As of this
235 // writing it uses some NPAPI infrastructure, and minimally we need 240 // writing it uses some NPAPI infrastructure, and minimally we need
236 // to identify the plugin instance via this window handle. When the 241 // to identify the plugin instance via this window handle. When the
237 // GPU plugin becomes a full-on GPU process, this typedef can be 242 // GPU plugin becomes a full-on GPU process, this typedef can be
238 // returned to a bool. For now we use a type large enough to hold a 243 // returned to a bool. For now we use a type large enough to hold a
239 // pointer on 64-bit architectures in case we need this capability. 244 // pointer on 64-bit architectures in case we need this capability.
240 typedef uint64 PluginWindowHandle; 245 typedef uint64 PluginWindowHandle;
241 const PluginWindowHandle kNullPluginWindow = 0; 246 const PluginWindowHandle kNullPluginWindow = 0;
242 #endif 247 #endif
243 248
244 // AcceleratedWidget provides a surface to compositors to paint pixels. 249 // AcceleratedWidget provides a surface to compositors to paint pixels.
245 #if defined(OS_WIN) 250 #if defined(OS_WIN)
246 typedef HWND AcceleratedWidget; 251 typedef HWND AcceleratedWidget;
247 const AcceleratedWidget kNullAcceleratedWidget = NULL; 252 const AcceleratedWidget kNullAcceleratedWidget = NULL;
248 #elif defined(USE_WAYLAND) 253 #elif defined(USE_WAYLAND)
249 typedef struct wl_egl_window* AcceleratedWidget; 254 typedef struct wl_egl_window* AcceleratedWidget;
250 const AcceleratedWidget kNullAcceleratedWidget = NULL; 255 const AcceleratedWidget kNullAcceleratedWidget = NULL;
251 #elif defined(USE_X11) 256 #elif defined(USE_X11)
252 typedef unsigned long AcceleratedWidget; 257 typedef unsigned long AcceleratedWidget;
253 const AcceleratedWidget kNullAcceleratedWidget = 0; 258 const AcceleratedWidget kNullAcceleratedWidget = 0;
259 #elif defined(USE_AURA) && defined(OS_MACOSX)
260 // Mac-Aura uses NSView-backed GLSurface. Regular Mac does not.
261 // TODO(dhollowa): Rationalize these two definitions. http://crbug.com/104551.
262 typedef NSView* AcceleratedWidget;
263 const AcceleratedWidget kNullAcceleratedWidget = 0;
254 #else 264 #else
255 typedef void* AcceleratedWidget; 265 typedef void* AcceleratedWidget;
256 const AcceleratedWidget kNullAcceleratedWidget = NULL; 266 const AcceleratedWidget kNullAcceleratedWidget = NULL;
257 #endif 267 #endif
258 268
259 } // namespace gfx 269 } // namespace gfx
260 270
261 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ 271 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698