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

Unified Diff: components/infobars/core/infobar_container.cc

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 | « components/infobars/core/infobar_container.h ('k') | content/shell/browser/shell_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/infobars/core/infobar_container.cc
diff --git a/components/infobars/core/infobar_container.cc b/components/infobars/core/infobar_container.cc
index f435dd7824d2380051f3b4695729b48a6e15fd11..b6831129e69a830c970b632e9baed4c66a298b86 100644
--- a/components/infobars/core/infobar_container.cc
+++ b/components/infobars/core/infobar_container.cc
@@ -58,13 +58,14 @@ void InfoBarContainer::ChangeInfoBarManager(InfoBarManager* infobar_manager) {
OnInfoBarStateChanged(false);
}
-int InfoBarContainer::GetVerticalOverlap(int* total_height) {
+int InfoBarContainer::GetVerticalOverlap(int* total_height) const {
// Our |total_height| is the sum of the preferred heights of the InfoBars
// contained within us plus the |vertical_overlap|.
int vertical_overlap = 0;
int next_infobar_y = 0;
- for (InfoBars::iterator i(infobars_.begin()); i != infobars_.end(); ++i) {
+ for (InfoBars::const_iterator i(infobars_.begin()); i != infobars_.end();
+ ++i) {
InfoBar* infobar = *i;
next_infobar_y -= infobar->arrow_height();
vertical_overlap = std::max(vertical_overlap, -next_infobar_y);
« no previous file with comments | « components/infobars/core/infobar_container.h ('k') | content/shell/browser/shell_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698