diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-17 04:09:06 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-17 04:09:06 +0000 |
commit | df0ca6c858762b101bf424ff6c0522409fa195fc (patch) | |
tree | efa188eee6972e2c0de358f2d19a2348ce6dcb06 /webkit/glue/webcursor_mac.mm | |
parent | 73de26a684944782a92f8e6840e1b290c9a424cd (diff) | |
download | chromium_src-df0ca6c858762b101bf424ff6c0522409fa195fc.zip chromium_src-df0ca6c858762b101bf424ff6c0522409fa195fc.tar.gz chromium_src-df0ca6c858762b101bf424ff6c0522409fa195fc.tar.bz2 |
Move scoped_cftyperef from base to base/mac, use the new namespace, and name it
properly (scoped_cftyperef -> ScopedCFTypeRef).
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3855001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62887 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webcursor_mac.mm')
-rw-r--r-- | webkit/glue/webcursor_mac.mm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/webkit/glue/webcursor_mac.mm b/webkit/glue/webcursor_mac.mm index a6e7fc0..6b2729e 100644 --- a/webkit/glue/webcursor_mac.mm +++ b/webkit/glue/webcursor_mac.mm @@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/nsimage_cache_mac.h" -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" @@ -33,11 +33,12 @@ NSCursor* LoadCursor(const char* name, int x, int y) { CGImageRef CreateCGImageFromCustomData(const std::vector<char>& custom_data, const gfx::Size& custom_size) { - scoped_cftyperef<CGColorSpaceRef> cg_color(CGColorSpaceCreateDeviceRGB()); + base::mac::ScopedCFTypeRef<CGColorSpaceRef> cg_color( + CGColorSpaceCreateDeviceRGB()); // This is safe since we're not going to draw into the context we're creating. void* data = const_cast<char*>(&custom_data[0]); // The settings here match SetCustomData() below; keep in sync. - scoped_cftyperef<CGContextRef> context( + base::mac::ScopedCFTypeRef<CGContextRef> context( CGBitmapContextCreate(data, custom_size.width(), custom_size.height(), @@ -56,7 +57,7 @@ NSCursor* CreateCustomCursor(const std::vector<char>& custom_data, // results in an infinite loop. This CHECK ensures that we crash instead. CHECK(!custom_data.empty()); - scoped_cftyperef<CGImageRef> cg_image( + base::mac::ScopedCFTypeRef<CGImageRef> cg_image( CreateCGImageFromCustomData(custom_data, custom_size)); NSBitmapImageRep* ns_bitmap = @@ -258,7 +259,7 @@ void WebCursor::InitFromCursor(const Cursor* cursor) { } } - scoped_cftyperef<CGImageRef> cg_image( + base::mac::ScopedCFTypeRef<CGImageRef> cg_image( CreateCGImageFromCustomData(raw_data, custom_size)); WebKit::WebCursorInfo cursor_info; @@ -322,7 +323,7 @@ void WebCursor::SetCustomData(const WebImage& image) { if (image.isNull()) return; - scoped_cftyperef<CGColorSpaceRef> cg_color( + base::mac::ScopedCFTypeRef<CGColorSpaceRef> cg_color( CGColorSpaceCreateDeviceRGB()); const WebSize& image_dimensions = image.size(); @@ -337,7 +338,7 @@ void WebCursor::SetCustomData(const WebImage& image) { // These settings match up with the code in CreateCustomCursor() above; keep // them in sync. // TODO(avi): test to ensure that the flags here are correct for RGBA - scoped_cftyperef<CGContextRef> context( + base::mac::ScopedCFTypeRef<CGContextRef> context( CGBitmapContextCreate(&custom_data_[0], image_width, image_height, @@ -354,7 +355,7 @@ void WebCursor::ImageFromCustomData(WebImage* image) const { if (custom_data_.empty()) return; - scoped_cftyperef<CGImageRef> cg_image( + base::mac::ScopedCFTypeRef<CGImageRef> cg_image( CreateCGImageFromCustomData(custom_data_, custom_size_)); *image = cg_image.get(); } |