diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 15:16:04 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 15:16:04 +0000 |
commit | b22558a183cefa554a1730188a51994504100351 (patch) | |
tree | 1761e4f23e2e9060ff7bfa5a9026a4937d73e312 /gfx/platform_font_win.cc | |
parent | 3f891cf79f72f4768a15bfae051e08b9211ed8c3 (diff) | |
download | chromium_src-b22558a183cefa554a1730188a51994504100351.zip chromium_src-b22558a183cefa554a1730188a51994504100351.tar.gz chromium_src-b22558a183cefa554a1730188a51994504100351.tar.bz2 |
Revert 71167 - Remove wstring from gfx.
BUG=68882
TEST=no visible changes; all tests pass
Review URL: http://codereview.chromium.org/6121004
TBR=avi@chromium.org
Review URL: http://codereview.chromium.org/6134010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/platform_font_win.cc')
-rw-r--r-- | gfx/platform_font_win.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gfx/platform_font_win.cc b/gfx/platform_font_win.cc index 8071640..34761c6 100644 --- a/gfx/platform_font_win.cc +++ b/gfx/platform_font_win.cc @@ -69,7 +69,7 @@ PlatformFontWin::PlatformFontWin(NativeFont native_font) { InitWithCopyOfHFONT(native_font); } -PlatformFontWin::PlatformFontWin(const string16& font_name, +PlatformFontWin::PlatformFontWin(const std::wstring& font_name, int font_size) { InitWithFontNameAndSize(font_name, font_size); } @@ -117,7 +117,7 @@ int PlatformFontWin::GetStyle() const { return font_ref_->style(); } -string16 PlatformFontWin::GetFontName() const { +const std::wstring& PlatformFontWin::GetFontName() const { return font_ref_->font_name(); } @@ -150,7 +150,7 @@ void PlatformFontWin::InitWithCopyOfHFONT(HFONT hfont) { font_ref_ = CreateHFontRef(CreateFontIndirect(&font_info)); } -void PlatformFontWin::InitWithFontNameAndSize(const string16& font_name, +void PlatformFontWin::InitWithFontNameAndSize(const std::wstring& font_name, int font_size) { HDC hdc = GetDC(NULL); long lf_height = -MulDiv(font_size, GetDeviceCaps(hdc, LOGPIXELSY), 72); @@ -235,7 +235,7 @@ PlatformFontWin::HFontRef::HFontRef(HFONT hfont, LOGFONT font_info; GetObject(hfont_, sizeof(LOGFONT), &font_info); - font_name_ = string16(font_info.lfFaceName); + font_name_ = std::wstring(font_info.lfFaceName); } PlatformFontWin::HFontRef::~HFontRef() { @@ -261,7 +261,7 @@ PlatformFont* PlatformFont::CreateFromNativeFont(NativeFont native_font) { } // static -PlatformFont* PlatformFont::CreateFromNameAndSize(const string16& font_name, +PlatformFont* PlatformFont::CreateFromNameAndSize(const std::wstring& font_name, int font_size) { return new PlatformFontWin(font_name, font_size); } |