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

Unified Diff: views/widget/tooltip_manager.cc

Issue 113441: ChromeFont->gfx::Font... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « views/widget/tooltip_manager.h ('k') | views/window/custom_frame_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/tooltip_manager.cc
===================================================================
--- views/widget/tooltip_manager.cc (revision 16106)
+++ views/widget/tooltip_manager.cc (working copy)
@@ -52,21 +52,21 @@
return tooltip_height_;
}
-static ChromeFont DetermineDefaultFont() {
+static gfx::Font DetermineDefaultFont() {
HWND window = CreateWindowEx(
WS_EX_TRANSPARENT | l10n_util::GetExtendedTooltipStyles(),
TOOLTIPS_CLASS, NULL, 0 , 0, 0, 0, 0, NULL, NULL, NULL, NULL);
HFONT hfont = reinterpret_cast<HFONT>(SendMessage(window, WM_GETFONT, 0, 0));
- ChromeFont font = hfont ? ChromeFont::CreateFont(hfont) : ChromeFont();
+ gfx::Font font = hfont ? gfx::Font::CreateFont(hfont) : gfx::Font();
DestroyWindow(window);
return font;
}
// static
-ChromeFont TooltipManager::GetDefaultFont() {
- static ChromeFont* font = NULL;
+gfx::Font TooltipManager::GetDefaultFont() {
+ static gfx::Font* font = NULL;
if (!font)
- font = new ChromeFont(DetermineDefaultFont());
+ font = new gfx::Font(DetermineDefaultFont());
return *font;
}
@@ -264,9 +264,9 @@
SetMapMode(dc, last_map_mode);
ReleaseDC(NULL, dc);
} else {
- // Tooltip is using the system font. Use ChromeFont, which should pick
+ // Tooltip is using the system font. Use gfx::Font, which should pick
// up the system font.
- height = ChromeFont().height();
+ height = gfx::Font().height();
}
// Get the margins from the tooltip
RECT tooltip_margin;
@@ -309,7 +309,7 @@
*line_count = static_cast<int>(lines.size());
// Format each line to fit.
- ChromeFont font = GetDefaultFont();
+ gfx::Font font = GetDefaultFont();
std::wstring result;
for (std::vector<std::wstring>::iterator i = lines.begin(); i != lines.end();
++i) {
« no previous file with comments | « views/widget/tooltip_manager.h ('k') | views/window/custom_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698