Index: chrome/browser/history_view.cc |
=================================================================== |
--- chrome/browser/history_view.cc (revision 3391) |
+++ chrome/browser/history_view.cc (working copy) |
@@ -435,12 +435,10 @@ |
int title_x = kPageTitleOffset; |
// We calculate the size of the star. |
- CSize star_size; |
- star_toggle_->GetPreferredSize(&star_size); |
+ gfx::Size star_size = star_toggle_->GetPreferredSize(); |
// Measure and lay out the time label, and potentially move |
// our title to suit. |
- CSize time_size; |
Time visit_time = model_->GetVisitTime(model_index_); |
int time_x = kTimeOffset; |
if (visit_time.is_null()) { |
@@ -453,10 +451,10 @@ |
} else { |
time_label_->SetText(base::TimeFormatTimeOfDay(visit_time)); |
} |
- time_label_->GetPreferredSize(&time_size); |
+ gfx::Size time_size = time_label_->GetPreferredSize(); |
time_label_->SetBounds(time_x, kEntryPadding, |
- time_size.cx, time_size.cy); |
+ time_size.width(), time_size.height()); |
// Calculate the position of the favicon. |
int favicon_x = title_x - kFavIconSize - kIconPadding; |
@@ -464,7 +462,7 @@ |
// Now we look to see if the favicon overlaps the time label, |
// and if so, we push the title to the right. If we're not |
// showing the time label, then ignore this step. |
- int overlap = favicon_x - (time_x + time_size.cx + kIconPadding); |
+ int overlap = favicon_x - (time_x + time_size.width() + kIconPadding); |
if (overlap < 0) { |
title_x -= overlap; |
} |
@@ -475,25 +473,25 @@ |
title_link_->SetText(title); |
else |
title_link_->SetText(l10n_util::GetString(IDS_HISTORY_UNTITLED_TITLE)); |
- CSize title_size; |
- title_link_->GetPreferredSize(&title_size); |
+ gfx::Size title_size = title_link_->GetPreferredSize(); |
// Lay out the title label. |
int max_title_x; |
max_title_x = std::max(0, max_x - title_x); |
- if (title_size.cx + kEntryPadding > max_title_x) { |
+ if (title_size.width() + kEntryPadding > max_title_x) { |
// We need to shrink the title to make everything fit. |
- title_size.cx = max_title_x - kEntryPadding; |
+ title_size.set_width(max_title_x - kEntryPadding); |
} |
title_link_->SetBounds(title_x, kEntryPadding, |
- title_size.cx, title_size.cy); |
+ title_size.width(), title_size.height()); |
// Lay out the star. |
if (model_->IsStarred(model_index_)) { |
- star_toggle_->SetBounds(title_x + title_size.cx + kIconPadding, |
- kEntryPadding, star_size.cx, star_size.cy); |
+ star_toggle_->SetBounds(title_x + title_size.width() + kIconPadding, |
+ kEntryPadding, star_size.width(), |
+ star_size.height()); |
star_toggle_->SetState(true); |
star_toggle_->SetVisible(true); |
} else { |
@@ -1293,10 +1291,9 @@ |
int HistoryView::GetDeleteControlWidth() { |
if (delete_control_width_) |
return delete_control_width_; |
- CSize pref; |
EnsureRenderer(); |
- delete_renderer_->GetPreferredSize(&pref); |
- delete_control_width_ = pref.cx; |
+ gfx::Size pref = delete_renderer_->GetPreferredSize(); |
+ delete_control_width_ = pref.width(); |
return delete_control_width_; |
} |