Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: gfx/platform_font_win.cc

Issue 6134010: Revert 71167 - Remove wstring from gfx.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gfx/platform_font_win.h ('k') | views/controls/button/text_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/platform_font_win.cc
===================================================================
--- gfx/platform_font_win.cc (revision 71168)
+++ gfx/platform_font_win.cc (working copy)
@@ -69,7 +69,7 @@
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 @@
return font_ref_->style();
}
-string16 PlatformFontWin::GetFontName() const {
+const std::wstring& PlatformFontWin::GetFontName() const {
return font_ref_->font_name();
}
@@ -150,7 +150,7 @@
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 @@
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 @@
}
// 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);
}
« no previous file with comments | « gfx/platform_font_win.h ('k') | views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698