| 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 <stdint.h> |
| 9 |
| 10 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "ui/gfx/gfx_export.h" |
| 9 | 13 |
| 10 #if defined(OS_ANDROID) | 14 #if defined(OS_ANDROID) |
| 11 #include <jni.h> | 15 #include <jni.h> |
| 12 #endif | 16 #endif |
| 13 | 17 |
| 14 #include "base/basictypes.h" | |
| 15 #include "base/logging.h" | |
| 16 #include "ui/gfx/gfx_export.h" | |
| 17 | |
| 18 // This file provides cross platform typedefs for native widget types. | 18 // This file provides cross platform typedefs for native widget types. |
| 19 // NativeWindow: this is a handle to a native, top-level window | 19 // NativeWindow: this is a handle to a native, top-level window |
| 20 // NativeView: this is a handle to a native UI element. It may be the | 20 // NativeView: this is a handle to a native UI element. It may be the |
| 21 // same type as a NativeWindow on some platforms. | 21 // same type as a NativeWindow on some platforms. |
| 22 // NativeViewId: Often, in our cross process model, we need to pass around a | 22 // NativeViewId: Often, in our cross process model, we need to pass around a |
| 23 // reference to a "window". This reference will, say, be echoed back from a | 23 // reference to a "window". This reference will, say, be echoed back from a |
| 24 // renderer to the browser when it wishes to query its size. On Windows we | 24 // renderer to the browser when it wishes to query its size. On Windows we |
| 25 // use an HWND for this. | 25 // use an HWND for this. |
| 26 // | 26 // |
| 27 // As a rule of thumb - if you're in the renderer, you should be dealing | 27 // As a rule of thumb - if you're in the renderer, you should be dealing |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // PluginWindowHandle is an abstraction wrapping "the types of windows | 196 // PluginWindowHandle is an abstraction wrapping "the types of windows |
| 197 // used by NPAPI plugins". On Windows it's an HWND, on X it's an X | 197 // used by NPAPI plugins". On Windows it's an HWND, on X it's an X |
| 198 // window id. | 198 // window id. |
| 199 #if defined(OS_WIN) | 199 #if defined(OS_WIN) |
| 200 typedef HWND PluginWindowHandle; | 200 typedef HWND PluginWindowHandle; |
| 201 const PluginWindowHandle kNullPluginWindow = NULL; | 201 const PluginWindowHandle kNullPluginWindow = NULL; |
| 202 #elif defined(USE_X11) | 202 #elif defined(USE_X11) |
| 203 typedef unsigned long PluginWindowHandle; | 203 typedef unsigned long PluginWindowHandle; |
| 204 const PluginWindowHandle kNullPluginWindow = 0; | 204 const PluginWindowHandle kNullPluginWindow = 0; |
| 205 #elif defined(OS_ANDROID) | 205 #elif defined(OS_ANDROID) |
| 206 typedef uint32 PluginWindowHandle; | 206 typedef uint32_t PluginWindowHandle; |
| 207 const PluginWindowHandle kNullPluginWindow = 0; | 207 const PluginWindowHandle kNullPluginWindow = 0; |
| 208 #elif defined(USE_OZONE) | 208 #elif defined(USE_OZONE) |
| 209 typedef intptr_t PluginWindowHandle; | 209 typedef intptr_t PluginWindowHandle; |
| 210 const PluginWindowHandle kNullPluginWindow = 0; | 210 const PluginWindowHandle kNullPluginWindow = 0; |
| 211 #else | 211 #else |
| 212 typedef uint32 PluginWindowHandle; | 212 typedef uint32_t PluginWindowHandle; |
| 213 const PluginWindowHandle kNullPluginWindow = 0; | 213 const PluginWindowHandle kNullPluginWindow = 0; |
| 214 #endif | 214 #endif |
| 215 | 215 |
| 216 enum SurfaceType { | 216 enum SurfaceType { |
| 217 EMPTY, | 217 EMPTY, |
| 218 NATIVE_DIRECT, | 218 NATIVE_DIRECT, |
| 219 NULL_TRANSPORT, | 219 NULL_TRANSPORT, |
| 220 SURFACE_TYPE_LAST = NULL_TRANSPORT | 220 SURFACE_TYPE_LAST = NULL_TRANSPORT |
| 221 }; | 221 }; |
| 222 | 222 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 #elif defined(USE_OZONE) | 255 #elif defined(USE_OZONE) |
| 256 typedef intptr_t AcceleratedWidget; | 256 typedef intptr_t AcceleratedWidget; |
| 257 const AcceleratedWidget kNullAcceleratedWidget = 0; | 257 const AcceleratedWidget kNullAcceleratedWidget = 0; |
| 258 #else | 258 #else |
| 259 #error unknown platform | 259 #error unknown platform |
| 260 #endif | 260 #endif |
| 261 | 261 |
| 262 } // namespace gfx | 262 } // namespace gfx |
| 263 | 263 |
| 264 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ | 264 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ |
| OLD | NEW |