summaryrefslogtreecommitdiffstats
path: root/gfx/platform_font_mac.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-12 14:37:16 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-12 14:37:16 +0000
commit3f891cf79f72f4768a15bfae051e08b9211ed8c3 (patch)
tree3cf8d59e7186889184f575fcbe3284e6400fb505 /gfx/platform_font_mac.mm
parente0c7405b8f24e6c0096285446f94f729e63107df (diff)
downloadchromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.zip
chromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.tar.gz
chromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.tar.bz2
Remove wstring from gfx.
BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71167 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/platform_font_mac.mm')
-rw-r--r--gfx/platform_font_mac.mm14
1 files changed, 7 insertions, 7 deletions
diff --git a/gfx/platform_font_mac.mm b/gfx/platform_font_mac.mm
index 15d08f8..4aa9b88 100644
--- a/gfx/platform_font_mac.mm
+++ b/gfx/platform_font_mac.mm
@@ -22,7 +22,7 @@ PlatformFontMac::PlatformFontMac() {
font_size_ = [NSFont systemFontSize];
style_ = gfx::Font::NORMAL;
NSFont* system_font = [NSFont systemFontOfSize:font_size_];
- font_name_ = base::SysNSStringToWide([system_font fontName]);
+ font_name_ = base::SysNSStringToUTF16([system_font fontName]);
CalculateMetrics();
}
@@ -32,7 +32,7 @@ PlatformFontMac::PlatformFontMac(const Font& other) {
PlatformFontMac::PlatformFontMac(NativeFont native_font) {
}
-PlatformFontMac::PlatformFontMac(const std::wstring& font_name,
+PlatformFontMac::PlatformFontMac(const string16& font_name,
int font_size) {
InitWithNameSizeAndStyle(font_name, font_size, gfx::Font::NORMAL);
}
@@ -71,7 +71,7 @@ int PlatformFontMac::GetStyle() const {
return style_;
}
-const std::wstring& PlatformFontMac::GetFontName() const {
+string16 PlatformFontMac::GetFontName() const {
return font_name_;
}
@@ -83,20 +83,20 @@ NativeFont PlatformFontMac::GetNativeFont() const {
// TODO(pinkerton): apply |style_| to font. http://crbug.com/34667
// We could cache this, but then we'd have to conditionally change the
// dtor just for MacOS. Not sure if we want to/need to do that.
- return [NSFont fontWithName:base::SysWideToNSString(font_name_)
+ return [NSFont fontWithName:base::SysUTF16ToNSString(font_name_)
size:font_size_];
}
////////////////////////////////////////////////////////////////////////////////
// PlatformFontMac, private:
-PlatformFontMac::PlatformFontMac(const std::wstring& font_name,
+PlatformFontMac::PlatformFontMac(const string16& font_name,
int font_size,
int style) {
InitWithNameSizeAndStyle(font_name, font_size, style);
}
-void PlatformFontMac::InitWithNameSizeAndStyle(const std::wstring& font_name,
+void PlatformFontMac::InitWithNameSizeAndStyle(const string16& font_name,
int font_size,
int style) {
font_name_ = font_name;
@@ -134,7 +134,7 @@ PlatformFont* PlatformFont::CreateFromNativeFont(NativeFont native_font) {
}
// static
-PlatformFont* PlatformFont::CreateFromNameAndSize(const std::wstring& font_name,
+PlatformFont* PlatformFont::CreateFromNameAndSize(const string16& font_name,
int font_size) {
return new PlatformFontMac(font_name, font_size);
}