diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 21:47:49 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 21:47:49 +0000 |
commit | 03ce3cd72a2bb330c774f47cea4ad346d5c26cad (patch) | |
tree | 84e17c64defeaf2cf1850aef7071a1c0c94f327f /base/gfx | |
parent | ef9162785c55957324e72f737bb9b6b2406053dd (diff) | |
download | chromium_src-03ce3cd72a2bb330c774f47cea4ad346d5c26cad.zip chromium_src-03ce3cd72a2bb330c774f47cea4ad346d5c26cad.tar.gz chromium_src-03ce3cd72a2bb330c774f47cea4ad346d5c26cad.tar.bz2 |
Make converting from NativeViewId to NativeView an error on Mac.
Goal is to prevent someone from checking in new cross-platform code relying on this.
Review URL: http://codereview.chromium.org/149342
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx')
-rw-r--r-- | base/gfx/native_widget_types.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/base/gfx/native_widget_types.h b/base/gfx/native_widget_types.h index bec3313..d165cd4a 100644 --- a/base/gfx/native_widget_types.h +++ b/base/gfx/native_widget_types.h @@ -89,10 +89,19 @@ typedef intptr_t NativeViewId; // On Windows, these are both HWNDS so it's just a cast. // On Mac, for now, we pass the NSView pointer into the renderer // On Linux we use an opaque id -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) static inline NativeView NativeViewFromId(NativeViewId id) { return reinterpret_cast<NativeView>(id); } +#elif defined(OS_MACOSX) + +// A recent CL removed the need for Mac to actually convert +// NativeViewId to NativeView. Until other platforms make changes, +// the platform-independent code cannot be removed. The following is +// to discourage new platform-independent uses. + +#define NativeViewFromId(x) NATIVE_VIEW_FROM_ID_NOT_AVAILABLE_ON_MAC + #elif defined(OS_LINUX) // A NativeView on Linux is a GtkWidget*. However, we can't go directly from an // X window ID to a GtkWidget. Thus, functions which handle NativeViewIds from |