summaryrefslogtreecommitdiffstats
path: root/base/mac_util.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-02 17:04:55 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-02 17:04:55 +0000
commit18db46180363c8705c6e21747b97f4beb00bfa01 (patch)
treee933f71549a0ff6594a16a7d498542512b74cef3 /base/mac_util.mm
parent1350c0f41aa6842ee0e0b28bce2147fd90cec21b (diff)
downloadchromium_src-18db46180363c8705c6e21747b97f4beb00bfa01.zip
chromium_src-18db46180363c8705c6e21747b97f4beb00bfa01.tar.gz
chromium_src-18db46180363c8705c6e21747b97f4beb00bfa01.tar.bz2
Hide/show cursor according to NSCursor requests.
BUG=http://crbug.com/32703 TEST=when hiding cursor (Flash 10.1), cursor hides (but doesn't stay hidden; that's a different bug) Review URL: http://codereview.chromium.org/560003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac_util.mm')
-rw-r--r--base/mac_util.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/mac_util.mm b/base/mac_util.mm
index 1c4ef73b..2975b4e 100644
--- a/base/mac_util.mm
+++ b/base/mac_util.mm
@@ -167,6 +167,13 @@ void ReleaseFullScreen() {
SetSystemUIMode(kUIModeNormal, 0);
}
+void SetCursorVisibility(bool visible) {
+ if (visible)
+ [NSCursor unhide];
+ else
+ [NSCursor hide];
+}
+
void GrabWindowSnapshot(NSWindow* window,
std::vector<unsigned char>* png_representation) {
// Make sure to grab the "window frame" view so we get current tab +