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

Unified Diff: ui/views/layout/box_layout.h

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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
« no previous file with comments | « ui/views/examples/throbber_example.cc ('k') | ui/views/layout/box_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/layout/box_layout.h
diff --git a/ui/views/layout/box_layout.h b/ui/views/layout/box_layout.h
index 1982c86fa4d731e39c528d462bb48bebead57754..d58dabf9735211f2f796cffc9ca186600f053254 100644
--- a/ui/views/layout/box_layout.h
+++ b/ui/views/layout/box_layout.h
@@ -66,8 +66,9 @@ class VIEWS_EXPORT BoxLayout : public LayoutManager {
// Overridden from views::LayoutManager:
virtual void Layout(View* host) OVERRIDE;
- virtual gfx::Size GetPreferredSize(View* host) OVERRIDE;
- virtual int GetPreferredHeightForWidth(View* host, int width) OVERRIDE;
+ virtual gfx::Size GetPreferredSize(const View* host) const OVERRIDE;
+ virtual int GetPreferredHeightForWidth(const View* host,
+ int width) const OVERRIDE;
private:
// Returns the size and position along the main axis of |child_area|.
@@ -79,11 +80,12 @@ class VIEWS_EXPORT BoxLayout : public LayoutManager {
void SetMainAxisPosition(int position, gfx::Rect* child_area) const;
// The preferred size for the dialog given the width of the child area.
- gfx::Size GetPreferredSizeForChildWidth(View* host, int child_area_width);
+ gfx::Size GetPreferredSizeForChildWidth(const View* host,
+ int child_area_width) const;
// The amount of space the layout requires in addition to any space for the
// child views.
- gfx::Size NonChildSize(View* host);
+ gfx::Size NonChildSize(const View* host) const;
const Orientation orientation_;
« no previous file with comments | « ui/views/examples/throbber_example.cc ('k') | ui/views/layout/box_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698