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
diff --git a/chrome/views/view.h b/chrome/views/view.h
index d56d94f..18314b0ea 100644
--- a/chrome/views/view.h
+++ b/chrome/views/view.h
@@ -158,6 +158,7 @@
// Set the bounds in the parent's coordinate system.
void SetBounds(const CRect& bounds);
+ void SetBounds(const gfx::Point& origin, const gfx::Size& size);
void SetBounds(int x, int y, int width, int height);
void SetX(int x) { SetBounds(x, y(), width(), height()); }
void SetY(int y) { SetBounds(x(), y, width(), height()); }
@@ -212,14 +213,14 @@
void GetPosition(CPoint* out) const;
// Get the size the View would like to be, if enough space were available.
- virtual void GetPreferredSize(CSize* out);
+ virtual gfx::Size GetPreferredSize();
// Convenience method that sizes this view to its preferred size.
void SizeToPreferredSize();
// Gets the minimum size of the view. View's implementation invokes
// GetPreferredSize.
- virtual void GetMinimumSize(CSize* out);
+ virtual gfx::Size GetMinimumSize();
// Return the height necessary to display this view with the provided width.
// View's implementation returns the value from getPreferredSize.cy.