summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-17 04:09:06 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-17 04:09:06 +0000
commitdf0ca6c858762b101bf424ff6c0522409fa195fc (patch)
treeefa188eee6972e2c0de358f2d19a2348ce6dcb06 /chrome/plugin
parent73de26a684944782a92f8e6840e1b290c9a424cd (diff)
downloadchromium_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 'chrome/plugin')
-rw-r--r--chrome/plugin/plugin_thread.cc17
-rw-r--r--chrome/plugin/webplugin_proxy.cc8
-rw-r--r--chrome/plugin/webplugin_proxy.h6
3 files changed, 17 insertions, 14 deletions
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_;