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

Unified Diff: chrome/browser/find_in_page_controller.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/find_in_page_controller.cc
===================================================================
--- chrome/browser/find_in_page_controller.cc (revision 3391)
+++ chrome/browser/find_in_page_controller.cc (working copy)
@@ -562,21 +562,20 @@
return gfx::Rect();
// Ask the view how large an area it needs to draw on.
- CSize prefsize;
- view_->GetPreferredSize(&prefsize);
+ gfx::Size prefsize = view_->GetPreferredSize();
// Place the view in the top right corner of the dialog boundaries (top left
// for RTL languages).
gfx::Rect view_location;
int x = view_->UILayoutIsRightToLeft() ?
- dialog_bounds.x() : dialog_bounds.width() - prefsize.cx;
+ dialog_bounds.x() : dialog_bounds.width() - prefsize.width();
int y = dialog_bounds.y();
- view_location.SetRect(x, y, prefsize.cx, prefsize.cy);
+ view_location.SetRect(x, y, prefsize.width(), prefsize.height());
// Make sure we don't go out of bounds to the left (right in RTL) if the
// window is too small to fit our dialog.
if (view_->UILayoutIsRightToLeft()) {
- int boundary = dialog_bounds.width() - prefsize.cx;
+ int boundary = dialog_bounds.width() - prefsize.width();
view_location.set_x(std::min(view_location.x(), boundary));
} else {
view_location.set_x(std::max(view_location.x(), dialog_bounds.x()));

Powered by Google App Engine
This is Rietveld 408576698