diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 22:06:28 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 22:06:28 +0000 |
commit | 48250ad646fa8cb3d68851773a2e60a49889e5ed (patch) | |
tree | e0869b0584c52f796f245aaecb39d3afadb670a1 /views/view.cc | |
parent | 8d2c15745a7118ae3dab7e20e046257a66fc46a5 (diff) | |
download | chromium_src-48250ad646fa8cb3d68851773a2e60a49889e5ed.zip chromium_src-48250ad646fa8cb3d68851773a2e60a49889e5ed.tar.gz chromium_src-48250ad646fa8cb3d68851773a2e60a49889e5ed.tar.bz2 |
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
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 12 |
1 files changed, 6 insertions, 6 deletions
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]; } |