diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-03 00:56:12 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-03 00:56:12 +0000 |
commit | d5c8101d795d43c265d81277305958d38160ab19 (patch) | |
tree | f9d114bcacebec4839356c4feccad2c56932b5b6 /views/view.cc | |
parent | f6b551d4bbde5c66782225ecc8c9aec81c974d07 (diff) | |
download | chromium_src-d5c8101d795d43c265d81277305958d38160ab19.zip chromium_src-d5c8101d795d43c265d81277305958d38160ab19.tar.gz chromium_src-d5c8101d795d43c265d81277305958d38160ab19.tar.bz2 |
Eliminate a lot of duplicated implementations of Get/SetAccessibleName() by just putting it on the base class. Also cleans up a couple other misc. accessibility functions in view.h.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1512012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/views/view.cc b/views/view.cc index c5359a7..3bdb2a2 100644 --- a/views/view.cc +++ b/views/view.cc @@ -1123,6 +1123,19 @@ bool View::InDrag() { return root_view ? (root_view->GetDragView() == this) : false; } +bool View::GetAccessibleName(std::wstring* name) { + DCHECK(name); + + if (accessible_name_.empty()) + return false; + *name = accessible_name_; + return true; +} + +void View::SetAccessibleName(const std::wstring& name) { + accessible_name_ = name; +} + // static void View::ConvertPointToView(const View* src, const View* dst, |