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.h | |
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.h')
-rw-r--r-- | views/view.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/views/view.h b/views/view.h index e2a76ac..d8177aa 100644 --- a/views/view.h +++ b/views/view.h @@ -573,7 +573,7 @@ class View : public AcceleratorTarget { // Returns a brief, identifying string, containing a unique, readable name of // a given control. Sets the input string appropriately, and returns true if // successful. - virtual bool GetAccessibleName(std::wstring* name) { return false; } + bool GetAccessibleName(std::wstring* name); // Returns the accessibility role of the current view. The role is what // assistive technologies (ATs) use to determine what behavior to expect from @@ -593,20 +593,10 @@ class View : public AcceleratorTarget { // appropriately, and returns true if successful. virtual bool GetAccessibleValue(std::wstring* value) { return false; } - // Assigns a keyboard shortcut string description to the given control. Needed - // as a View does not know which shortcut will be associated with it until it - // is created to be a certain type. - virtual void SetAccessibleKeyboardShortcut(const std::wstring& shortcut) {} - // Assigns a string name to the given control. Needed as a View does not know // which name will be associated with it until it is created to be a // certain type. - virtual void SetAccessibleName(const std::wstring& name) {} - - // Assigns a string value to the given control. Needed as a View does not know - // which value will be associated with it until it is created to be a - // certain type. - virtual void SetAccessibleValue(const std::wstring& value) {} + void SetAccessibleName(const std::wstring& name); // Returns an instance of a wrapper class implementing the (platform-specific) // accessibility interface for a given View. If one exists, it will be @@ -1267,6 +1257,9 @@ class View : public AcceleratorTarget { // List of descendants wanting notification when their visible bounds change. scoped_ptr<ViewList> descendants_to_notify_; + // Name for this view, which can be retrieved by accessibility APIs. + std::wstring accessible_name_; + // Next view to be focused when the Tab key is pressed. View* next_focusable_view_; |