summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/breakpad_mac.mm4
-rw-r--r--chrome/browser/cocoa/animatable_image.mm4
-rw-r--r--chrome/browser/cocoa/certificate_viewer.mm4
-rw-r--r--chrome/browser/cocoa/download_started_animation_mac.mm1
-rw-r--r--chrome/browser/cocoa/file_metadata.mm4
-rw-r--r--chrome/browser/cocoa/install_from_dmg.mm3
-rw-r--r--chrome/browser/cocoa/page_info_window_mac.mm1
-rw-r--r--chrome/browser/cocoa/shell_dialogs_mac.mm6
-rw-r--r--chrome/browser/cocoa/ssl_client_certificate_selector.mm1
-rw-r--r--chrome/browser/cocoa/tab_view.mm6
-rw-r--r--chrome/browser/cocoa/tabpose_window.h6
-rw-r--r--chrome/browser/cocoa/tabpose_window.mm14
-rw-r--r--chrome/browser/file_path_watcher_mac.cc8
-rw-r--r--chrome/browser/policy/configuration_policy_provider_mac.cc6
-rw-r--r--chrome/browser/policy/configuration_policy_provider_mac_unittest.cc18
-rw-r--r--chrome/browser/preferences_mock_mac.h6
-rw-r--r--chrome/browser/renderer_host/backing_store_mac.h6
-rw-r--r--chrome/browser/renderer_host/backing_store_mac.mm13
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm3
-rw-r--r--chrome/browser/search_engines/template_url_prepopulate_data.cc4
-rw-r--r--chrome/common/font_loader_mac.mm1
-rw-r--r--chrome/common/mach_message_source_mac.cc3
-rw-r--r--chrome/common/mach_message_source_mac.h4
-rw-r--r--chrome/common/sandbox_mac.mm10
-rw-r--r--chrome/common/sandbox_mac_fontloading_unittest.mm4
-rw-r--r--chrome/plugin/plugin_thread.cc17
-rw-r--r--chrome/plugin/webplugin_proxy.cc8
-rw-r--r--chrome/plugin/webplugin_proxy.h6
-rw-r--r--chrome/renderer/print_web_view_helper_mac.mm1
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.cc6
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc4
31 files changed, 91 insertions, 91 deletions
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index dc9c1ad..54d32c0 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -14,8 +14,8 @@
#include "base/file_util.h"
#import "base/logging.h"
#include "base/mac_util.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/path_service.h"
-#include "base/scoped_cftyperef.h"
#import "base/scoped_nsautorelease_pool.h"
#include "base/sys_string_conversions.h"
#import "breakpad/src/client/mac/Framework/Breakpad.h"
@@ -63,7 +63,7 @@ void InitCrashReporter() {
if (is_browser) {
// Since the configuration management infrastructure is possibly not
// initialized when this code runs, read the policy preference directly.
- scoped_cftyperef<CFStringRef> key(
+ base::mac::ScopedCFTypeRef<CFStringRef> key(
base::SysUTF8ToCFStringRef(policy::key::kMetricsReportingEnabled));
Boolean key_valid;
Boolean metrics_reporting_enabled = CFPreferencesGetAppBooleanValue(key,
diff --git a/chrome/browser/cocoa/animatable_image.mm b/chrome/browser/cocoa/animatable_image.mm
index 1c73f55..2169843 100644
--- a/chrome/browser/cocoa/animatable_image.mm
+++ b/chrome/browser/cocoa/animatable_image.mm
@@ -6,7 +6,7 @@
#include "base/logging.h"
#import "base/mac_util.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@interface AnimatableImage (Private)
@@ -130,7 +130,7 @@
// Sets the layer contents by converting the NSImage to a CGImageRef. This will
// rasterize PDF resources.
- (void)setLayerContents:(CALayer*)layer {
- scoped_cftyperef<CGImageRef> image(
+ base::mac::ScopedCFTypeRef<CGImageRef> image(
mac_util::CopyNSImageToCGImage(image_.get()));
// Create the layer that will be animated.
[layer setContents:(id)image.get()];
diff --git a/chrome/browser/cocoa/certificate_viewer.mm b/chrome/browser/cocoa/certificate_viewer.mm
index ed29ef4..8c5a954 100644
--- a/chrome/browser/cocoa/certificate_viewer.mm
+++ b/chrome/browser/cocoa/certificate_viewer.mm
@@ -10,7 +10,7 @@
#include <vector>
#include "base/logging.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "net/base/x509_certificate.h"
void ShowCertificateViewer(gfx::NativeWindow parent,
@@ -19,7 +19,7 @@ void ShowCertificateViewer(gfx::NativeWindow parent,
if (!cert_mac)
return;
- scoped_cftyperef<CFMutableArrayRef> certificates(
+ base::mac::ScopedCFTypeRef<CFMutableArrayRef> certificates(
CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
if (!certificates.get()) {
NOTREACHED();
diff --git a/chrome/browser/cocoa/download_started_animation_mac.mm b/chrome/browser/cocoa/download_started_animation_mac.mm
index 0ff5ef9..0ed926b 100644
--- a/chrome/browser/cocoa/download_started_animation_mac.mm
+++ b/chrome/browser/cocoa/download_started_animation_mac.mm
@@ -12,7 +12,6 @@
#import <QuartzCore/QuartzCore.h>
#include "app/resource_bundle.h"
-#include "base/scoped_cftyperef.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view_mac.h"
#import "chrome/browser/cocoa/animatable_image.h"
diff --git a/chrome/browser/cocoa/file_metadata.mm b/chrome/browser/cocoa/file_metadata.mm
index 63c4aeb..ad3a92f 100644
--- a/chrome/browser/cocoa/file_metadata.mm
+++ b/chrome/browser/cocoa/file_metadata.mm
@@ -8,9 +8,9 @@
#include <Foundation/Foundation.h>
#include "base/file_path.h"
-#include "base/scoped_cftyperef.h"
#include "base/logging.h"
#include "base/mac_util.h"
+#include "base/mac/scoped_cftyperef.h"
#include "googleurl/src/gurl.h"
namespace file_metadata {
@@ -69,7 +69,7 @@ void AddOriginMetadataToFile(const FilePath& file, const GURL& source,
if (!file_path)
return;
- scoped_cftyperef<MDItemRef> md_item(
+ base::mac::ScopedCFTypeRef<MDItemRef> md_item(
MDItemCreate(NULL, reinterpret_cast<CFStringRef>(file_path)));
if (!md_item)
return;
diff --git a/chrome/browser/cocoa/install_from_dmg.mm b/chrome/browser/cocoa/install_from_dmg.mm
index cffe3fc..be6ad3b 100644
--- a/chrome/browser/cocoa/install_from_dmg.mm
+++ b/chrome/browser/cocoa/install_from_dmg.mm
@@ -37,8 +37,7 @@
namespace {
-// Just like scoped_cftyperef from base/scoped_cftyperef.h, but for
-// io_object_t and subclasses.
+// Just like ScopedCFTypeRef but for io_object_t and subclasses.
template<typename IOT>
class scoped_ioobject {
public:
diff --git a/chrome/browser/cocoa/page_info_window_mac.mm b/chrome/browser/cocoa/page_info_window_mac.mm
index e246c0a..2774e1e 100644
--- a/chrome/browser/cocoa/page_info_window_mac.mm
+++ b/chrome/browser/cocoa/page_info_window_mac.mm
@@ -7,7 +7,6 @@
#include <algorithm>
#include "app/l10n_util.h"
-#include "base/scoped_cftyperef.h"
#include "app/resource_bundle.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
diff --git a/chrome/browser/cocoa/shell_dialogs_mac.mm b/chrome/browser/cocoa/shell_dialogs_mac.mm
index 59fc881..bb1ad05 100644
--- a/chrome/browser/cocoa/shell_dialogs_mac.mm
+++ b/chrome/browser/cocoa/shell_dialogs_mac.mm
@@ -15,7 +15,7 @@
#import "base/cocoa_protocols_mac.h"
#include "base/logging.h"
#include "base/mac_util.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#import "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
#include "grit/generated_resources.h"
@@ -308,11 +308,11 @@ NSView* SelectFileDialogImpl::GetAccessoryView(const FileTypeInfo* file_types,
file_types->extensions[type];
DCHECK(!ext_list.empty());
NSString* type_extension = base::SysUTF8ToNSString(ext_list[0]);
- scoped_cftyperef<CFStringRef> uti(
+ base::mac::ScopedCFTypeRef<CFStringRef> uti(
UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension,
(CFStringRef)type_extension,
NULL));
- scoped_cftyperef<CFStringRef> description(
+ base::mac::ScopedCFTypeRef<CFStringRef> description(
UTTypeCopyDescription(uti.get()));
type_description =
diff --git a/chrome/browser/cocoa/ssl_client_certificate_selector.mm b/chrome/browser/cocoa/ssl_client_certificate_selector.mm
index 9db787c..c72e00f 100644
--- a/chrome/browser/cocoa/ssl_client_certificate_selector.mm
+++ b/chrome/browser/cocoa/ssl_client_certificate_selector.mm
@@ -11,7 +11,6 @@
#import "app/l10n_util_mac.h"
#include "base/logging.h"
#include "base/ref_counted.h"
-#include "base/scoped_cftyperef.h"
#import "base/scoped_nsobject.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm
index c9674e7..7b7ed59 100644
--- a/chrome/browser/cocoa/tab_view.mm
+++ b/chrome/browser/cocoa/tab_view.mm
@@ -6,8 +6,8 @@
#include "base/logging.h"
#import "base/mac_util.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/nsimage_cache_mac.h"
-#include "base/scoped_cftyperef.h"
#import "chrome/browser/cocoa/tab_controller.h"
#import "chrome/browser/cocoa/tab_window_controller.h"
#import "chrome/browser/cocoa/themed_window.h"
@@ -967,9 +967,9 @@ const CGFloat kRapidCloseDist = 2.5;
int workspace = -1;
// It's possible to query in bulk, but probably not necessary.
- scoped_cftyperef<CFArrayRef> windowIDs(CFArrayCreate(
+ base::mac::ScopedCFTypeRef<CFArrayRef> windowIDs(CFArrayCreate(
NULL, reinterpret_cast<const void **>(&windowID), 1, NULL));
- scoped_cftyperef<CFArrayRef> descriptions(
+ base::mac::ScopedCFTypeRef<CFArrayRef> descriptions(
CGWindowListCreateDescriptionFromArray(windowIDs));
DCHECK(CFArrayGetCount(descriptions.get()) <= 1);
if (CFArrayGetCount(descriptions.get()) > 0) {
diff --git a/chrome/browser/cocoa/tabpose_window.h b/chrome/browser/cocoa/tabpose_window.h
index fef3bbb..7728367 100644
--- a/chrome/browser/cocoa/tabpose_window.h
+++ b/chrome/browser/cocoa/tabpose_window.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/scoped_nsobject.h"
#include "base/scoped_ptr.h"
@@ -52,8 +52,8 @@ class TabStripModelObserverBridge;
CALayer* selectionHighlight_; // weak
// Colors used by the layers.
- scoped_cftyperef<CGColorRef> gray_;
- scoped_cftyperef<CGColorRef> darkBlue_;
+ base::mac::ScopedCFTypeRef<CGColorRef> gray_;
+ base::mac::ScopedCFTypeRef<CGColorRef> darkBlue_;
TabStripModel* tabStripModel_; // weak
diff --git a/chrome/browser/cocoa/tabpose_window.mm b/chrome/browser/cocoa/tabpose_window.mm
index ca80dc5..c67a5a1 100644
--- a/chrome/browser/cocoa/tabpose_window.mm
+++ b/chrome/browser/cocoa/tabpose_window.mm
@@ -8,6 +8,7 @@
#include "app/resource_bundle.h"
#include "base/mac_util.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/scoped_callback_factory.h"
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_dll_resource.h"
@@ -45,12 +46,13 @@ const CGFloat kObserverChangeAnimationDuration = 0.75; // In seconds.
@implementation DarkGradientLayer
- (void)drawInContext:(CGContextRef)context {
- scoped_cftyperef<CGColorSpaceRef> grayColorSpace(
+ base::mac::ScopedCFTypeRef<CGColorSpaceRef> grayColorSpace(
CGColorSpaceCreateWithName(kCGColorSpaceGenericGray));
CGFloat grays[] = { 0.277, 1.0, 0.39, 1.0 };
CGFloat locations[] = { 0, 1 };
- scoped_cftyperef<CGGradientRef> gradient(CGGradientCreateWithColorComponents(
- grayColorSpace.get(), grays, locations, arraysize(locations)));
+ base::mac::ScopedCFTypeRef<CGGradientRef> gradient(
+ CGGradientCreateWithColorComponents(
+ grayColorSpace.get(), grays, locations, arraysize(locations)));
CGPoint topLeft = CGPointMake(0.0, kTopGradientHeight);
CGContextDrawLinearGradient(context, gradient.get(), topLeft, CGPointZero, 0);
}
@@ -75,7 +77,7 @@ class ThumbnailLoader;
// If the backing store couldn't be used and a thumbnail was returned from a
// renderer process, it's stored in |thumbnail_|.
- scoped_cftyperef<CGImageRef> thumbnail_;
+ base::mac::ScopedCFTypeRef<CGImageRef> thumbnail_;
// True if the layer already sent a thumbnail request to a renderer.
BOOL didSendLoad_;
@@ -222,7 +224,7 @@ void ThumbnailLoader::LoadThumbnail() {
if (backing_store->cg_layer()) {
CGContextDrawLayerInRect(context, destRect, backing_store->cg_layer());
} else {
- scoped_cftyperef<CGImageRef> image(
+ base::mac::ScopedCFTypeRef<CGImageRef> image(
CGBitmapContextCreateImage(backing_store->cg_bitmap()));
CGContextDrawImage(context, destRect, image);
}
@@ -948,7 +950,7 @@ void AnimateCALayerFrameFromTo(
IDR_DEFAULT_FAVICON);
nsFavicon = defaultFavIcon;
}
- scoped_cftyperef<CGImageRef> favicon(
+ base::mac::ScopedCFTypeRef<CGImageRef> favicon(
mac_util::CopyNSImageToCGImage(nsFavicon));
CALayer* faviconLayer = [CALayer layer];
diff --git a/chrome/browser/file_path_watcher_mac.cc b/chrome/browser/file_path_watcher_mac.cc
index ddcfd41..cc925a6 100644
--- a/chrome/browser/file_path_watcher_mac.cc
+++ b/chrome/browser/file_path_watcher_mac.cc
@@ -10,7 +10,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/singleton.h"
#include "base/time.h"
@@ -187,12 +187,12 @@ void FilePathWatcherImpl::UpdateEventStream(FSEventStreamEventId start_event) {
if (fsevent_stream_)
DestroyEventStream();
- scoped_cftyperef<CFStringRef> cf_path(CFStringCreateWithCString(
+ base::mac::ScopedCFTypeRef<CFStringRef> cf_path(CFStringCreateWithCString(
NULL, target_.value().c_str(), kCFStringEncodingMacHFS));
- scoped_cftyperef<CFStringRef> cf_dir_path(CFStringCreateWithCString(
+ base::mac::ScopedCFTypeRef<CFStringRef> cf_dir_path(CFStringCreateWithCString(
NULL, target_.DirName().value().c_str(), kCFStringEncodingMacHFS));
CFStringRef paths_array[] = { cf_path.get(), cf_dir_path.get() };
- scoped_cftyperef<CFArrayRef> watched_paths(CFArrayCreate(
+ base::mac::ScopedCFTypeRef<CFArrayRef> watched_paths(CFArrayCreate(
NULL, reinterpret_cast<const void**>(paths_array), arraysize(paths_array),
&kCFTypeArrayCallBacks));
diff --git a/chrome/browser/policy/configuration_policy_provider_mac.cc b/chrome/browser/policy/configuration_policy_provider_mac.cc
index 185995a..552e33c 100644
--- a/chrome/browser/policy/configuration_policy_provider_mac.cc
+++ b/chrome/browser/policy/configuration_policy_provider_mac.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/policy/configuration_policy_provider_mac.h"
#include "base/logging.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
namespace policy {
@@ -26,9 +26,9 @@ bool ConfigurationPolicyProviderMac::Provide(ConfigurationPolicyStore* store) {
for (PolicyValueMap::const_iterator current = mapping.begin();
current != mapping.end(); ++current) {
- scoped_cftyperef<CFStringRef> name(
+ base::mac::ScopedCFTypeRef<CFStringRef> name(
base::SysUTF8ToCFStringRef(current->name));
- scoped_cftyperef<CFPropertyListRef> value(
+ base::mac::ScopedCFTypeRef<CFPropertyListRef> value(
preferences_->CopyAppValue(name, kCFPreferencesCurrentApplication));
if (!value.get())
continue;
diff --git a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
index 6bf40bb..86794a0 100644
--- a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
@@ -4,6 +4,7 @@
#include <gtest/gtest.h>
+#include "base/mac/scoped_cftyperef.h"
#include "base/stl_util-inl.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/policy/configuration_policy_pref_store.h"
@@ -72,7 +73,7 @@ class PolicyTestParams {
case Value::TYPE_LIST: {
const ListValue* list =
static_cast<const ListValue*>(test_value_.get());
- scoped_cftyperef<CFMutableArrayRef> array(
+ base::mac::ScopedCFTypeRef<CFMutableArrayRef> array(
CFArrayCreateMutable(NULL, list->GetSize(),
&kCFTypeArrayCallBacks));
for (ListValue::const_iterator element(list->begin());
@@ -82,7 +83,7 @@ class PolicyTestParams {
std::string element_value;
if (!(*element)->GetAsString(&element_value))
return NULL;
- scoped_cftyperef<CFStringRef> cf_element_value(
+ base::mac::ScopedCFTypeRef<CFStringRef> cf_element_value(
base::SysUTF8ToCFStringRef(element_value));
CFArrayAppendValue(array, cf_element_value.get());
}
@@ -150,18 +151,19 @@ TEST_P(ConfigurationPolicyProviderMacTest, Default) {
}
TEST_P(ConfigurationPolicyProviderMacTest, Invalid) {
- scoped_cftyperef<CFStringRef> name(
+ base::mac::ScopedCFTypeRef<CFStringRef> name(
base::SysUTF8ToCFStringRef(GetParam().policy_name()));
- scoped_cftyperef<CFDataRef> invalid_data(CFDataCreate(NULL, NULL, 0));
+ base::mac::ScopedCFTypeRef<CFDataRef> invalid_data(
+ CFDataCreate(NULL, NULL, 0));
prefs_->AddTestItem(name, invalid_data.get(), true);
EXPECT_TRUE(provider_->Provide(store_.get()));
EXPECT_TRUE(store_->policy_map().empty());
}
TEST_P(ConfigurationPolicyProviderMacTest, TestNonForcedValue) {
- scoped_cftyperef<CFStringRef> name(
+ base::mac::ScopedCFTypeRef<CFStringRef> name(
base::SysUTF8ToCFStringRef(GetParam().policy_name()));
- scoped_cftyperef<CFPropertyListRef> test_value(
+ base::mac::ScopedCFTypeRef<CFPropertyListRef> test_value(
GetParam().GetPropertyListValue());
ASSERT_TRUE(test_value.get());
prefs_->AddTestItem(name, test_value.get(), false);
@@ -170,9 +172,9 @@ TEST_P(ConfigurationPolicyProviderMacTest, TestNonForcedValue) {
}
TEST_P(ConfigurationPolicyProviderMacTest, TestValue) {
- scoped_cftyperef<CFStringRef> name(
+ base::mac::ScopedCFTypeRef<CFStringRef> name(
base::SysUTF8ToCFStringRef(GetParam().policy_name()));
- scoped_cftyperef<CFPropertyListRef> test_value(
+ base::mac::ScopedCFTypeRef<CFPropertyListRef> test_value(
GetParam().GetPropertyListValue());
ASSERT_TRUE(test_value.get());
prefs_->AddTestItem(name, test_value, true);
diff --git a/chrome/browser/preferences_mock_mac.h b/chrome/browser/preferences_mock_mac.h
index c804776..6c1ea3d 100644
--- a/chrome/browser/preferences_mock_mac.h
+++ b/chrome/browser/preferences_mock_mac.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_PREFERENCES_MOCK_MAC_H_
#pragma once
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "chrome/browser/preferences_mac.h"
// Mock preferences wrapper for testing code that interacts with CFPreferences.
@@ -24,8 +24,8 @@ class MockPreferences : public MacPreferences {
void AddTestItem(CFStringRef key, CFPropertyListRef value, bool is_forced);
private:
- scoped_cftyperef<CFMutableDictionaryRef> values_;
- scoped_cftyperef<CFMutableSetRef> forced_;
+ base::mac::ScopedCFTypeRef<CFMutableDictionaryRef> values_;
+ base::mac::ScopedCFTypeRef<CFMutableSetRef> forced_;
};
#endif // CHROME_BROWSER_PREFERENCES_MOCK_MAC_H_
diff --git a/chrome/browser/renderer_host/backing_store_mac.h b/chrome/browser/renderer_host/backing_store_mac.h
index 0c1e4a7..2c75400d 100644
--- a/chrome/browser/renderer_host/backing_store_mac.h
+++ b/chrome/browser/renderer_host/backing_store_mac.h
@@ -7,7 +7,7 @@
#pragma once
#include "base/basictypes.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "chrome/browser/renderer_host/backing_store.h"
class BackingStoreMac : public BackingStore {
@@ -48,8 +48,8 @@ class BackingStoreMac : public BackingStore {
// result.
CGContextRef CreateCGBitmapContext();
- scoped_cftyperef<CGContextRef> cg_bitmap_;
- scoped_cftyperef<CGLayerRef> cg_layer_;
+ base::mac::ScopedCFTypeRef<CGContextRef> cg_bitmap_;
+ base::mac::ScopedCFTypeRef<CGLayerRef> cg_layer_;
DISALLOW_COPY_AND_ASSIGN(BackingStoreMac);
};
diff --git a/chrome/browser/renderer_host/backing_store_mac.mm b/chrome/browser/renderer_host/backing_store_mac.mm
index f793395..bea378f 100644
--- a/chrome/browser/renderer_host/backing_store_mac.mm
+++ b/chrome/browser/renderer_host/backing_store_mac.mm
@@ -9,6 +9,7 @@
#include "app/surface/transport_dib.h"
#include "base/logging.h"
#include "base/mac_util.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/sys_info.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_widget_host.h"
@@ -67,11 +68,11 @@ void BackingStoreMac::PaintToBackingStore(
if (!dib)
return;
- scoped_cftyperef<CGDataProviderRef> data_provider(
+ base::mac::ScopedCFTypeRef<CGDataProviderRef> data_provider(
CGDataProviderCreateWithData(NULL, dib->memory(),
bitmap_rect.width() * bitmap_rect.height() * 4, NULL));
- scoped_cftyperef<CGImageRef> bitmap_image(
+ base::mac::ScopedCFTypeRef<CGImageRef> bitmap_image(
CGImageCreate(bitmap_rect.width(), bitmap_rect.height(), 8, 32,
4 * bitmap_rect.width(), mac_util::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
@@ -81,7 +82,7 @@ void BackingStoreMac::PaintToBackingStore(
const gfx::Rect& copy_rect = copy_rects[i];
// Only the subpixels given by copy_rect have pixels to copy.
- scoped_cftyperef<CGImageRef> image(
+ base::mac::ScopedCFTypeRef<CGImageRef> image(
CGImageCreateWithImageInRect(bitmap_image, CGRectMake(
copy_rect.x() - bitmap_rect.x(),
copy_rect.y() - bitmap_rect.y(),
@@ -93,7 +94,7 @@ void BackingStoreMac::PaintToBackingStore(
cg_layer_.reset(CreateCGLayer());
if (cg_layer()) {
// now that we have a layer, copy the cached image into it
- scoped_cftyperef<CGImageRef> bitmap_image(
+ base::mac::ScopedCFTypeRef<CGImageRef> bitmap_image(
CGBitmapContextCreateImage(cg_bitmap_));
CGContextDrawImage(CGLayerGetContext(cg_layer()),
CGRectMake(0, 0, size().width(), size().height()),
@@ -162,7 +163,7 @@ void BackingStoreMac::ScrollBackingStore(int dx, int dy,
// See http://crbug.com/45553 , comments 5 and 6.
static bool needs_layer_workaround = NeedsLayerWorkaround();
- scoped_cftyperef<CGLayerRef> new_layer;
+ base::mac::ScopedCFTypeRef<CGLayerRef> new_layer;
CGContextRef layer;
if (needs_layer_workaround) {
@@ -189,7 +190,7 @@ void BackingStoreMac::ScrollBackingStore(int dx, int dy,
cg_layer_.swap(new_layer);
} else {
// We don't have a layer, so scroll the contents of the CGBitmapContext.
- scoped_cftyperef<CGImageRef> bitmap_image(
+ base::mac::ScopedCFTypeRef<CGImageRef> bitmap_image(
CGBitmapContextCreateImage(cg_bitmap_));
CGContextSaveGState(cg_bitmap_);
CGContextClipToRect(cg_bitmap_,
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index a27fbcd..acf62a0 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -11,6 +11,7 @@
#import "base/chrome_application_mac.h"
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/metrics/histogram.h"
#import "base/scoped_nsautorelease_pool.h"
#import "base/scoped_nsobject.h"
@@ -1684,7 +1685,7 @@ void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
// paints.
CGContextRef context = static_cast<CGContextRef>(
[[NSGraphicsContext currentContext] graphicsPort]);
- scoped_cftyperef<CGImageRef> image(
+ base::mac::ScopedCFTypeRef<CGImageRef> image(
CGBitmapContextCreateImage(backingStore->cg_bitmap()));
CGRect imageRect = bitmapRect.ToCGRect();
imageRect.origin.y = yOffset;
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc
index b8b7361..362f95b 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc
@@ -23,7 +23,7 @@
#if defined(OS_WIN)
#undef IN // On Windows, windef.h defines this, which screws up "India" cases.
#elif defined(OS_MACOSX)
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#endif
using base::Time;
@@ -2863,7 +2863,7 @@ int GetCurrentCountryID() {
#elif defined(OS_MACOSX)
int GetCurrentCountryID() {
- scoped_cftyperef<CFLocaleRef> locale(CFLocaleCopyCurrent());
+ base::mac::ScopedCFTypeRef<CFLocaleRef> locale(CFLocaleCopyCurrent());
CFStringRef country = (CFStringRef)CFLocaleGetValue(locale.get(),
kCFLocaleCountryCode);
if (!country)
diff --git a/chrome/common/font_loader_mac.mm b/chrome/common/font_loader_mac.mm
index b88bffe..a5bb781 100644
--- a/chrome/common/font_loader_mac.mm
+++ b/chrome/common/font_loader_mac.mm
@@ -11,7 +11,6 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/mac_util.h"
-#include "base/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
// static
diff --git a/chrome/common/mach_message_source_mac.cc b/chrome/common/mach_message_source_mac.cc
index 1249d8a..76c899e 100644
--- a/chrome/common/mach_message_source_mac.cc
+++ b/chrome/common/mach_message_source_mac.cc
@@ -5,6 +5,7 @@
#include "chrome/common/mach_message_source_mac.h"
#include "base/logging.h"
+#include "base/mac/scoped_cftyperef.h"
MachMessageSource::MachMessageSource(mach_port_t port,
MachPortListener* msg_listener,
@@ -16,7 +17,7 @@ MachMessageSource::MachMessageSource(mach_port_t port,
CFMachPortContext port_context = {0};
port_context.info = msg_listener;
- scoped_cftyperef<CFMachPortRef> cf_mach_port_ref(
+ base::mac::ScopedCFTypeRef<CFMachPortRef> cf_mach_port_ref(
CFMachPortCreateWithPort(kCFAllocatorDefault,
port,
MachMessageSource::OnReceiveMachMessage,
diff --git a/chrome/common/mach_message_source_mac.h b/chrome/common/mach_message_source_mac.h
index 5ad8329..b1c20fb 100644
--- a/chrome/common/mach_message_source_mac.h
+++ b/chrome/common/mach_message_source_mac.h
@@ -8,7 +8,7 @@
#include <CoreServices/CoreServices.h>
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
// Handles registering and cleaning up after a CFRunloopSource for a Mach port.
// Messages received on the port are piped through to a delegate.
@@ -56,7 +56,7 @@ class MachMessageSource {
static void OnReceiveMachMessage(CFMachPortRef port, void* msg, CFIndex size,
void* closure);
- scoped_cftyperef<CFRunLoopSourceRef> machport_runloop_ref_;
+ base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> machport_runloop_ref_;
DISALLOW_COPY_AND_ASSIGN(MachMessageSource);
};
diff --git a/chrome/common/sandbox_mac.mm b/chrome/common/sandbox_mac.mm
index 303a538..f4d1eec 100644
--- a/chrome/common/sandbox_mac.mm
+++ b/chrome/common/sandbox_mac.mm
@@ -17,7 +17,7 @@ extern "C" {
#include "base/file_util.h"
#include "base/mac_util.h"
#include "base/rand_util_c.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/scoped_nsautorelease_pool.h"
#include "base/string16.h"
#include "base/string_util.h"
@@ -190,12 +190,12 @@ void SandboxWarmup() {
base::ScopedNSAutoreleasePool scoped_pool;
{ // CGColorSpaceCreateWithName(), CGBitmapContextCreate() - 10.5.6
- scoped_cftyperef<CGColorSpaceRef> rgb_colorspace(
+ base::mac::ScopedCFTypeRef<CGColorSpaceRef> rgb_colorspace(
CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB));
// Allocate a 1x1 image.
char data[4];
- scoped_cftyperef<CGContextRef> context(
+ base::mac::ScopedCFTypeRef<CGContextRef> context(
CGBitmapContextCreate(data, 1, 1, 8, 1 * 4,
rgb_colorspace,
kCGImageAlphaPremultipliedFirst |
@@ -206,7 +206,7 @@ void SandboxWarmup() {
(void) mac_util::GetSystemColorSpace();
// CGColorSpaceCreateSystemDefaultCMYK - 10.6
- scoped_cftyperef<CGColorSpaceRef> cmyk_colorspace(
+ base::mac::ScopedCFTypeRef<CGColorSpaceRef> cmyk_colorspace(
CGColorSpaceCreateWithName(kCGColorSpaceGenericCMYK));
}
@@ -231,7 +231,7 @@ void SandboxWarmup() {
char png_header[] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A};
NSData* data = [NSData dataWithBytes:png_header
length:arraysize(png_header)];
- scoped_cftyperef<CGImageSourceRef> img(
+ base::mac::ScopedCFTypeRef<CGImageSourceRef> img(
CGImageSourceCreateWithData((CFDataRef)data,
NULL));
CGImageSourceGetStatus(img);
diff --git a/chrome/common/sandbox_mac_fontloading_unittest.mm b/chrome/common/sandbox_mac_fontloading_unittest.mm
index f07a444..834fc0b 100644
--- a/chrome/common/sandbox_mac_fontloading_unittest.mm
+++ b/chrome/common/sandbox_mac_fontloading_unittest.mm
@@ -6,7 +6,7 @@
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
#include "chrome/common/font_loader_mac.h"
@@ -136,7 +136,7 @@ bool FontLoadingTestCase::SandboxedTest() {
LOG(ERROR) << "Got NULL CGFontRef";
return false;
}
- scoped_cftyperef<CGFontRef> cgfont;
+ base::mac::ScopedCFTypeRef<CGFontRef> cgfont;
cgfont.reset(font_ref);
const NSFont* nsfont = reinterpret_cast<const NSFont*>(
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 8e2b3ba..954cf9f 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -38,7 +38,7 @@
#elif defined(OS_MACOSX)
#include "app/l10n_util.h"
#include "base/mac_util.h"
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
#include "grit/chromium_strings.h"
#endif
@@ -103,13 +103,14 @@ PluginThread::PluginThread()
plugin->NP_Initialize();
#if defined(OS_MACOSX)
- scoped_cftyperef<CFStringRef> plugin_name(base::SysUTF16ToCFStringRef(
- plugin->plugin_info().name));
- scoped_cftyperef<CFStringRef> app_name(base::SysUTF16ToCFStringRef(
- l10n_util::GetStringUTF16(IDS_SHORT_PLUGIN_APP_NAME)));
- scoped_cftyperef<CFStringRef> process_name(CFStringCreateWithFormat(
- kCFAllocatorDefault, NULL, CFSTR("%@ (%@)"),
- plugin_name.get(), app_name.get()));
+ base::mac::ScopedCFTypeRef<CFStringRef> plugin_name(
+ base::SysUTF16ToCFStringRef(plugin->plugin_info().name));
+ base::mac::ScopedCFTypeRef<CFStringRef> app_name(
+ base::SysUTF16ToCFStringRef(
+ l10n_util::GetStringUTF16(IDS_SHORT_PLUGIN_APP_NAME)));
+ base::mac::ScopedCFTypeRef<CFStringRef> process_name(
+ CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ (%@)"),
+ plugin_name.get(), app_name.get()));
mac_util::SetProcessName(process_name);
#endif
}
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index 9741393..f41da3e 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -11,6 +11,7 @@
#endif
#if defined(OS_MACOSX)
#include "base/mac_util.h"
+#include "base/mac/scoped_cftyperef.h"
#endif
#include "base/scoped_handle.h"
#include "base/shared_memory.h"
@@ -218,7 +219,8 @@ NPObject* WebPluginProxy::GetPluginElement() {
int npobject_route_id = channel_->GenerateRouteID();
bool success = false;
- Send(new PluginHostMsg_GetPluginElement(route_id_, npobject_route_id, &success));
+ Send(new PluginHostMsg_GetPluginElement(route_id_, npobject_route_id,
+ &success));
if (!success)
return NULL;
@@ -416,12 +418,12 @@ void WebPluginProxy::Paint(const gfx::Rect& rect) {
CGContextRef saved_context_weak = windowless_context_.get();
if (background_context_.get()) {
- scoped_cftyperef<CGImageRef> image(
+ base::mac::ScopedCFTypeRef<CGImageRef> image(
CGBitmapContextCreateImage(background_context_));
CGRect source_rect = rect.ToCGRect();
// Flip the rect we use to pull from the canvas, since it's upside-down.
source_rect.origin.y = CGImageGetHeight(image) - rect.y() - rect.height();
- scoped_cftyperef<CGImageRef> sub_image(
+ base::mac::ScopedCFTypeRef<CGImageRef> sub_image(
CGImageCreateWithImageInRect(image, source_rect));
CGContextDrawImage(windowless_context_, rect.ToCGRect(), sub_image);
} else if (transparent_) {
diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h
index bf0b705..a33dae7 100644
--- a/chrome/plugin/webplugin_proxy.h
+++ b/chrome/plugin/webplugin_proxy.h
@@ -15,7 +15,7 @@
#include "base/hash_tables.h"
#include "base/ref_counted.h"
#if defined(OS_MACOSX)
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#endif
#include "base/scoped_handle.h"
#include "base/scoped_ptr.h"
@@ -208,8 +208,8 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
#if defined(OS_MACOSX)
scoped_ptr<TransportDIB> windowless_dib_;
scoped_ptr<TransportDIB> background_dib_;
- scoped_cftyperef<CGContextRef> windowless_context_;
- scoped_cftyperef<CGContextRef> background_context_;
+ base::mac::ScopedCFTypeRef<CGContextRef> windowless_context_;
+ base::mac::ScopedCFTypeRef<CGContextRef> background_context_;
scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_;
#else
scoped_ptr<skia::PlatformCanvas> windowless_canvas_;
diff --git a/chrome/renderer/print_web_view_helper_mac.mm b/chrome/renderer/print_web_view_helper_mac.mm
index 97410dc..3864b31 100644
--- a/chrome/renderer/print_web_view_helper_mac.mm
+++ b/chrome/renderer/print_web_view_helper_mac.mm
@@ -9,7 +9,6 @@
#include "app/l10n_util.h"
#include "base/logging.h"
#include "base/process_util.h"
-#include "base/scoped_cftyperef.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "chrome/renderer/render_view.h"
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc
index ea434f6..7d0a5a2 100644
--- a/chrome/renderer/webplugin_delegate_pepper.cc
+++ b/chrome/renderer/webplugin_delegate_pepper.cc
@@ -25,7 +25,7 @@
#include "base/path_service.h"
#include "base/process_util.h"
#if defined(OS_MACOSX)
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#endif
#include "base/scoped_ptr.h"
#include "base/string_number_conversions.h"
@@ -1739,11 +1739,11 @@ void WebPluginDelegatePepper::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/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index f4229ff..b5baf2e 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -55,10 +55,6 @@
#include "ipc/ipc_channel_posix.h"
#endif
-#if defined(OS_MACOSX)
-#include "base/scoped_cftyperef.h"
-#endif
-
using WebKit::WebBindings;
using WebKit::WebCursorInfo;
using WebKit::WebDragData;