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

Unified Diff: chrome/browser/native_ui_contents.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/native_ui_contents.cc
===================================================================
--- chrome/browser/native_ui_contents.cc (revision 3391)
+++ chrome/browser/native_ui_contents.cc (working copy)
@@ -593,23 +593,21 @@
void SearchableUIContainer::Layout() {
View::Layout();
- CSize search_button_size;
- search_button_->GetPreferredSize(&search_button_size);
+ gfx::Size search_button_size = search_button_->GetPreferredSize();
+ gfx::Size product_logo_size = product_logo_->GetPreferredSize();
- CSize product_logo_size;
- product_logo_->GetPreferredSize(&product_logo_size);
-
int field_width = kDestinationSearchOffset +
kDestinationSearchWidth +
kDestinationSmallerMargin +
- static_cast<int>(search_button_size.cx) +
+ static_cast<int>(search_button_size.width()) +
kDestinationSmallerMargin;
product_logo_->SetBounds(std::max(width() - kProductLogo->width() -
kProductLogoPadding,
field_width),
kProductLogoPadding,
- product_logo_size.cx, product_logo_size.cy);
+ product_logo_size.width(),
+ product_logo_size.height());
}
void SearchableUIContainer::Paint(ChromeCanvas* canvas) {

Powered by Google App Engine
This is Rietveld 408576698