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

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.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
Index: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
===================================================================
--- chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc (revision 74231)
+++ chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc (working copy)
@@ -837,7 +837,7 @@
// Update the match cached by each row, in the process of doing so make sure
// we have enough row views.
int total_child_height = 0;
- size_t child_rv_count = GetChildViewCount();
+ size_t child_rv_count = child_count();
if (opt_in_view_) {
DCHECK(child_rv_count > 0);
child_rv_count--;
@@ -847,7 +847,7 @@
if (i >= child_rv_count) {
result_view =
new AutocompleteResultView(this, i, result_font_, result_bold_font_);
- AddChildView(static_cast<int>(i), result_view);
+ AddChildViewAt(result_view, static_cast<int>(i));
} else {
result_view = static_cast<AutocompleteResultView*>(GetChildViewAt(i));
result_view->SetVisible(true);
@@ -991,9 +991,8 @@
// Size our children to the available content area.
gfx::Rect contents_rect = GetContentsBounds();
- int child_count = GetChildViewCount();
int top = contents_rect.y();
- for (int i = 0; i < child_count; ++i) {
+ for (int i = 0; i < child_count(); ++i) {
View* v = GetChildViewAt(i);
if (v->IsVisible()) {
v->SetBounds(contents_rect.x(), top, contents_rect.width(),
@@ -1071,7 +1070,7 @@
views::View* child = views::View::GetViewForPoint(point);
views::View* ancestor = child;
while (ancestor && ancestor != opt_in_view_)
- ancestor = ancestor->GetParent();
+ ancestor = ancestor->parent();
return ancestor ? child : this;
}
@@ -1162,7 +1161,7 @@
return AutocompletePopupModel::kNoMatch;
int nb_match = model_->result().size();
- DCHECK(nb_match <= GetChildViewCount());
+ DCHECK(nb_match <= child_count());
for (int i = 0; i < nb_match; ++i) {
views::View* child = GetChildViewAt(i);
gfx::Point point_in_child_coords(point);
« no previous file with comments | « chrome/browser/ui/views/accessible_pane_view.cc ('k') | chrome/browser/ui/views/bookmark_bar_instructions_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698