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

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

Issue 13886018: Add a factory and defines for native Linux surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 typedef unsigned long PluginWindowHandle; 243 typedef unsigned long PluginWindowHandle;
244 const PluginWindowHandle kNullPluginWindow = 0; 244 const PluginWindowHandle kNullPluginWindow = 0;
245 #elif defined(USE_AURA) && defined(OS_MACOSX) 245 #elif defined(USE_AURA) && defined(OS_MACOSX)
246 // Mac-Aura uses NSView-backed GLSurface. Regular Mac does not. 246 // Mac-Aura uses NSView-backed GLSurface. Regular Mac does not.
247 // TODO(dhollowa): Rationalize these two definitions. http://crbug.com/104551. 247 // TODO(dhollowa): Rationalize these two definitions. http://crbug.com/104551.
248 typedef NSView* PluginWindowHandle; 248 typedef NSView* PluginWindowHandle;
249 const PluginWindowHandle kNullPluginWindow = 0; 249 const PluginWindowHandle kNullPluginWindow = 0;
250 #elif defined(OS_ANDROID) 250 #elif defined(OS_ANDROID)
251 typedef uint64 PluginWindowHandle; 251 typedef uint64 PluginWindowHandle;
252 const PluginWindowHandle kNullPluginWindow = 0; 252 const PluginWindowHandle kNullPluginWindow = 0;
253 #elif defined(USE_NATIVE_SURFACE_LINUX)
254 typedef intptr_t PluginWindowHandle;
255 const PluginWindowHandle kNullPluginWindow = 0;
253 #else 256 #else
254 // On OS X we don't have windowed plugins. 257 // On OS X we don't have windowed plugins.
255 // We use a NULL/0 PluginWindowHandle in shared code to indicate there 258 // We use a NULL/0 PluginWindowHandle in shared code to indicate there
256 // is no window present, so mirror that behavior here. 259 // is no window present, so mirror that behavior here.
257 // 260 //
258 // The GPU plugin is currently an exception to this rule. As of this 261 // The GPU plugin is currently an exception to this rule. As of this
259 // writing it uses some NPAPI infrastructure, and minimally we need 262 // writing it uses some NPAPI infrastructure, and minimally we need
260 // to identify the plugin instance via this window handle. When the 263 // to identify the plugin instance via this window handle. When the
261 // GPU plugin becomes a full-on GPU process, this typedef can be 264 // GPU plugin becomes a full-on GPU process, this typedef can be
262 // returned to a bool. For now we use a type large enough to hold a 265 // returned to a bool. For now we use a type large enough to hold a
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 const AcceleratedWidget kNullAcceleratedWidget = 0; 311 const AcceleratedWidget kNullAcceleratedWidget = 0;
309 #elif defined(OS_IOS) 312 #elif defined(OS_IOS)
310 typedef UIView* AcceleratedWidget; 313 typedef UIView* AcceleratedWidget;
311 const AcceleratedWidget kNullAcceleratedWidget = 0; 314 const AcceleratedWidget kNullAcceleratedWidget = 0;
312 #elif defined(OS_MACOSX) 315 #elif defined(OS_MACOSX)
313 typedef NSView* AcceleratedWidget; 316 typedef NSView* AcceleratedWidget;
314 const AcceleratedWidget kNullAcceleratedWidget = 0; 317 const AcceleratedWidget kNullAcceleratedWidget = 0;
315 #elif defined(OS_ANDROID) 318 #elif defined(OS_ANDROID)
316 typedef ANativeWindow* AcceleratedWidget; 319 typedef ANativeWindow* AcceleratedWidget;
317 const AcceleratedWidget kNullAcceleratedWidget = 0; 320 const AcceleratedWidget kNullAcceleratedWidget = 0;
321 #elif defined(USE_NATIVE_SURFACE_LINUX)
322 typedef intptr_t AcceleratedWidget;
323 const AcceleratedWidget kNullAcceleratedWidget = 0;
318 #else 324 #else
319 #error unknown platform 325 #error unknown platform
320 #endif 326 #endif
321 327
322 typedef void* GpuMemoryBufferHandle; 328 typedef void* GpuMemoryBufferHandle;
323 329
324 } // namespace gfx 330 } // namespace gfx
325 331
326 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ 332 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698