summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/first_run_view.cc
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-15 18:02:30 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-15 18:02:30 +0000
commit154f8bcac65142d7ae6733204c15ae52cfa320c6 (patch)
treed7375c1119946c2914ee79ef2c0e8aa195b1fbe9 /chrome/browser/views/first_run_view.cc
parent8144d0cea4e142ff7d7a75c84240a4bb8a7fb3a4 (diff)
downloadchromium_src-154f8bcac65142d7ae6733204c15ae52cfa320c6.zip
chromium_src-154f8bcac65142d7ae6733204c15ae52cfa320c6.tar.gz
chromium_src-154f8bcac65142d7ae6733204c15ae52cfa320c6.tar.bz2
Convert GetPreferredSize from:
void GetPreferredSize(CSize* out); to: gfx::Size GetPreferredSize(); .. and update some other places to use gfx::Size as well. http://crbug.com/2186 Review URL: http://codereview.chromium.org/7344 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/first_run_view.cc')
-rw-r--r--chrome/browser/views/first_run_view.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/chrome/browser/views/first_run_view.cc b/chrome/browser/views/first_run_view.cc
index e310e0a..72ed29a 100644
--- a/chrome/browser/views/first_run_view.cc
+++ b/chrome/browser/views/first_run_view.cc
@@ -94,11 +94,10 @@ void FirstRunView::SetupControls() {
AddChildView(customize_link_);
}
-void FirstRunView::GetPreferredSize(CSize *out) {
- DCHECK(out);
- *out = ChromeViews::Window::GetLocalizedContentsSize(
+gfx::Size FirstRunView::GetPreferredSize() {
+ return gfx::Size(ChromeViews::Window::GetLocalizedContentsSize(
IDS_FIRSTRUN_DIALOG_WIDTH_CHARS,
- IDS_FIRSTRUN_DIALOG_HEIGHT_LINES).ToSIZE();
+ IDS_FIRSTRUN_DIALOG_HEIGHT_LINES));
}
void FirstRunView::Layout() {
@@ -107,21 +106,20 @@ void FirstRunView::Layout() {
const int kVertSpacing = 8;
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- CSize pref_size;
- welcome_label_->GetPreferredSize(&pref_size);
+ gfx::Size pref_size = welcome_label_->GetPreferredSize();
// Wrap the label text before we overlap the product icon.
int label_width = background_image()->width() -
rb.GetBitmapNamed(IDR_WIZARD_ICON)->width() - kPanelHorizMargin;
welcome_label_->SetBounds(kPanelHorizMargin, kPanelVertMargin,
- label_width, pref_size.cy);
+ label_width, pref_size.height());
AdjustDialogWidth(welcome_label_);
int next_v_space = background_image()->y() +
background_image()->height() + kPanelVertMargin;
- actions_label_->GetPreferredSize(&pref_size);
+ pref_size = actions_label_->GetPreferredSize();
actions_label_->SetBounds(kPanelHorizMargin, next_v_space,
- pref_size.cx, pref_size.cy);
+ pref_size.width(), pref_size.height());
AdjustDialogWidth(actions_label_);
next_v_space = actions_label_->y() +
@@ -145,9 +143,9 @@ void FirstRunView::Layout() {
actions_shorcuts_->height() +
kUnrelatedControlVerticalSpacing;
- customize_link_->GetPreferredSize(&pref_size);
+ pref_size = customize_link_->GetPreferredSize();
customize_link_->SetBounds(kPanelHorizMargin, next_v_space,
- pref_size.cx, pref_size.cy);
+ pref_size.width(), pref_size.height());
}
void FirstRunView::OpenCustomizeDialog() {