summaryrefslogtreecommitdiffstats
path: root/views/accessibility
diff options
context:
space:
mode:
authordtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-07 18:55:50 +0000
committerdtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-07 18:55:50 +0000
commit751474c928649f8477194797e903d469c3ff6e2a (patch)
tree62ded683a3f35f77ff18171cc202cf5e64e61b01 /views/accessibility
parent0a2d3da9994ecd911670a9fd74733fb8a1cd0dd1 (diff)
downloadchromium_src-751474c928649f8477194797e903d469c3ff6e2a.zip
chromium_src-751474c928649f8477194797e903d469c3ff6e2a.tar.gz
chromium_src-751474c928649f8477194797e903d469c3ff6e2a.tar.bz2
Fire focus events when CustomButtons are hottracked.
BUG=47585 TEST=none Review URL: http://codereview.chromium.org/2867040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/accessibility')
-rw-r--r--views/accessibility/accessibility_types.h17
-rw-r--r--views/accessibility/view_accessibility.cc18
2 files changed, 31 insertions, 4 deletions
diff --git a/views/accessibility/accessibility_types.h b/views/accessibility/accessibility_types.h
index 79108b1..fd9f35b 100644
--- a/views/accessibility/accessibility_types.h
+++ b/views/accessibility/accessibility_types.h
@@ -25,10 +25,19 @@ class AccessibilityTypes {
typedef uint32 State;
enum StateFlag {
STATE_CHECKED = 1 << 0,
- STATE_HASPOPUP = 1 << 1,
- STATE_LINKED = 1 << 2,
- STATE_PROTECTED = 1 << 3,
- STATE_READONLY = 1 << 4
+ STATE_COLLAPSED = 1 << 1,
+ STATE_DEFAULT = 1 << 2,
+ STATE_EXPANDED = 1 << 3,
+ STATE_HASPOPUP = 1 << 4,
+ STATE_HOTTRACKED = 1 << 5,
+ STATE_INVISIBLE = 1 << 6,
+ STATE_LINKED = 1 << 7,
+ STATE_OFFSCREEN = 1 << 8,
+ STATE_PRESSED = 1 << 9,
+ STATE_PROTECTED = 1 << 10,
+ STATE_READONLY = 1 << 11,
+ STATE_SELECTED = 1 << 12,
+ STATE_UNAVAILABLE = 1 << 13
};
// This defines an enumeration of the supported accessibility roles in our
diff --git a/views/accessibility/view_accessibility.cc b/views/accessibility/view_accessibility.cc
index 179c9f6..8bb9ed4 100644
--- a/views/accessibility/view_accessibility.cc
+++ b/views/accessibility/view_accessibility.cc
@@ -854,14 +854,32 @@ int32 ViewAccessibility::MSAAState(AccessibilityTypes::State state) {
int32 msaa_state = 0;
if (state & AccessibilityTypes::STATE_CHECKED)
msaa_state |= STATE_SYSTEM_CHECKED;
+ if (state & AccessibilityTypes::STATE_COLLAPSED)
+ msaa_state |= STATE_SYSTEM_COLLAPSED;
+ if (state & AccessibilityTypes::STATE_DEFAULT)
+ msaa_state |= STATE_SYSTEM_DEFAULT;
+ if (state & AccessibilityTypes::STATE_EXPANDED)
+ msaa_state |= STATE_SYSTEM_EXPANDED;
if (state & AccessibilityTypes::STATE_HASPOPUP)
msaa_state |= STATE_SYSTEM_HASPOPUP;
+ if (state & AccessibilityTypes::STATE_HOTTRACKED)
+ msaa_state |= STATE_SYSTEM_HOTTRACKED;
+ if (state & AccessibilityTypes::STATE_INVISIBLE)
+ msaa_state |= STATE_SYSTEM_INVISIBLE;
if (state & AccessibilityTypes::STATE_LINKED)
msaa_state |= STATE_SYSTEM_LINKED;
+ if (state & AccessibilityTypes::STATE_OFFSCREEN)
+ msaa_state |= STATE_SYSTEM_OFFSCREEN;
+ if (state & AccessibilityTypes::STATE_PRESSED)
+ msaa_state |= STATE_SYSTEM_PRESSED;
if (state & AccessibilityTypes::STATE_PROTECTED)
msaa_state |= STATE_SYSTEM_PROTECTED;
if (state & AccessibilityTypes::STATE_READONLY)
msaa_state |= STATE_SYSTEM_READONLY;
+ if (state & AccessibilityTypes::STATE_SELECTED)
+ msaa_state |= STATE_SYSTEM_SELECTED;
+ if (state & AccessibilityTypes::STATE_UNAVAILABLE)
+ msaa_state |= STATE_SYSTEM_UNAVAILABLE;
return msaa_state;
}