From 48250ad646fa8cb3d68851773a2e60a49889e5ed Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Wed, 13 Jul 2011 22:06:28 +0000 Subject: views: Add unittests for View::GetViewsWithGroup() method. Also, rename it to GetViewsInGroup(). BUG=72040 TEST=views_unittests --gtest_filter=ViewTest.GetViewByID R=ben@chromium.org,sky@chromium.org Review URL: http://codereview.chromium.org/7328031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92430 0039d316-1c4b-4281-b951-d872f2087c98 --- views/view.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'views/view.cc') diff --git a/views/view.cc b/views/view.cc index 594fffa..eae9666 100644 --- a/views/view.cc +++ b/views/view.cc @@ -613,17 +613,17 @@ bool View::IsGroupFocusTraversable() const { return true; } -void View::GetViewsWithGroup(int group_id, Views* out) { - if (group_ == group_id) - out->push_back(this); +void View::GetViewsInGroup(int group, Views* views) { + if (group_ == group) + views->push_back(this); for (int i = 0, count = child_count(); i < count; ++i) - GetChildViewAt(i)->GetViewsWithGroup(group_id, out); + GetChildViewAt(i)->GetViewsInGroup(group, views); } -View* View::GetSelectedViewForGroup(int group_id) { +View* View::GetSelectedViewForGroup(int group) { Views views; - GetWidget()->GetRootView()->GetViewsWithGroup(group_id, &views); + GetWidget()->GetRootView()->GetViewsInGroup(group, &views); return views.empty() ? NULL : views[0]; } -- cgit v1.1