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

Unified Diff: chrome/browser/views/options/fonts_page_view.cc

Issue 7344: Convert GetPreferredSize from:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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
Index: chrome/browser/views/options/fonts_page_view.cc
===================================================================
--- chrome/browser/views/options/fonts_page_view.cc (revision 3391)
+++ chrome/browser/views/options/fonts_page_view.cc (working copy)
@@ -97,7 +97,7 @@
// ChromeViews::View overrides:
virtual void Paint(ChromeCanvas* canvas);
virtual void Layout();
- virtual void GetPreferredSize(CSize* out);
+ virtual gfx::Size GetPreferredSize();
private:
ChromeViews::Label* font_text_label_;
@@ -169,13 +169,12 @@
font_text_label_->SetBounds(0, 0, width(), height());
}
-void FontDisplayView::GetPreferredSize(CSize* out) {
- DCHECK(out);
+gfx::Size FontDisplayView::GetPreferredSize() {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
ChromeFont font = rb.GetFont(ResourceBundle::BaseFont);
- out->cx = font.ave_char_width() * kFontDisplayMaxWidthChars;
- out->cy = font.height() * kFontDisplayMaxHeightChars
- + 2 * kFontDisplayLabelPadding;
+ return gfx::Size(font.ave_char_width() * kFontDisplayMaxWidthChars,
+ font.height() * kFontDisplayMaxHeightChars
+ + 2 * kFontDisplayLabelPadding);
}
void EmbellishTitle(ChromeViews::Label* title_label) {

Powered by Google App Engine
This is Rietveld 408576698