Index: ui/views/focus/focus_search.cc |
=================================================================== |
--- ui/views/focus/focus_search.cc (revision 75141) |
+++ ui/views/focus/focus_search.cc (working copy) |
@@ -24,7 +24,7 @@ |
*focus_traversable = NULL; |
*focus_traversable_view = NULL; |
- if (root_->child_count() == 0) { |
+ if (root_->children_empty()) { |
NOTREACHED(); |
// Nothing to focus on here. |
return NULL; |
@@ -39,14 +39,14 @@ |
// Default to the first/last child |
starting_view = |
reverse ? |
- root_->GetChildViewAt(root_->child_count() - 1) : |
- root_->GetChildViewAt(0); |
+ root_->child_at(root_->children_size() - 1) : |
+ root_->child_at(0); |
// If there was no starting view, then the one we select is a potential |
// focus candidate. |
check_starting_view = true; |
} else { |
// The starting view should be a direct or indirect child of the root. |
- DCHECK(root_->Contains(starting_view)); |
+ DCHECK(root_->Contains(*starting_view)); |
} |
View* v = NULL; |
@@ -70,7 +70,7 @@ |
} |
// Don't set the focus to something outside of this view hierarchy. |
- if (v && v != root_ && !root_->Contains(v)) |
+ if (v && v != root_ && !root_->Contains(*v)) |
v = NULL; |
// If |cycle_| is true, prefer to keep cycling rather than returning NULL. |
@@ -121,7 +121,7 @@ |
} |
View* FocusSearch::GetParent(View* v) const { |
- return root_->Contains(v) ? v->parent() : NULL; |
+ return root_->Contains(*v) ? v->parent() : NULL; |
} |
// Strategy for finding the next focusable view: |
@@ -158,8 +158,8 @@ |
// First let's try the left child. |
if (can_go_down) { |
- if (starting_view->child_count() > 0) { |
- View* v = FindNextFocusableViewImpl(starting_view->GetChildViewAt(0), |
+ if (!starting_view->children_empty()) { |
+ View* v = FindNextFocusableViewImpl(starting_view->child_at(0), |
true, false, true, skip_group_id, |
focus_traversable, |
focus_traversable_view); |
@@ -223,9 +223,8 @@ |
return NULL; |
} |
- if (starting_view->child_count() > 0) { |
- View* view = |
- starting_view->GetChildViewAt(starting_view->child_count() - 1); |
+ if (!starting_view->children_empty()) { |
+ View* view = starting_view->child_at(starting_view->children_size() - 1); |
View* v = FindPreviousFocusableViewImpl(view, true, false, true, |
skip_group_id, |
focus_traversable, |