diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-14 18:45:30 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-14 18:45:30 +0000 |
commit | 96f960d08a15c3d125bd10b9ed60b69ea8ab0107 (patch) | |
tree | 39796dda63f3df4ecff5a6e3a8f9634c185adadf | |
parent | 5447d10e77193477da4384cb8ff394a2235c4efa (diff) | |
download | chromium_src-96f960d08a15c3d125bd10b9ed60b69ea8ab0107.zip chromium_src-96f960d08a15c3d125bd10b9ed60b69ea8ab0107.tar.gz chromium_src-96f960d08a15c3d125bd10b9ed60b69ea8ab0107.tar.bz2 |
Lands http://codereview.chromium.org/201102 for Oshima:
Don't allow updating group id once it's set.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/205001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26132 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | views/view.cc | 2 | ||||
-rw-r--r-- | views/view.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/views/view.cc b/views/view.cc index 8664ad9..c5db5db 100644 --- a/views/view.cc +++ b/views/view.cc @@ -791,6 +791,8 @@ int View::GetID() const { } void View::SetGroup(int gid) { + // Don't change the group id once it's set. + DCHECK(group_ == -1 || group_ == gid); group_ = gid; } diff --git a/views/view.h b/views/view.h index 66ef76f..764cbd3 100644 --- a/views/view.h +++ b/views/view.h @@ -454,7 +454,9 @@ class View : public AcceleratorTarget { // A group id is used to tag views which are part of the same logical group. // Focus can be moved between views with the same group using the arrow keys. // Groups are currently used to implement radio button mutual exclusion. + // The group id is immutable once it's set. void SetGroup(int gid); + // Returns the group id of the view, or -1 if the id is not set yet. int GetGroup() const; // If this returns true, the views from the same group can each be focused |