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

Unified Diff: chrome/browser/ui/views/infobars/infobar_container.cc

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « chrome/browser/ui/views/info_bubble.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/infobars/infobar_container.cc
===================================================================
--- chrome/browser/ui/views/infobars/infobar_container.cc (revision 74231)
+++ chrome/browser/ui/views/infobars/infobar_container.cc (working copy)
@@ -60,7 +60,7 @@
void InfoBarContainer::PaintInfoBarArrows(gfx::Canvas* canvas,
View* outer_view,
int arrow_center_x) {
- for (int i = 0; i < GetChildViewCount(); ++i) {
+ for (int i = 0; i < child_count(); ++i) {
InfoBarView* infobar = static_cast<InfoBarView*>(GetChildViewAt(i));
infobar->PaintArrow(canvas, outer_view, arrow_center_x);
}
@@ -71,14 +71,14 @@
// of the delegate). Our preferred height is the sum of the preferred heights
// of the InfoBars contained within us.
int height = 0;
- for (int i = 0; i < GetChildViewCount(); ++i)
+ for (int i = 0; i < child_count(); ++i)
height += GetChildViewAt(i)->GetPreferredSize().height();
return gfx::Size(0, height);
}
void InfoBarContainer::Layout() {
int top = 0;
- for (int i = 0; i < GetChildViewCount(); ++i) {
+ for (int i = 0; i < child_count(); ++i) {
View* child = GetChildViewAt(i);
gfx::Size ps = child->GetPreferredSize();
child->SetBounds(0, top, width(), ps.height());
@@ -93,7 +93,7 @@
void InfoBarContainer::ViewHierarchyChanged(bool is_add,
View* parent,
View* child) {
- if (parent == this && child->GetParent() == this) {
+ if (parent == this && child->parent() == this) {
if (delegate_) {
// An InfoBar child was added or removed. Tell the delegate it needs to
// re-layout since our preferred size will have changed.
@@ -147,7 +147,7 @@
// a child view until its close animation completes, which can result in
// different number of infobars in container and infobar delegates in tab
// contents.
- for (int i = 0; i < GetChildViewCount(); ++i) {
+ for (int i = 0; i < child_count(); ++i) {
InfoBarView* infobar = static_cast<InfoBarView*>(GetChildViewAt(i));
if (infobar->delegate() == delegate) {
if (use_animation) {
« no previous file with comments | « chrome/browser/ui/views/info_bubble.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698