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

Unified Diff: webkit/glue/webcursor_mac.mm

Issue 3855001: Move scoped_cftyperef from base to base/mac, use the new namespace, and name ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | « webkit/glue/plugins/plugin_lib_mac.mm ('k') | 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 62861)
+++ webkit/glue/webcursor_mac.mm (working copy)
@@ -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 @@
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 @@
// 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 @@
}
}
- scoped_cftyperef<CGImageRef> cg_image(
+ base::mac::ScopedCFTypeRef<CGImageRef> cg_image(
CreateCGImageFromCustomData(raw_data, custom_size));
WebKit::WebCursorInfo cursor_info;
@@ -322,7 +323,7 @@
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 @@
// 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 @@
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();
}
« no previous file with comments | « webkit/glue/plugins/plugin_lib_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698