OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 APP_GFX_NATIVE_WIDGET_TYPES_H_ | 5 #ifndef APP_GFX_NATIVE_WIDGET_TYPES_H_ |
6 #define APP_GFX_NATIVE_WIDGET_TYPES_H_ | 6 #define APP_GFX_NATIVE_WIDGET_TYPES_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // Not inlined because it involves pulling too many headers. | 122 // Not inlined because it involves pulling too many headers. |
123 NativeViewId IdFromNativeView(NativeView view); | 123 NativeViewId IdFromNativeView(NativeView view); |
124 #endif // defined(USE_X11) | 124 #endif // defined(USE_X11) |
125 | 125 |
126 | 126 |
127 // PluginWindowHandle is an abstraction wrapping "the types of windows | 127 // PluginWindowHandle is an abstraction wrapping "the types of windows |
128 // used by NPAPI plugins". On Windows it's an HWND, on X it's an X | 128 // used by NPAPI plugins". On Windows it's an HWND, on X it's an X |
129 // window id. | 129 // window id. |
130 #if defined(OS_WIN) | 130 #if defined(OS_WIN) |
131 typedef HWND PluginWindowHandle; | 131 typedef HWND PluginWindowHandle; |
| 132 const PluginWindowHandle kNullPluginWindow = NULL; |
132 #elif defined(USE_X11) | 133 #elif defined(USE_X11) |
133 typedef unsigned long PluginWindowHandle; | 134 typedef unsigned long PluginWindowHandle; |
| 135 const PluginWindowHandle kNullPluginWindow = 0; |
134 #else | 136 #else |
135 // On OS X we don't have windowed plugins. | 137 // On OS X we don't have windowed plugins. |
136 // We use a NULL/0 PluginWindowHandle in shared code to indicate there | 138 // We use a NULL/0 PluginWindowHandle in shared code to indicate there |
137 // is no window present, so mirror that behavior here. | 139 // is no window present, so mirror that behavior here. |
138 typedef bool PluginWindowHandle; | 140 typedef bool PluginWindowHandle; |
| 141 const PluginWindowHandle kNullPluginWindow = false; |
139 #endif | 142 #endif |
140 | 143 |
141 } // namespace gfx | 144 } // namespace gfx |
142 | 145 |
143 #endif // APP_GFX_NATIVE_WIDGET_TYPES_H_ | 146 #endif // APP_GFX_NATIVE_WIDGET_TYPES_H_ |
OLD | NEW |