summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/pepper_graphics_2d.cc6
-rw-r--r--webkit/glue/plugins/pepper_plugin_instance.cc6
-rw-r--r--webkit/glue/plugins/plugin_lib_mac.mm15
-rw-r--r--webkit/glue/webcursor_mac.mm17
4 files changed, 23 insertions, 21 deletions
diff --git a/webkit/glue/plugins/pepper_graphics_2d.cc b/webkit/glue/plugins/pepper_graphics_2d.cc
index c122b5c..864b138d 100644
--- a/webkit/glue/plugins/pepper_graphics_2d.cc
+++ b/webkit/glue/plugins/pepper_graphics_2d.cc
@@ -25,7 +25,7 @@
#if defined(OS_MACOSX)
#include "base/mac_util.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#endif
namespace pepper {
@@ -416,11 +416,11 @@ void Graphics2D::Paint(WebKit::WebCanvas* canvas,
#if defined(OS_MACOSX)
SkAutoLockPixels lock(backing_bitmap);
- scoped_cftyperef<CGDataProviderRef> data_provider(
+ base::mac::ScopedCFTypeRef<CGDataProviderRef> data_provider(
CGDataProviderCreateWithData(
NULL, backing_bitmap.getAddr32(0, 0),
backing_bitmap.rowBytes() * backing_bitmap.height(), NULL));
- scoped_cftyperef<CGImageRef> image(
+ base::mac::ScopedCFTypeRef<CGImageRef> image(
CGImageCreate(
backing_bitmap.width(), backing_bitmap.height(),
8, 32, backing_bitmap.rowBytes(),
diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc b/webkit/glue/plugins/pepper_plugin_instance.cc
index 30c4fb3..8438da6 100644
--- a/webkit/glue/plugins/pepper_plugin_instance.cc
+++ b/webkit/glue/plugins/pepper_plugin_instance.cc
@@ -8,7 +8,7 @@
#include "base/metrics/histogram.h"
#if defined(OS_MACOSX)
#include "base/mac_util.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#endif
#include "base/scoped_ptr.h"
#include "base/utf_string_conversions.h"
@@ -1027,11 +1027,11 @@ void PluginInstance::DrawSkBitmapToCanvas(
int canvas_height) {
SkAutoLockPixels lock(bitmap);
DCHECK(bitmap.getConfig() == SkBitmap::kARGB_8888_Config);
- scoped_cftyperef<CGDataProviderRef> data_provider(
+ base::mac::ScopedCFTypeRef<CGDataProviderRef> data_provider(
CGDataProviderCreateWithData(
NULL, bitmap.getAddr32(0, 0),
bitmap.rowBytes() * bitmap.height(), NULL));
- scoped_cftyperef<CGImageRef> image(
+ base::mac::ScopedCFTypeRef<CGImageRef> image(
CGImageCreate(
bitmap.width(), bitmap.height(),
8, 32, bitmap.rowBytes(),
diff --git a/webkit/glue/plugins/plugin_lib_mac.mm b/webkit/glue/plugins/plugin_lib_mac.mm
index bd2bcbb..89444c8 100644
--- a/webkit/glue/plugins/plugin_lib_mac.mm
+++ b/webkit/glue/plugins/plugin_lib_mac.mm
@@ -6,8 +6,8 @@
#include "webkit/glue/plugins/plugin_lib.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/native_library.h"
-#include "base/scoped_cftyperef.h"
#include "base/scoped_ptr.h"
#include "base/string_split.h"
#include "base/string_util.h"
@@ -19,8 +19,9 @@ static const short kSTRTypeDefinitionResourceID = 128;
static const short kSTRTypeDescriptionResourceID = 127;
static const short kSTRPluginDescriptionResourceID = 126;
-namespace NPAPI
-{
+using base::mac::ScopedCFTypeRef;
+
+namespace NPAPI {
namespace {
@@ -161,7 +162,7 @@ bool GetSTRResource(CFBundleRef bundle, short res_id,
pointer += sizeof(short);
for (short i = 0; i < num_strings; ++i) {
// Despite being 8-bits wide, these are legacy encoded. Make a round trip.
- scoped_cftyperef<CFStringRef> str(CFStringCreateWithPascalStringNoCopy(
+ ScopedCFTypeRef<CFStringRef> str(CFStringCreateWithPascalStringNoCopy(
kCFAllocatorDefault,
(unsigned char*)pointer,
GetApplicationTextEncoding(), // is this right?
@@ -309,13 +310,13 @@ bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
//
// Strictly speaking, only STR# 128 is required.
- scoped_cftyperef<CFURLRef> bundle_url(CFURLCreateFromFileSystemRepresentation(
+ ScopedCFTypeRef<CFURLRef> bundle_url(CFURLCreateFromFileSystemRepresentation(
kCFAllocatorDefault, (const UInt8*)filename.value().c_str(),
filename.value().length(), true));
if (!bundle_url)
return false;
- scoped_cftyperef<CFBundleRef> bundle(CFBundleCreate(kCFAllocatorDefault,
- bundle_url.get()));
+ ScopedCFTypeRef<CFBundleRef> bundle(CFBundleCreate(kCFAllocatorDefault,
+ bundle_url.get()));
if (!bundle)
return false;
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();
}