summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webcursor_mac.mm
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-05 20:27:47 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-05 20:27:47 +0000
commitf6705bcd3cd81a9dd62123bfe58cd5b34d2df960 (patch)
tree6cc680139c75f6f50093c774ff46a251b567ee9b /webkit/glue/webcursor_mac.mm
parentc710f7bea2cc4a67b67eb0fd861c83db079e5762 (diff)
downloadchromium_src-f6705bcd3cd81a9dd62123bfe58cd5b34d2df960.zip
chromium_src-f6705bcd3cd81a9dd62123bfe58cd5b34d2df960.tar.gz
chromium_src-f6705bcd3cd81a9dd62123bfe58cd5b34d2df960.tar.bz2
Make Mac WebCursor glue use the nsimage_cache
BUG=16438, 14610 (in in support of bundling changes to fix autoupdate) TEST=Hover over a link, get the finger Review URL: http://codereview.chromium.org/259049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webcursor_mac.mm')
-rw-r--r--webkit/glue/webcursor_mac.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/glue/webcursor_mac.mm b/webkit/glue/webcursor_mac.mm
index da42479..2d6dee6 100644
--- a/webkit/glue/webcursor_mac.mm
+++ b/webkit/glue/webcursor_mac.mm
@@ -7,6 +7,7 @@
#import <AppKit/AppKit.h>
#include "base/logging.h"
+#include "base/nsimage_cache_mac.h"
#include "base/scoped_cftyperef.h"
#include "webkit/api/public/WebCursorInfo.h"
#include "webkit/api/public/WebImage.h"
@@ -18,11 +19,12 @@ using WebKit::WebSize;
namespace {
-// TODO(avi): Is loading resources what we want to do here?
+// TODO: This image fech can (and probably should) be serviced by the resource
+// resource bundle instead of going through nsimage_cache.
NSCursor* LoadCursor(const char* name, int x, int y) {
NSString* file_name = [NSString stringWithUTF8String:name];
DCHECK(file_name);
- NSImage* cursor_image = [NSImage imageNamed:file_name];
+ NSImage* cursor_image = nsimage_cache::ImageNamed(file_name);
DCHECK(cursor_image);
return [[[NSCursor alloc] initWithImage:cursor_image
hotSpot:NSMakePoint(x, y)] autorelease];