diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-12 19:26:40 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-12 19:26:40 +0000 |
commit | fc790462b4f248712bbc8c3734664dd6b05f80f2 (patch) | |
tree | 4ef04b11c6620ac2c95fb3f87e0d722e7bbcd1ee /gfx | |
parent | 1d0ee423b6a0bb307c7c19fe28c95d8761691e9a (diff) | |
download | chromium_src-fc790462b4f248712bbc8c3734664dd6b05f80f2.zip chromium_src-fc790462b4f248712bbc8c3734664dd6b05f80f2.tar.gz chromium_src-fc790462b4f248712bbc8c3734664dd6b05f80f2.tar.bz2 |
Set the job name for the print job on the Mac.
BUG=http://crbug.com/29188
TEST=as in bug
Review URL: http://codereview.chromium.org/1997016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/native_widget_types.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gfx/native_widget_types.h b/gfx/native_widget_types.h index b45c3b6..8cbbf8f 100644 --- a/gfx/native_widget_types.h +++ b/gfx/native_widget_types.h @@ -89,12 +89,26 @@ typedef intptr_t NativeViewId; #if defined(OS_WIN) // Convert a NativeViewId to a NativeView. -// This is only used on Windows, where we pass an HWND into the renderer and -// let the renderer operate on it. On other platforms, the renderer doesn't -// have access to native platform widgets. +// +// On Windows, we pass an HWND into the renderer. As stated above, the renderer +// should not be performing operations on the view. static inline NativeView NativeViewFromId(NativeViewId id) { return reinterpret_cast<NativeView>(id); } +#define NativeViewFromIdInBrowser(x) NativeViewFromId(x) +#elif defined(OS_MACOSX) +// On the Mac, a NativeView is a pointer to an object, and is useless outside +// the process in which it was created. NativeViewFromId should only be used +// inside the appropriate platform ifdef outside of the browser. +// (NativeViewFromIdInBrowser can be used everywhere in the browser.) If your +// cross-platform design involves a call to NativeViewFromId from outside the +// browser it will never work on the Mac and is fundamentally broken. + +// Please do not call this from outside the browser. It won't work; the name +// should give you a subtle hint. +static inline NativeView NativeViewFromIdInBrowser(NativeViewId id) { + return reinterpret_cast<NativeView>(id); +} #endif // Convert a NativeView to a NativeViewId. See the comments at the top of |