summaryrefslogtreecommitdiffstats
path: root/chrome/browser/themes
diff options
context:
space:
mode:
authorsimon.hong81@gmail.com <simon.hong81@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 22:37:42 +0000
committersimon.hong81@gmail.com <simon.hong81@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 22:37:42 +0000
commit68c7630b3ae6738e5b9ebb1998b3184fa930463c (patch)
tree6e2e9db98e7d0149f85e315c2668146b4aa42100 /chrome/browser/themes
parentbc2eeb4a236eab44d172d4737d16c9c237db4210 (diff)
downloadchromium_src-68c7630b3ae6738e5b9ebb1998b3184fa930463c.zip
chromium_src-68c7630b3ae6738e5b9ebb1998b3184fa930463c.tar.gz
chromium_src-68c7630b3ae6738e5b9ebb1998b3184fa930463c.tar.bz2
Move RefCountedMemory Class to Base namespace
BUG=none TEST=compiles chrome, browser_tests and ui_tests Review URL: http://codereview.chromium.org/10272004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/themes')
-rw-r--r--chrome/browser/themes/browser_theme_pack.cc10
-rw-r--r--chrome/browser/themes/browser_theme_pack.h6
-rw-r--r--chrome/browser/themes/theme_service.cc4
-rw-r--r--chrome/browser/themes/theme_service.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index 42797d4..29efdf8 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -287,7 +287,7 @@ const int kPreloadIDs[] = {
};
// Returns a piece of memory with the contents of the file |path|.
-RefCountedMemory* ReadFileData(const FilePath& path) {
+base::RefCountedMemory* ReadFileData(const FilePath& path) {
if (!path.empty()) {
net::FileStream file(NULL);
int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ;
@@ -529,7 +529,7 @@ const gfx::Image* BrowserThemePack::GetImageNamed(int idr_id) const {
if (image_iter != loaded_images_.end())
return image_iter->second;
- scoped_refptr<RefCountedMemory> memory;
+ scoped_refptr<base::RefCountedMemory> memory;
if (data_pack_.get()) {
memory = data_pack_->GetStaticMemory(prs_id);
} else {
@@ -558,8 +558,8 @@ const gfx::Image* BrowserThemePack::GetImageNamed(int idr_id) const {
return NULL;
}
-RefCountedMemory* BrowserThemePack::GetRawData(int idr_id) const {
- RefCountedMemory* memory = NULL;
+base::RefCountedMemory* BrowserThemePack::GetRawData(int idr_id) const {
+ base::RefCountedMemory* memory = NULL;
int prs_id = GetPersistentIDByIDR(idr_id);
if (prs_id != -1) {
@@ -871,7 +871,7 @@ bool BrowserThemePack::LoadRawBitmapsTo(
for (FilePathMap::const_iterator it = file_paths.begin();
it != file_paths.end(); ++it) {
- scoped_refptr<RefCountedMemory> raw_data(ReadFileData(it->second));
+ scoped_refptr<base::RefCountedMemory> raw_data(ReadFileData(it->second));
if (!raw_data.get()) {
LOG(ERROR) << "Could not load theme image";
return false;
diff --git a/chrome/browser/themes/browser_theme_pack.h b/chrome/browser/themes/browser_theme_pack.h
index 1a4bf9f..1a5e648 100644
--- a/chrome/browser/themes/browser_theme_pack.h
+++ b/chrome/browser/themes/browser_theme_pack.h
@@ -18,7 +18,6 @@
#include "ui/gfx/color_utils.h"
class FilePath;
-class RefCountedMemory;
namespace ui {
class DataPack;
}
@@ -27,6 +26,7 @@ class Image;
}
namespace base {
class DictionaryValue;
+class RefCountedMemory;
}
// An optimized representation of a theme, backed by a mmapped DataPack.
@@ -87,7 +87,7 @@ class BrowserThemePack : public base::RefCountedThreadSafe<
// Returns the raw PNG encoded data for IDR_THEME_NTP_*. This method is only
// supposed to work for the NTP attribution and background resources.
- RefCountedMemory* GetRawData(int id) const;
+ base::RefCountedMemory* GetRawData(int id) const;
// Whether this theme provides an image for |id|.
bool HasCustomImage(int id) const;
@@ -104,7 +104,7 @@ class BrowserThemePack : public base::RefCountedThreadSafe<
typedef std::map<int, const gfx::Image*> ImageCache;
// The raw PNG memory associated with a certain id.
- typedef std::map<int, scoped_refptr<RefCountedMemory> > RawImages;
+ typedef std::map<int, scoped_refptr<base::RefCountedMemory> > RawImages;
// The type passed to ui::DataPack::WritePack.
typedef std::map<uint16, base::StringPiece> RawDataForWriting;
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index c0225bd..e5628e4 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -309,14 +309,14 @@ bool ThemeService::HasCustomImage(int id) const {
return false;
}
-RefCountedMemory* ThemeService::GetRawData(int id) const {
+base::RefCountedMemory* ThemeService::GetRawData(int id) const {
// Check to see whether we should substitute some images.
int ntp_alternate;
GetDisplayProperty(NTP_LOGO_ALTERNATE, &ntp_alternate);
if (id == IDR_PRODUCT_LOGO && ntp_alternate != 0)
id = IDR_PRODUCT_LOGO_WHITE;
- RefCountedMemory* data = NULL;
+ base::RefCountedMemory* data = NULL;
if (theme_pack_.get())
data = theme_pack_->GetRawData(id);
if (!data)
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
index dd5f4dc..f49bead 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -160,7 +160,7 @@ class ThemeService : public base::NonThreadSafe,
virtual bool GetDisplayProperty(int id, int* result) const OVERRIDE;
virtual bool ShouldUseNativeFrame() const OVERRIDE;
virtual bool HasCustomImage(int id) const OVERRIDE;
- virtual RefCountedMemory* GetRawData(int id) const OVERRIDE;
+ virtual base::RefCountedMemory* GetRawData(int id) const OVERRIDE;
#if defined(OS_MACOSX)
virtual NSImage* GetNSImageNamed(int id, bool allow_default) const OVERRIDE;
virtual NSColor* GetNSImageColorNamed(int id,