summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc2
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc18
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_win.cc8
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_win.h8
-rw-r--r--chrome/browser/cocoa/status_bubble_mac.mm6
-rw-r--r--chrome/browser/debugger/debugger_view.h2
-rw-r--r--chrome/browser/gtk/download_item_gtk.cc6
-rw-r--r--chrome/browser/gtk/sad_tab_gtk.cc6
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.cc4
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.h2
-rw-r--r--chrome/browser/jsmessage_box_handler.cc2
-rw-r--r--chrome/browser/printing/print_job.h1
-rw-r--r--chrome/browser/printing/printed_document.cc6
-rw-r--r--chrome/browser/printing/printed_document.h4
-rw-r--r--chrome/browser/shell_dialogs.h6
-rw-r--r--chrome/browser/views/about_chrome_view.cc10
-rw-r--r--chrome/browser/views/about_chrome_view.h4
-rw-r--r--chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc18
-rw-r--r--chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h4
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc2
-rw-r--r--chrome/browser/views/bookmark_table_view.cc6
-rw-r--r--chrome/browser/views/bookmark_table_view.h6
-rw-r--r--chrome/browser/views/constrained_window_impl.cc6
-rw-r--r--chrome/browser/views/download_item_view.h2
-rw-r--r--chrome/browser/views/first_run_bubble.cc4
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.cc4
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.h6
-rw-r--r--chrome/browser/views/location_bar_view.cc4
-rw-r--r--chrome/browser/views/location_bar_view.h6
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc4
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc22
-rw-r--r--chrome/browser/views/options/fonts_page_view.h2
-rw-r--r--chrome/browser/views/options/languages_page_view.cc2
-rw-r--r--chrome/browser/views/options/options_group_view.cc6
-rw-r--r--chrome/browser/views/page_info_window.cc2
-rw-r--r--chrome/browser/views/sad_tab_view.cc10
-rw-r--r--chrome/browser/views/sad_tab_view.h4
-rw-r--r--chrome/browser/views/shelf_item_dialog.cc2
-rw-r--r--chrome/browser/views/shell_dialogs_win.cc2
-rw-r--r--chrome/browser/views/status_bubble_views.cc2
-rw-r--r--chrome/browser/views/tabs/tab.cc4
-rw-r--r--chrome/browser/views/tabs/tab_renderer.cc4
44 files changed, 121 insertions, 116 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index 35bd86b..1dabca1 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -390,7 +390,7 @@ base::LazyInstance<PaintPatcher> g_paint_patcher(base::LINKER_INITIALIZED);
} // namespace
AutocompleteEditViewWin::AutocompleteEditViewWin(
- const ChromeFont& font,
+ const gfx::Font& font,
AutocompleteEditController* controller,
ToolbarModel* toolbar_model,
views::View* parent_view,
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.h b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
index 7b00044..053adcd 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
@@ -60,7 +60,7 @@ class AutocompleteEditViewWin
DECLARE_WND_CLASS(L"Chrome_AutocompleteEditView");
- AutocompleteEditViewWin(const ChromeFont& font,
+ AutocompleteEditViewWin(const gfx::Font& font,
AutocompleteEditController* controller,
ToolbarModel* toolbar_model,
views::View* parent_view,
@@ -428,7 +428,7 @@ class AutocompleteEditViewWin
// Font we're using. We keep a reference to make sure the font supplied to
// the constructor doesn't go away before we do.
- ChromeFont font_;
+ gfx::Font font_;
// Metrics about the font, which we keep so we don't need to recalculate them
// every time we paint. |font_y_adjustment_| is the number of pixels we need
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view.h b/chrome/browser/autocomplete/autocomplete_popup_view.h
index c532847..f287d63 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view.h
@@ -13,8 +13,8 @@
class AutocompleteEditView;
class AutocompletePopupModel;
-class ChromeFont;
namespace gfx {
+class Font;
class Rect;
}
#if defined(OS_WIN)
@@ -60,7 +60,7 @@ class AutocompletePopupView {
// Create a popup view implementation. It may make sense for this to become
// platform independent eventually.
static AutocompletePopupView* CreatePopupView(
- const ChromeFont& font,
+ const gfx::Font& font,
AutocompleteEditViewWin* edit_view,
AutocompleteEditModel* edit_model,
Profile* profile,
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
index a671e40..5301f68 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
@@ -60,25 +60,25 @@ const int kRightPadding = 3;
// the total width.
const float kContentWidthPercentage = 0.7;
-// TODO(deanm): We should put this on ChromeFont so it can be shared.
+// TODO(deanm): We should put this on gfx::Font so it can be shared.
// Returns a new pango font, free with pango_font_description_free().
-PangoFontDescription* PangoFontFromChromeFont(const ChromeFont& chrome_font) {
- ChromeFont font = chrome_font; // Copy so we can call non-const methods.
+PangoFontDescription* PangoFontFromGfxFont(const gfx::Font& chrome_font) {
+ gfx::Font font = chrome_font; // Copy so we can call non-const methods.
PangoFontDescription* pfd = pango_font_description_new();
pango_font_description_set_family(pfd, WideToUTF8(font.FontName()).c_str());
pango_font_description_set_size(pfd, font.FontSize() * PANGO_SCALE);
switch (font.style()) {
- case ChromeFont::NORMAL:
+ case gfx::Font::NORMAL:
// Nothing to do, should already be PANGO_STYLE_NORMAL.
break;
- case ChromeFont::BOLD:
+ case gfx::Font::BOLD:
pango_font_description_set_weight(pfd, PANGO_WEIGHT_BOLD);
break;
- case ChromeFont::ITALIC:
+ case gfx::Font::ITALIC:
pango_font_description_set_style(pfd, PANGO_STYLE_ITALIC);
break;
- case ChromeFont::UNDERLINED:
+ case gfx::Font::UNDERLINED:
// TODO(deanm): How to do underlined? Where do we use it? Probably have
// to paint it ourselves, see pango_font_metrics_get_underline_position.
break;
@@ -246,9 +246,9 @@ AutocompletePopupViewGtk::AutocompletePopupViewGtk(
// We always ellipsize when drawing our text runs.
pango_layout_set_ellipsize(layout_, PANGO_ELLIPSIZE_END);
// TODO(deanm): We might want to eventually follow what Windows does and
- // plumb a ChromeFont through. This is because popup windows have a
+ // plumb a gfx::Font through. This is because popup windows have a
// different font size, although we could just derive that font here.
- PangoFontDescription* pfd = PangoFontFromChromeFont(ChromeFont());
+ PangoFontDescription* pfd = PangoFontFromGfxFont(gfx::Font());
pango_layout_set_font_description(layout_, pfd);
pango_font_description_free(pfd);
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_win.cc b/chrome/browser/autocomplete/autocomplete_popup_view_win.cc
index 98be163..7450655 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_win.cc
@@ -87,10 +87,10 @@ int AutocompletePopupViewWin::MirroringContext::GetLeft(int x1, int x2) const {
const wchar_t AutocompletePopupViewWin::DrawLineInfo::ellipsis_str[] =
L"\x2026";
-AutocompletePopupViewWin::DrawLineInfo::DrawLineInfo(const ChromeFont& font) {
+AutocompletePopupViewWin::DrawLineInfo::DrawLineInfo(const gfx::Font& font) {
// Create regular and bold fonts.
regular_font = font.DeriveFont(-1);
- bold_font = regular_font.DeriveFont(0, ChromeFont::BOLD);
+ bold_font = regular_font.DeriveFont(0, gfx::Font::BOLD);
// The total padding added to each line (bottom padding is what is
// left over after DrawEntry() specifies its top offset).
@@ -186,7 +186,7 @@ COLORREF AutocompletePopupViewWin::DrawLineInfo::AlphaBlend(
}
AutocompletePopupViewWin::AutocompletePopupViewWin(
- const ChromeFont& font,
+ const gfx::Font& font,
AutocompleteEditViewWin* edit_view,
AutocompleteEditModel* edit_model,
Profile* profile)
@@ -680,7 +680,7 @@ void AutocompletePopupViewWin::DrawStar(HDC dc, int x, int y) const {
// static
AutocompletePopupView* AutocompletePopupView::CreatePopupView(
- const ChromeFont& font,
+ const gfx::Font& font,
AutocompleteEditViewWin* edit_view,
AutocompleteEditModel* edit_model,
Profile* profile,
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_win.h b/chrome/browser/autocomplete/autocomplete_popup_view_win.h
index f98346d..bc4e135 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_win.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_win.h
@@ -48,7 +48,7 @@ class AutocompletePopupViewWin
MSG_WM_PAINT(OnPaint)
END_MSG_MAP()
- AutocompletePopupViewWin(const ChromeFont& font,
+ AutocompletePopupViewWin(const gfx::Font& font,
AutocompleteEditViewWin* edit_view,
AutocompleteEditModel* edit_model,
Profile* profile);
@@ -82,7 +82,7 @@ class AutocompletePopupViewWin
MAX_STATUS_ENTRIES
};
- explicit DrawLineInfo(const ChromeFont& font);
+ explicit DrawLineInfo(const gfx::Font& font);
~DrawLineInfo();
static COLORREF AlphaBlend(COLORREF foreground,
@@ -91,8 +91,8 @@ class AutocompletePopupViewWin
static const wchar_t ellipsis_str[];
- ChromeFont regular_font; // Fonts used for rendering AutocompleteMatches.
- ChromeFont bold_font;
+ gfx::Font regular_font; // Fonts used for rendering AutocompleteMatches.
+ gfx::Font bold_font;
int font_height; // Height (in pixels) of a line of text w/o
// padding.
int line_height; // Height (in pixels) of a line of text w/padding.
diff --git a/chrome/browser/cocoa/status_bubble_mac.mm b/chrome/browser/cocoa/status_bubble_mac.mm
index 67addcf..eeb82d1 100644
--- a/chrome/browser/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/cocoa/status_bubble_mac.mm
@@ -83,9 +83,9 @@ void StatusBubbleMac::SetURL(const GURL& url, const std::wstring& languages) {
kTextPositionX -
kTextPadding);
NSFont* font = [[window_ contentView] font];
- ChromeFont font_chr =
- ChromeFont::CreateFont(base::SysNSStringToWide([font fontName]),
- [font pointSize]);
+ gfx::Font font_chr =
+ gfx::Font::CreateFont(base::SysNSStringToWide([font fontName]),
+ [font pointSize]);
std::wstring status = gfx::ElideUrl(url, font_chr, text_width, languages);
NSString* status_ns = base::SysWideToNSString(status);
diff --git a/chrome/browser/debugger/debugger_view.h b/chrome/browser/debugger/debugger_view.h
index 6d52686..f0eba87 100644
--- a/chrome/browser/debugger/debugger_view.h
+++ b/chrome/browser/debugger/debugger_view.h
@@ -88,7 +88,7 @@ class DebuggerView : public views::View,
void ExecuteJavascript(const std::string& js);
DebuggerWindow* window_;
- ChromeFont font_;
+ gfx::Font font_;
TabContents* tab_contents_;
TabContentsContainerView* web_container_;
std::vector<std::wstring> pending_output_;
diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc
index 95db3c2..588af8a 100644
--- a/chrome/browser/gtk/download_item_gtk.cc
+++ b/chrome/browser/gtk/download_item_gtk.cc
@@ -165,12 +165,12 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf,
name_label_ = gtk_label_new(NULL);
// TODO(estade): This is at best an educated guess, since we don't actually
- // use ChromeFont() to draw the text. This is why we need to add so
- // much padding when we set the size request. We need to either use ChromeFont
+ // use gfx::Font() to draw the text. This is why we need to add so
+ // much padding when we set the size request. We need to either use gfx::Font
// or somehow extend TextElider.
std::wstring elided_filename = gfx::ElideFilename(
download_model_->download()->GetFileName(),
- ChromeFont(), kTextWidth);
+ gfx::Font(), kTextWidth);
gchar* label_markup =
g_markup_printf_escaped(kLabelColorMarkup, kFilenameColor,
WideToUTF8(elided_filename).c_str());
diff --git a/chrome/browser/gtk/sad_tab_gtk.cc b/chrome/browser/gtk/sad_tab_gtk.cc
index 4ec8e19..912988a 100644
--- a/chrome/browser/gtk/sad_tab_gtk.cc
+++ b/chrome/browser/gtk/sad_tab_gtk.cc
@@ -36,7 +36,7 @@ struct SadTabGtkConstants {
ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_SAD_TAB)),
title_font(
ResourceBundle::GetSharedInstance().GetFont(
- ResourceBundle::BaseFont).DeriveFont(2, ChromeFont::BOLD)),
+ ResourceBundle::BaseFont).DeriveFont(2, gfx::Font::BOLD)),
message_font(
ResourceBundle::GetSharedInstance().GetFont(
ResourceBundle::BaseFont).DeriveFont(1)),
@@ -44,8 +44,8 @@ struct SadTabGtkConstants {
message(l10n_util::GetString(IDS_SAD_TAB_MESSAGE)) {}
const SkBitmap* sad_tab_bitmap;
- ChromeFont title_font;
- ChromeFont message_font;
+ gfx::Font title_font;
+ gfx::Font message_font;
std::wstring title;
std::wstring message;
};
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
index e840290..5584b3a 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
@@ -85,7 +85,7 @@ TabRendererGtk::TabImage TabRendererGtk::tab_active_ = {0};
TabRendererGtk::TabImage TabRendererGtk::tab_inactive_ = {0};
TabRendererGtk::TabImage TabRendererGtk::tab_alpha = {0};
TabRendererGtk::TabImage TabRendererGtk::tab_hover_ = {0};
-ChromeFont* TabRendererGtk::title_font_ = NULL;
+gfx::Font* TabRendererGtk::title_font_ = NULL;
int TabRendererGtk::title_font_height_ = 0;
SkBitmap* TabRendererGtk::download_icon_ = NULL;
int TabRendererGtk::download_icon_width_ = 0;
@@ -589,7 +589,7 @@ void TabRendererGtk::InitResources() {
LoadTabImages();
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- title_font_ = new ChromeFont(rb.GetFont(ResourceBundle::BaseFont));
+ title_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont));
title_font_height_ = title_font_->height();
InitializeLoadingAnimationData(&rb, &loading_animation_data);
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
index e3d3a91..15b620f 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
@@ -207,7 +207,7 @@ class TabRendererGtk : public AnimationDelegate {
static TabImage tab_alpha;
static TabImage tab_hover_;
- static ChromeFont* title_font_;
+ static gfx::Font* title_font_;
static int title_font_height_;
static SkBitmap* download_icon_;
diff --git a/chrome/browser/jsmessage_box_handler.cc b/chrome/browser/jsmessage_box_handler.cc
index 7de44e8..151a33a 100644
--- a/chrome/browser/jsmessage_box_handler.cc
+++ b/chrome/browser/jsmessage_box_handler.cc
@@ -48,7 +48,7 @@ std::wstring GetWindowTitle(TabContents* tab_contents, const GURL& frame_url,
// TODO(brettw) it should be easier than this to do the correct language
// handling without getting the accept language from the profile.
- std::wstring base_address = gfx::ElideUrl(clean_url, ChromeFont(), 0,
+ std::wstring base_address = gfx::ElideUrl(clean_url, gfx::Font(), 0,
tab_contents->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages));
// Force URL to have LTR directionality.
if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
index 217b304..22c61de 100644
--- a/chrome/browser/printing/print_job.h
+++ b/chrome/browser/printing/print_job.h
@@ -12,7 +12,6 @@
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "chrome/common/notification_observer.h"
-class ChromeFont;
class GURL;
class Thread;
diff --git a/chrome/browser/printing/printed_document.cc b/chrome/browser/printing/printed_document.cc
index 08dc09f..f3fb5af 100644
--- a/chrome/browser/printing/printed_document.cc
+++ b/chrome/browser/printing/printed_document.cc
@@ -130,12 +130,12 @@ void PrintedDocument::RenderPrintedPage(const PrintedPage& page,
}
// Print the header and footer.
- int base_font_size = ChromeFont().height();
+ int base_font_size = gfx::Font().height();
int new_font_size = ConvertUnit(10,
immutable_.settings_.desired_dpi,
immutable_.settings_.dpi());
DCHECK_GT(new_font_size, base_font_size);
- ChromeFont font(ChromeFont().DeriveFont(new_font_size - base_font_size));
+ gfx::Font font(gfx::Font().DeriveFont(new_font_size - base_font_size));
HGDIOBJ old_font = SelectObject(context, font.hfont());
DCHECK(old_font != NULL);
// We don't want a white square around the text ever if overflowing.
@@ -264,7 +264,7 @@ void PrintedDocument::PrintHeaderFooter(HDC context,
const PrintedPage& page,
PageOverlays::HorizontalPosition x,
PageOverlays::VerticalPosition y,
- const ChromeFont& font) const {
+ const gfx::Font& font) const {
const PrintSettings& settings = immutable_.settings_;
const std::wstring& line = settings.overlays.GetOverlay(x, y);
if (line.empty()) {
diff --git a/chrome/browser/printing/printed_document.h b/chrome/browser/printing/printed_document.h
index fadfbd6..6080e0d 100644
--- a/chrome/browser/printing/printed_document.h
+++ b/chrome/browser/printing/printed_document.h
@@ -13,11 +13,11 @@
#include "chrome/browser/printing/print_settings.h"
#include "googleurl/src/gurl.h"
-class ChromeFont;
class MessageLoop;
namespace gfx {
class Emf;
+class Font;
}
namespace printing {
@@ -171,7 +171,7 @@ class PrintedDocument : public base::RefCountedThreadSafe<PrintedDocument> {
const PrintedPage& page,
PageOverlays::HorizontalPosition x,
PageOverlays::VerticalPosition y,
- const ChromeFont& font) const;
+ const gfx::Font& font) const;
// Calls the render source to render a page. Makes sure to execute the call in
// the right thread context.
diff --git a/chrome/browser/shell_dialogs.h b/chrome/browser/shell_dialogs.h
index 27ea52a..f9a3baa 100644
--- a/chrome/browser/shell_dialogs.h
+++ b/chrome/browser/shell_dialogs.h
@@ -13,7 +13,9 @@
#include "base/ref_counted.h"
#include "base/string16.h"
-class ChromeFont;
+namespace gfx {
+class Font;
+}
// A base class for shell dialogs.
class BaseShellDialog {
@@ -132,7 +134,7 @@ class SelectFontDialog
// Notifies the Listener that a font selection has been made. The font
// details are supplied in |font|. |params| is contextual passed to
// SelectFile.
- virtual void FontSelected(const ChromeFont& font, void* params) = 0;
+ virtual void FontSelected(const gfx::Font& font, void* params) = 0;
// Notifies the Listener that the font selection was aborted (via the user
// canceling or closing the selection dialog box, for example). |params| is
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc
index cc4e294..1468a24 100644
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -226,7 +226,7 @@ void AboutChromeView::Init() {
// Create a label and add the full text so we can query it for the height.
views::Label dummy_text(full_text);
dummy_text.SetMultiLine(true);
- ChromeFont font =
+ gfx::Font font =
ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont);
// Add up the height of the various elements on the page.
@@ -360,8 +360,8 @@ void AboutChromeView::Paint(ChromeCanvas* canvas) {
canvas->TileImageInt(*kBackgroundBmp, 0, 0,
dialog_dimensions_.width(), kBackgroundBmp->height());
- ChromeFont font =
- ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont);
+ gfx::Font font =
+ ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont);
const gfx::Rect label_bounds = main_text_label_->bounds();
@@ -430,7 +430,7 @@ void AboutChromeView::DrawTextAndPositionUrl(ChromeCanvas* canvas,
gfx::Rect* rect,
gfx::Size* position,
const gfx::Rect& bounds,
- const ChromeFont& font) {
+ const gfx::Font& font) {
DCHECK(canvas && position);
// What we get passed in as |text| is potentially a mix of LTR and RTL "runs"
@@ -483,7 +483,7 @@ void AboutChromeView::DrawTextStartingFrom(ChromeCanvas* canvas,
const std::wstring& text,
gfx::Size* position,
const gfx::Rect& bounds,
- const ChromeFont& font,
+ const gfx::Font& font,
bool ltr_within_rtl) {
// Iterate through line breaking opportunities (which in English would be
// spaces and such. This tells us where to wrap.
diff --git a/chrome/browser/views/about_chrome_view.h b/chrome/browser/views/about_chrome_view.h
index 7d33641..8b87624 100644
--- a/chrome/browser/views/about_chrome_view.h
+++ b/chrome/browser/views/about_chrome_view.h
@@ -99,7 +99,7 @@ class AboutChromeView : public views::View,
gfx::Rect* rect,
gfx::Size* position,
const gfx::Rect& bounds,
- const ChromeFont& font);
+ const gfx::Font& font);
// A helper function for DrawTextAndPositionUrl, which simply draws the text
// from a certain starting point |position| and wraps within bounds.
@@ -110,7 +110,7 @@ class AboutChromeView : public views::View,
const std::wstring& text,
gfx::Size* position,
const gfx::Rect& bounds,
- const ChromeFont& font,
+ const gfx::Font& font,
bool word_for_word);
// A simply utility function that calculates whether a word of width
diff --git a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
index ffeee23..43f4d98 100644
--- a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -60,14 +60,14 @@ static const int kRowRightPadding = 3;
// of the text.
static const int kIconTextSpacing = 9;
// The size delta between the font used for the edit and the result rows. Passed
-// to ChromeFont::DeriveFont.
+// to gfx::Font::DeriveFont.
static const int kEditFontAdjust = -1;
class AutocompleteResultView : public views::View {
public:
AutocompleteResultView(AutocompleteResultViewModel* model,
int model_index,
- const ChromeFont& font);
+ const gfx::Font& font);
virtual ~AutocompleteResultView();
// Overridden from views::View:
@@ -108,7 +108,7 @@ class AutocompleteResultView : public views::View {
int y);
// Gets the font and text color for a fragment with the specified style.
- ChromeFont GetFragmentFont(int style) const;
+ gfx::Font GetFragmentFont(int style) const;
SkColor GetFragmentTextColor(int style) const;
// This row's model and model index.
@@ -119,7 +119,7 @@ class AutocompleteResultView : public views::View {
bool hot_;
// The font used to derive fonts for rendering the text in this row.
- ChromeFont font_;
+ gfx::Font font_;
// A context used for mirroring regions.
class MirroringContext;
@@ -272,7 +272,7 @@ int AutocompleteResultView::MirroringContext::GetLeft(int x1, int x2) const {
AutocompleteResultView::AutocompleteResultView(
AutocompleteResultViewModel* model,
int model_index,
- const ChromeFont& font)
+ const gfx::Font& font)
: model_(model),
model_index_(model_index),
hot_(false),
@@ -499,7 +499,7 @@ int AutocompleteResultView::DrawStringFragment(
int style,
int x,
int y) {
- ChromeFont display_font = GetFragmentFont(style);
+ gfx::Font display_font = GetFragmentFont(style);
// Clamp text width to the available width within the popup so we elide if
// necessary.
int string_width = std::min(display_font.GetStringWidth(text),
@@ -511,9 +511,9 @@ int AutocompleteResultView::DrawStringFragment(
return string_width;
}
-ChromeFont AutocompleteResultView::GetFragmentFont(int style) const {
+gfx::Font AutocompleteResultView::GetFragmentFont(int style) const {
if (style & ACMatchClassification::MATCH)
- return font_.DeriveFont(0, ChromeFont::BOLD);
+ return font_.DeriveFont(0, gfx::Font::BOLD);
return font_;
}
@@ -651,7 +651,7 @@ void PopupBorder::InitClass() {
// AutocompletePopupContentsView, public:
AutocompletePopupContentsView::AutocompletePopupContentsView(
- const ChromeFont& font,
+ const gfx::Font& font,
AutocompleteEditViewWin* edit_view,
AutocompleteEditModel* edit_model,
Profile* profile,
diff --git a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h
index 19323eb..85cecbf 100644
--- a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h
+++ b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h
@@ -46,7 +46,7 @@ class AutocompletePopupContentsView : public views::View,
public AutocompleteResultViewModel,
public AutocompletePopupView {
public:
- AutocompletePopupContentsView(const ChromeFont& font,
+ AutocompletePopupContentsView(const gfx::Font& font,
AutocompleteEditViewWin* edit_view,
AutocompleteEditModel* edit_model,
Profile* profile,
@@ -105,7 +105,7 @@ class AutocompletePopupContentsView : public views::View,
// The font that we should use for result rows. This is based on the font used
// by the edit that created us.
- ChromeFont result_font_;
+ gfx::Font result_font_;
DISALLOW_COPY_AND_ASSIGN(AutocompletePopupContentsView);
};
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 71b4051..1d552dd 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -149,7 +149,7 @@ static std::wstring CreateToolTipForURLAndTitle(const gfx::Point& screen_loc,
const std::wstring& languages) {
const gfx::Rect monitor_bounds = win_util::GetMonitorBoundsForRect(
gfx::Rect(screen_loc.x(), screen_loc.y(), 1, 1));
- ChromeFont tt_font = views::TooltipManager::GetDefaultFont();
+ gfx::Font tt_font = views::TooltipManager::GetDefaultFont();
std::wstring result;
// First the title.
diff --git a/chrome/browser/views/bookmark_table_view.cc b/chrome/browser/views/bookmark_table_view.cc
index edbedf0..5c2c787 100644
--- a/chrome/browser/views/bookmark_table_view.cc
+++ b/chrome/browser/views/bookmark_table_view.cc
@@ -418,7 +418,7 @@ void BookmarkTableView::PaintAltText() {
return;
HDC dc = GetDC(GetNativeControlHWND());
- ChromeFont font = GetAltTextFont();
+ gfx::Font font = GetAltTextFont();
gfx::Rect bounds = GetAltTextBounds();
ChromeCanvas canvas(bounds.width(), bounds.height(), false);
// Pad by 1 for halo.
@@ -435,12 +435,12 @@ gfx::Rect BookmarkTableView::GetAltTextBounds() {
RECT client_rect_rect;
GetClientRect(GetNativeControlHWND(), &client_rect_rect);
gfx::Rect client_rect(client_rect_rect);
- ChromeFont font = GetAltTextFont();
+ gfx::Font font = GetAltTextFont();
// Pad height by 2 for halo.
return gfx::Rect(kXOffset, content_offset(), client_rect.width() - kXOffset,
std::max(kImageSize, font.height() + 2));
}
-ChromeFont BookmarkTableView::GetAltTextFont() {
+gfx::Font BookmarkTableView::GetAltTextFont() {
return ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont);
}
diff --git a/chrome/browser/views/bookmark_table_view.h b/chrome/browser/views/bookmark_table_view.h
index cde2bd0..ed83bcb 100644
--- a/chrome/browser/views/bookmark_table_view.h
+++ b/chrome/browser/views/bookmark_table_view.h
@@ -13,7 +13,9 @@
class BookmarkModel;
class BookmarkNode;
class BookmarkTableModel;
-class ChromeFont;
+namespace gfx {
+class Font;
+}
class OSExchangeData;
class PrefService;
class Profile;
@@ -144,7 +146,7 @@ class BookmarkTableView : public views::TableView {
gfx::Rect GetAltTextBounds();
// Returns the font used for alt text.
- ChromeFont GetAltTextFont();
+ gfx::Font GetAltTextFont();
Profile* profile_;
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc
index 9b4ee70..695d450 100644
--- a/chrome/browser/views/constrained_window_impl.cc
+++ b/chrome/browser/views/constrained_window_impl.cc
@@ -237,12 +237,12 @@ class ConstrainedWindowFrameView
static void InitClass();
// The font to be used to render the titlebar text.
- static ChromeFont* title_font_;
+ static gfx::Font* title_font_;
DISALLOW_EVIL_CONSTRUCTORS(ConstrainedWindowFrameView);
};
-ChromeFont* ConstrainedWindowFrameView::title_font_ = NULL;
+gfx::Font* ConstrainedWindowFrameView::title_font_ = NULL;
namespace {
// The frame border is only visible in restored mode and is hardcoded to 4 px on
@@ -568,7 +568,7 @@ void ConstrainedWindowFrameView::InitWindowResources() {
void ConstrainedWindowFrameView::InitClass() {
static bool initialized = false;
if (!initialized) {
- title_font_ = new ChromeFont(win_util::GetWindowTitleFont());
+ title_font_ = new gfx::Font(win_util::GetWindowTitleFont());
initialized = true;
}
diff --git a/chrome/browser/views/download_item_view.h b/chrome/browser/views/download_item_view.h
index 264d98d..f81242f 100644
--- a/chrome/browser/views/download_item_view.h
+++ b/chrome/browser/views/download_item_view.h
@@ -165,7 +165,7 @@ class DownloadItemView : public views::ButtonListener,
bool show_status_text_;
// The font used to print the file name and status.
- ChromeFont font_;
+ gfx::Font font_;
// The current state (normal, hot or pushed) of the body and drop-down.
State body_state_;
diff --git a/chrome/browser/views/first_run_bubble.cc b/chrome/browser/views/first_run_bubble.cc
index 552bb44..0ca491c 100644
--- a/chrome/browser/views/first_run_bubble.cc
+++ b/chrome/browser/views/first_run_bubble.cc
@@ -60,11 +60,11 @@ class FirstRunBubbleView : public views::View,
label3_(NULL),
keep_button_(NULL),
change_button_(NULL) {
- ChromeFont& font =
+ gfx::Font& font =
ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont);
label1_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_TITLE));
- label1_->SetFont(font.DeriveFont(3, ChromeFont::BOLD));
+ label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc
index 3e58d71..89b50f5 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -24,7 +24,7 @@
// static
SkBitmap* OpaqueBrowserFrameView::distributor_logo_ = NULL;
-ChromeFont* OpaqueBrowserFrameView::title_font_ = NULL;
+gfx::Font* OpaqueBrowserFrameView::title_font_ = NULL;
namespace {
// The frame border is only visible in restored mode and is hardcoded to 4 px on
@@ -948,7 +948,7 @@ void OpaqueBrowserFrameView::InitClass() {
void OpaqueBrowserFrameView::InitAppWindowResources() {
static bool initialized = false;
if (!initialized) {
- title_font_ = new ChromeFont(win_util::GetWindowTitleFont());
+ title_font_ = new gfx::Font(win_util::GetWindowTitleFont());
initialized = true;
}
}
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.h b/chrome/browser/views/frame/opaque_browser_frame_view.h
index 08aee7e..6d16a2f 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.h
@@ -11,7 +11,9 @@
#include "views/window/non_client_view.h"
class BrowserView;
-class ChromeFont;
+namespace gfx {
+class Font;
+}
class TabContents;
class TabStrip;
namespace views {
@@ -150,7 +152,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
static void InitClass();
static void InitAppWindowResources();
static SkBitmap* distributor_logo_;
- static ChromeFont* title_font_;
+ static gfx::Font* title_font_;
DISALLOW_EVIL_CONSTRUCTORS(OpaqueBrowserFrameView);
};
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index 2f22fd2..3014dfc 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -672,7 +672,7 @@ LocationBarView::SelectedKeywordView::SelectedKeywordView(Profile* profile)
LocationBarView::SelectedKeywordView::~SelectedKeywordView() {
}
-void LocationBarView::SelectedKeywordView::SetFont(const ChromeFont& font) {
+void LocationBarView::SelectedKeywordView::SetFont(const gfx::Font& font) {
full_label_.SetFont(font);
partial_label_.SetFont(font);
}
@@ -763,7 +763,7 @@ LocationBarView::KeywordHintView::~KeywordHintView() {
RemoveChildView(&trailing_label_);
}
-void LocationBarView::KeywordHintView::SetFont(const ChromeFont& font) {
+void LocationBarView::KeywordHintView::SetFont(const gfx::Font& font) {
leading_label_.SetFont(font);
trailing_label_.SetFont(font);
}
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h
index 4c30b4b..c0b2a9e 100644
--- a/chrome/browser/views/location_bar_view.h
+++ b/chrome/browser/views/location_bar_view.h
@@ -147,7 +147,7 @@ class LocationBarView : public LocationBar,
explicit SelectedKeywordView(Profile* profile);
virtual ~SelectedKeywordView();
- void SetFont(const ChromeFont& font);
+ void SetFont(const gfx::Font& font);
virtual void Paint(ChromeCanvas* canvas);
@@ -197,7 +197,7 @@ class LocationBarView : public LocationBar,
explicit KeywordHintView(Profile* profile);
virtual ~KeywordHintView();
- void SetFont(const ChromeFont& font);
+ void SetFont(const gfx::Font& font);
void SetColor(const SkColor& color);
@@ -444,7 +444,7 @@ class LocationBarView : public LocationBar,
PageTransition::Type transition_;
// Font used by edit and some of the hints.
- ChromeFont font_;
+ gfx::Font font_;
// Location_entry view wrapper
views::HWNDView* location_entry_view_;
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index 3bbf9a6..587bd71 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -144,8 +144,8 @@ AdvancedSection::AdvancedSection(Profile* profile,
title_label_(new views::Label(title)),
OptionsPageView(profile) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- ChromeFont title_font =
- rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, ChromeFont::BOLD);
+ gfx::Font title_font =
+ rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
title_label_->SetFont(title_font);
SkColor title_color = gfx::NativeTheme::instance()->GetThemeColorWithDefault(
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index 27d710a..41cb561 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -107,7 +107,7 @@ class FontDisplayView : public views::View {
void SetFontType(const std::wstring& font_name,
int font_size);
- void SetFontType(ChromeFont font);
+ void SetFontType(gfx::Font font);
std::wstring font_name() { return font_name_; }
int font_size() { return font_size_; }
@@ -138,7 +138,7 @@ FontDisplayView::FontDisplayView()
FontDisplayView::~FontDisplayView() {
}
-void FontDisplayView::SetFontType(ChromeFont font) {
+void FontDisplayView::SetFontType(gfx::Font font) {
if (font.FontName().empty())
return;
@@ -170,7 +170,7 @@ void FontDisplayView::SetFontType(const std::wstring& font_name,
displayed_text += UTF8ToWide(::StringPrintf("%d", font_size_));
HDC hdc = GetDC(NULL);
int font_size_point = MulDiv(font_size, 72, GetDeviceCaps(hdc, LOGPIXELSY));
- ChromeFont font = ChromeFont::CreateFont(font_name, font_size_point);
+ gfx::Font font = gfx::Font::CreateFont(font_name, font_size_point);
font_text_label_->SetFont(font);
font_text_label_->SetText(displayed_text);
}
@@ -190,7 +190,7 @@ void FontDisplayView::Layout() {
gfx::Size FontDisplayView::GetPreferredSize() {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- ChromeFont font = rb.GetFont(ResourceBundle::BaseFont);
+ gfx::Font font = rb.GetFont(ResourceBundle::BaseFont);
return gfx::Size(font.GetExpectedTextWidth(kFontDisplayMaxWidthChars),
font.height() * kFontDisplayMaxHeightChars
+ 2 * kFontDisplayLabelPadding);
@@ -198,8 +198,8 @@ gfx::Size FontDisplayView::GetPreferredSize() {
void EmbellishTitle(views::Label* title_label) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- ChromeFont title_font =
- rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, ChromeFont::BOLD);
+ gfx::Font title_font =
+ rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
title_label->SetFont(title_font);
SkColor title_color =
gfx::NativeTheme::instance()->GetThemeColorWithDefault(
@@ -286,11 +286,11 @@ void FontsPageView::ItemChanged(views::ComboBox* combo_box,
}
}
-void FontsPageView::FontSelected(const ChromeFont& const_font, void* params) {
- ChromeFont font(const_font);
- if (ChromeFont(font).FontName().empty())
+void FontsPageView::FontSelected(const gfx::Font& const_font, void* params) {
+ gfx::Font font(const_font);
+ if (gfx::Font(font).FontName().empty())
return;
- int font_size = ChromeFont(font).FontSize();
+ int font_size = gfx::Font(font).FontSize();
// Currently we do not have separate font sizes for Serif and Sans Serif.
// Therefore, when Serif font size is changed, Sans-Serif font size changes,
// and vice versa.
@@ -443,7 +443,7 @@ void FontsPageView::InitFontLayout() {
const int triple_column_view_set_id = 0;
ColumnSet* column_set = layout->AddColumnSet(triple_column_view_set_id);
- int label_width = ChromeFont().GetExpectedTextWidth(
+ int label_width = gfx::Font().GetExpectedTextWidth(
_wtoi(l10n_util::GetString(IDS_FONTSLANG_LABEL_WIDTH).c_str()));
column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 0,
GridLayout::FIXED, label_width, 0);
diff --git a/chrome/browser/views/options/fonts_page_view.h b/chrome/browser/views/options/fonts_page_view.h
index 0b54c18..1a83919 100644
--- a/chrome/browser/views/options/fonts_page_view.h
+++ b/chrome/browser/views/options/fonts_page_view.h
@@ -44,7 +44,7 @@ class FontsPageView : public OptionsPageView,
int new_index);
// SelectFontDialog::Listener implementation:
- virtual void FontSelected(const ChromeFont& font, void* params);
+ virtual void FontSelected(const gfx::Font& font, void* params);
// Save Changes made to relevent pref members associated with this tab.
// This is public since it is called by FontsLanguageWindowView in its
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc
index ef26566..c65474e 100644
--- a/chrome/browser/views/options/languages_page_view.cc
+++ b/chrome/browser/views/options/languages_page_view.cc
@@ -271,7 +271,7 @@ void AddLanguageWindowView::Layout() {
gfx::Size AddLanguageWindowView::GetPreferredSize() {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- ChromeFont font = rb.GetFont(ResourceBundle::BaseFont);
+ gfx::Font font = rb.GetFont(ResourceBundle::BaseFont);
return gfx::Size(font.ave_char_width() * kDefaultWindowWidthChars,
font.height() * kDefaultWindowHeightLines);
}
diff --git a/chrome/browser/views/options/options_group_view.cc b/chrome/browser/views/options/options_group_view.cc
index 91a617f..a8697ba 100644
--- a/chrome/browser/views/options/options_group_view.cc
+++ b/chrome/browser/views/options/options_group_view.cc
@@ -36,8 +36,8 @@ OptionsGroupView::OptionsGroupView(views::View* contents,
show_separator_(show_separator),
highlighted_(false) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- ChromeFont title_font =
- rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, ChromeFont::BOLD);
+ gfx::Font title_font =
+ rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
title_label_->SetFont(title_font);
SkColor title_color = gfx::NativeTheme::instance()->GetThemeColorWithDefault(
gfx::NativeTheme::BUTTON, BP_GROUPBOX, GBS_NORMAL, TMT_TEXTCOLOR,
@@ -92,7 +92,7 @@ void OptionsGroupView::Init() {
SetLayoutManager(layout);
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- ChromeFont font = rb.GetFont(ResourceBundle::BaseFont);
+ gfx::Font font = rb.GetFont(ResourceBundle::BaseFont);
std::wstring left_column_chars =
l10n_util::GetString(IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS);
int left_column_width =
diff --git a/chrome/browser/views/page_info_window.cc b/chrome/browser/views/page_info_window.cc
index 1e72a6e..c92325b 100644
--- a/chrome/browser/views/page_info_window.cc
+++ b/chrome/browser/views/page_info_window.cc
@@ -158,7 +158,7 @@ SecurityTabView::Section::Section(const std::wstring& title, bool state,
head_line_label_ = new views::Label(head_line);
head_line_label_->SetFont(
- head_line_label_->GetFont().DeriveFont(0, ChromeFont::BOLD));
+ head_line_label_->GetFont().DeriveFont(0, gfx::Font::BOLD));
head_line_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(head_line_label_);
diff --git a/chrome/browser/views/sad_tab_view.cc b/chrome/browser/views/sad_tab_view.cc
index 71313cc..61a9e57 100644
--- a/chrome/browser/views/sad_tab_view.cc
+++ b/chrome/browser/views/sad_tab_view.cc
@@ -25,8 +25,8 @@ static const SkColor kBackgroundEndColor = SkColorSetRGB(35, 48, 64);
// static
SkBitmap* SadTabView::sad_tab_bitmap_ = NULL;
-ChromeFont* SadTabView::title_font_ = NULL;
-ChromeFont* SadTabView::message_font_ = NULL;
+gfx::Font* SadTabView::title_font_ = NULL;
+gfx::Font* SadTabView::message_font_ = NULL;
std::wstring SadTabView::title_;
std::wstring SadTabView::message_;
int SadTabView::title_width_;
@@ -85,9 +85,9 @@ void SadTabView::InitClass() {
static bool initialized = false;
if (!initialized) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- title_font_ = new ChromeFont(
- rb.GetFont(ResourceBundle::BaseFont).DeriveFont(2, ChromeFont::BOLD));
- message_font_ = new ChromeFont(
+ title_font_ = new gfx::Font(
+ rb.GetFont(ResourceBundle::BaseFont).DeriveFont(2, gfx::Font::BOLD));
+ message_font_ = new gfx::Font(
rb.GetFont(ResourceBundle::BaseFont).DeriveFont(1));
sad_tab_bitmap_ = rb.GetBitmapNamed(IDR_SAD_TAB);
diff --git a/chrome/browser/views/sad_tab_view.h b/chrome/browser/views/sad_tab_view.h
index 2053fba..1a279b6 100644
--- a/chrome/browser/views/sad_tab_view.h
+++ b/chrome/browser/views/sad_tab_view.h
@@ -40,8 +40,8 @@ class SadTabView : public views::View {
// Assorted resources for display.
static SkBitmap* sad_tab_bitmap_;
- static ChromeFont* title_font_;
- static ChromeFont* message_font_;
+ static gfx::Font* title_font_;
+ static gfx::Font* message_font_;
static std::wstring title_;
static std::wstring message_;
static int title_width_;
diff --git a/chrome/browser/views/shelf_item_dialog.cc b/chrome/browser/views/shelf_item_dialog.cc
index b609ad4..80c5776 100644
--- a/chrome/browser/views/shelf_item_dialog.cc
+++ b/chrome/browser/views/shelf_item_dialog.cc
@@ -330,7 +330,7 @@ ShelfItemDialog::ShelfItemDialog(ShelfItemDialogDelegate* delegate,
description_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
description_label->SetText(l10n_util::GetString(IDS_ASI_DESCRIPTION));
description_label->SetFont(
- description_label->GetFont().DeriveFont(0, ChromeFont::BOLD));
+ description_label->GetFont().DeriveFont(0, gfx::Font::BOLD));
layout->AddView(description_label);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc
index c211660..bd5d51f 100644
--- a/chrome/browser/views/shell_dialogs_win.cc
+++ b/chrome/browser/views/shell_dialogs_win.cc
@@ -712,7 +712,7 @@ void SelectFontDialogImpl::FontSelected(LOGFONT logfont,
if (listener_) {
HFONT font = CreateFontIndirect(&logfont);
if (font) {
- listener_->FontSelected(ChromeFont::CreateFont(font), params);
+ listener_->FontSelected(gfx::Font::CreateFont(font), params);
DeleteObject(font);
} else {
listener_->FontSelectionCanceled(params);
diff --git a/chrome/browser/views/status_bubble_views.cc b/chrome/browser/views/status_bubble_views.cc
index 3e4d7c4..a0c687e 100644
--- a/chrome/browser/views/status_bubble_views.cc
+++ b/chrome/browser/views/status_bubble_views.cc
@@ -79,7 +79,7 @@ class StatusBubbleViews::StatusView : public views::Label,
opacity_start_(0),
opacity_end_(0) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- ChromeFont font(rb.GetFont(ResourceBundle::BaseFont));
+ gfx::Font font(rb.GetFont(ResourceBundle::BaseFont));
SetFont(font);
}
diff --git a/chrome/browser/views/tabs/tab.cc b/chrome/browser/views/tabs/tab.cc
index cb7504c..bf606d5 100644
--- a/chrome/browser/views/tabs/tab.cc
+++ b/chrome/browser/views/tabs/tab.cc
@@ -199,7 +199,7 @@ bool Tab::GetTooltipText(int x, int y, std::wstring* tooltip) {
std::wstring title = GetTitle();
if (!title.empty()) {
// Only show the tooltip if the title is truncated.
- ChromeFont font;
+ gfx::Font font;
if (font.GetStringWidth(title) > title_bounds().width()) {
*tooltip = title;
return true;
@@ -209,7 +209,7 @@ bool Tab::GetTooltipText(int x, int y, std::wstring* tooltip) {
}
bool Tab::GetTooltipTextOrigin(int x, int y, gfx::Point* origin) {
- ChromeFont font;
+ gfx::Font font;
origin->set_x(title_bounds().x() + 10);
origin->set_y(-views::TooltipManager::GetTooltipHeight() - 4);
return true;
diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc
index 96bdd918..6954055 100644
--- a/chrome/browser/views/tabs/tab_renderer.cc
+++ b/chrome/browser/views/tabs/tab_renderer.cc
@@ -46,7 +46,7 @@ static const int kPulseDurationMs = 200;
static const double kHoverOpacity = 0.33;
// TODO(beng): (Cleanup) This stuff should move onto the class.
-static ChromeFont* title_font = NULL;
+static gfx::Font* title_font = NULL;
static int title_font_height = 0;
static SkBitmap* close_button_n = NULL;
static SkBitmap* close_button_h = NULL;
@@ -75,7 +75,7 @@ void InitResources() {
if (!initialized) {
// TODO(glen): Allow theming of these.
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- title_font = new ChromeFont(rb.GetFont(ResourceBundle::BaseFont));
+ title_font = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont));
title_font_height = title_font->height();
close_button_n = rb.GetBitmapNamed(IDR_TAB_CLOSE);