diff options
Diffstat (limited to 'chrome/browser/views')
27 files changed, 76 insertions, 72 deletions
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); |