Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: webkit/glue/webcursor_mac.mm

Issue 259049: Make Mac WebCursor glue use the nsimage_cache (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webcursor_mac.mm
===================================================================
--- webkit/glue/webcursor_mac.mm (revision 28016)
+++ webkit/glue/webcursor_mac.mm (working copy)
@@ -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 @@
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];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698