diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 19:22:58 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 19:22:58 +0000 |
commit | b4c158db2d55a600c9e92691fdbe8709d04f84c8 (patch) | |
tree | 0276050c1224a874508b6e017ef12149d5ffd001 /views | |
parent | eac60f73ccc4dec42784ee6237f73ec4fa69ed7a (diff) | |
download | chromium_src-b4c158db2d55a600c9e92691fdbe8709d04f84c8.zip chromium_src-b4c158db2d55a600c9e92691fdbe8709d04f84c8.tar.gz chromium_src-b4c158db2d55a600c9e92691fdbe8709d04f84c8.tar.bz2 |
Make the Windows location bar send accessibility events to the
accessibility extension API on Windows. This adds a few more
accessibility events to views accessibility while we're at it.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3999001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63394 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/accessibility/accessibility_types.h | 5 | ||||
-rw-r--r-- | views/accessibility/view_accessibility.cc | 8 | ||||
-rw-r--r-- | views/controls/button/custom_button.cc | 7 | ||||
-rw-r--r-- | views/controls/button/custom_button.h | 6 |
4 files changed, 24 insertions, 2 deletions
diff --git a/views/accessibility/accessibility_types.h b/views/accessibility/accessibility_types.h index 43f6de0..e55996e 100644 --- a/views/accessibility/accessibility_types.h +++ b/views/accessibility/accessibility_types.h @@ -89,7 +89,10 @@ class AccessibilityTypes { EVENT_MENUEND, EVENT_MENUPOPUPSTART, EVENT_MENUPOPUPEND, - EVENT_NAMECHANGE + EVENT_NAME_CHANGED, + EVENT_TEXT_CHANGED, + EVENT_SELECTION_CHANGED, + EVENT_VALUE_CHANGED }; private: diff --git a/views/accessibility/view_accessibility.cc b/views/accessibility/view_accessibility.cc index c495ff1..72042c4 100644 --- a/views/accessibility/view_accessibility.cc +++ b/views/accessibility/view_accessibility.cc @@ -653,8 +653,14 @@ int32 ViewAccessibility::MSAAEvent(AccessibilityTypes::Event event) { return EVENT_SYSTEM_MENUPOPUPSTART; case AccessibilityTypes::EVENT_MENUPOPUPEND: return EVENT_SYSTEM_MENUPOPUPEND; - case AccessibilityTypes::EVENT_NAMECHANGE: + case AccessibilityTypes::EVENT_NAME_CHANGED: return EVENT_OBJECT_NAMECHANGE; + case AccessibilityTypes::EVENT_TEXT_CHANGED: + return EVENT_OBJECT_VALUECHANGE; + case AccessibilityTypes::EVENT_SELECTION_CHANGED: + return EVENT_OBJECT_TEXTSELECTIONCHANGED; + case AccessibilityTypes::EVENT_VALUE_CHANGED: + return EVENT_OBJECT_VALUECHANGE; default: // Not supported or invalid event. NOTREACHED(); diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc index ebca6ff..7a3eca2 100644 --- a/views/controls/button/custom_button.cc +++ b/views/controls/button/custom_button.cc @@ -13,6 +13,9 @@ namespace views { // How long the hover animation takes if uninterrupted. static const int kHoverFadeDurationMs = 150; +// static +const char CustomButton::kViewClassName[] = "views/CustomButton"; + //////////////////////////////////////////////////////////////////////////////// // CustomButton, public: @@ -103,6 +106,10 @@ bool CustomButton::IsMouseHovered() const { return HitTest(cursor_pos); } +std::string CustomButton::GetClassName() const { + return kViewClassName; +} + //////////////////////////////////////////////////////////////////////////////// // CustomButton, protected: diff --git a/views/controls/button/custom_button.h b/views/controls/button/custom_button.h index 4de3bd6..0126a9e 100644 --- a/views/controls/button/custom_button.h +++ b/views/controls/button/custom_button.h @@ -21,6 +21,9 @@ namespace views { class CustomButton : public Button, public AnimationDelegate { public: + // The menu button's class name. + static const char kViewClassName[]; + virtual ~CustomButton(); // Possible states @@ -73,6 +76,9 @@ class CustomButton : public Button, // when it's disabled. bool IsMouseHovered() const; + // Returns views/CustomButton. + virtual std::string GetClassName() const; + protected: // Construct the Button with a Listener. See comment for Button's ctor. explicit CustomButton(ButtonListener* listener); |