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

Side by Side Diff: chrome/views/grid_layout.h

Issue 14450: Some cleanup, using gfx::Size instead of CSize for ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/views/grid_layout.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_VIEWS_GRID_LAYOUT_H__ 5 #ifndef CHROME_VIEWS_GRID_LAYOUT_H__
6 #define CHROME_VIEWS_GRID_LAYOUT_H__ 6 #define CHROME_VIEWS_GRID_LAYOUT_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Returns the preferred size for the GridLayout. 167 // Returns the preferred size for the GridLayout.
168 virtual gfx::Size GetPreferredSize(View* host); 168 virtual gfx::Size GetPreferredSize(View* host);
169 169
170 virtual int GetPreferredHeightForWidth(View* host, int width); 170 virtual int GetPreferredHeightForWidth(View* host, int width);
171 171
172 private: 172 private:
173 // As both Layout and GetPreferredSize need to do nearly the same thing, 173 // As both Layout and GetPreferredSize need to do nearly the same thing,
174 // they both call into this method. This sizes the Columns/Rows as 174 // they both call into this method. This sizes the Columns/Rows as
175 // appropriate. If layout is true, width/height give the width/height the 175 // appropriate. If layout is true, width/height give the width/height the
176 // of the host, otherwise they are ignored. 176 // of the host, otherwise they are ignored.
177 void SizeRowsAndColumns(bool layout, int width, int height, CSize* pref); 177 void SizeRowsAndColumns(bool layout, int width, int height,
178 gfx::Size* pref);
178 179
179 // Calculates the master columns of all the column sets. See Column for 180 // Calculates the master columns of all the column sets. See Column for
180 // a description of what a master column is. 181 // a description of what a master column is.
181 void CalculateMasterColumnsIfNecessary(); 182 void CalculateMasterColumnsIfNecessary();
182 183
183 // This is called internally from AddView. It adds the ViewState to the 184 // This is called internally from AddView. It adds the ViewState to the
184 // appropriate structures, and updates internal fields such as next_column_. 185 // appropriate structures, and updates internal fields such as next_column_.
185 void AddViewState(ViewState* view_state); 186 void AddViewState(ViewState* view_state);
186 187
187 // Returns the column set for the specified id, or NULL if one doesn't exist. 188 // Returns the column set for the specified id, or NULL if one doesn't exist.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // for a description of what the master column is. 346 // for a description of what the master column is.
346 std::vector<Column*> master_columns_; 347 std::vector<Column*> master_columns_;
347 348
348 DISALLOW_EVIL_CONSTRUCTORS(ColumnSet); 349 DISALLOW_EVIL_CONSTRUCTORS(ColumnSet);
349 }; 350 };
350 351
351 } // namespace views 352 } // namespace views
352 353
353 #endif // CHROME_VIEWS_GRID_LAYOUT_H__ 354 #endif // CHROME_VIEWS_GRID_LAYOUT_H__
354 355
OLDNEW
« no previous file with comments | « no previous file | chrome/views/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698