diff options
author | ctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 01:29:50 +0000 |
---|---|---|
committer | ctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 01:29:50 +0000 |
commit | 018d850177ced7142bdd7a3670af186e1a61d800 (patch) | |
tree | 63071477bf80852aef97d32a9210a17ec781a0aa /views | |
parent | b57509eb8033560cc25bd178ccb3c2cc1accc9b3 (diff) | |
download | chromium_src-018d850177ced7142bdd7a3670af186e1a61d800.zip chromium_src-018d850177ced7142bdd7a3670af186e1a61d800.tar.gz chromium_src-018d850177ced7142bdd7a3670af186e1a61d800.tar.bz2 |
views: [accessibility] Add support for GetAccessibleValue in the combobox control.
BUG=9614
TEST=open AccExplorer, open Report broken website dialog, point AccExplorer to the combobox, see if the string value contained in the 'Bug type'combobox is the currently selected on it.
Patch from Thiago Farina <thiago.farina@gmail.com>
Review URL: http://codereview.chromium.org/1521001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43039 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/combobox/combobox.cc | 7 | ||||
-rw-r--r-- | views/controls/combobox/combobox.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/views/controls/combobox/combobox.cc b/views/controls/combobox/combobox.cc index 2edfcd9..70ba1cc 100644 --- a/views/controls/combobox/combobox.cc +++ b/views/controls/combobox/combobox.cc @@ -106,6 +106,13 @@ void Combobox::SetAccessibleName(const std::wstring& name) { accessible_name_.assign(name); } +bool Combobox::GetAccessibleValue(std::wstring* value) { + DCHECK(value); + + *value = model_->GetItemAt(selected_item_); + return true; +} + void Combobox::Focus() { // Forward the focus to the wrapper. if (native_wrapper_) diff --git a/views/controls/combobox/combobox.h b/views/controls/combobox/combobox.h index fdf5f8e..b2a8388 100644 --- a/views/controls/combobox/combobox.h +++ b/views/controls/combobox/combobox.h @@ -60,6 +60,7 @@ class Combobox : public View { virtual bool GetAccessibleName(std::wstring* name); virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); virtual void SetAccessibleName(const std::wstring& name); + virtual bool GetAccessibleValue(std::wstring* value); protected: virtual void Focus(); |