summaryrefslogtreecommitdiffstats
path: root/views/accessibility
diff options
context:
space:
mode:
authorctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 01:49:39 +0000
committerctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 01:49:39 +0000
commit8a0a55e61c5efd4711fbf21d49b4001a4cc9908b (patch)
tree658af47a25e0ec4f84a87c2bf6859c4809ce2f42 /views/accessibility
parent690aa5c82084132146296cc439b54d5231659d61 (diff)
downloadchromium_src-8a0a55e61c5efd4711fbf21d49b4001a4cc9908b.zip
chromium_src-8a0a55e61c5efd4711fbf21d49b4001a4cc9908b.tar.gz
chromium_src-8a0a55e61c5efd4711fbf21d49b4001a4cc9908b.tar.bz2
[accessibility] Extension toolbar and infobar container views should not have state visible if they are not rendered on screen.
Add the ROLE_PANE role to viewsaccessibility types. Provide accessible role and name for BrowserActionsContainer, InfoBarContainer, and InfoBar. Set BrowserActionsContainer view visibility to true only when it contains browser actions. Set ExtensionShelf vew visibility to true only when it has non-zero height. BUG=36224 TEST=Verify extension toolbar and infobar container accessibility info within AccExplore32.exe Review URL: http://codereview.chromium.org/669275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/accessibility')
-rw-r--r--views/accessibility/accessibility_types.h1
-rw-r--r--views/accessibility/view_accessibility.cc8
-rw-r--r--views/accessibility/view_accessibility.h4
3 files changed, 8 insertions, 5 deletions
diff --git a/views/accessibility/accessibility_types.h b/views/accessibility/accessibility_types.h
index cc92d0c..79b9e03 100644
--- a/views/accessibility/accessibility_types.h
+++ b/views/accessibility/accessibility_types.h
@@ -31,6 +31,7 @@ class AccessibilityTypes {
ROLE_LINK,
ROLE_PAGETAB,
ROLE_PAGETABLIST,
+ ROLE_PANE,
ROLE_PUSHBUTTON,
ROLE_SEPARATOR,
ROLE_TEXT,
diff --git a/views/accessibility/view_accessibility.cc b/views/accessibility/view_accessibility.cc
index 32239d1..9d8861a 100644
--- a/views/accessibility/view_accessibility.cc
+++ b/views/accessibility/view_accessibility.cc
@@ -23,7 +23,7 @@ HRESULT ViewAccessibility::Initialize(views::View* view) {
return S_OK;
}
-// TODO(klink): Handle case where child View is not contained by parent.
+// TODO(ctguil): Handle case where child View is not contained by parent.
STDMETHODIMP ViewAccessibility::accHitTest(LONG x_left, LONG y_top,
VARIANT* child) {
if (!child) {
@@ -699,7 +699,7 @@ void ViewAccessibility::SetState(VARIANT* msaa_state, views::View* view) {
msaa_state->lVal |= MSAAState(state);
}
-long ViewAccessibility::MSAARole(AccessibilityTypes::Role role) {
+int32 ViewAccessibility::MSAARole(AccessibilityTypes::Role role) {
switch (role) {
case AccessibilityTypes::ROLE_APPLICATION:
return ROLE_SYSTEM_APPLICATION;
@@ -721,6 +721,8 @@ long ViewAccessibility::MSAARole(AccessibilityTypes::Role role) {
return ROLE_SYSTEM_PAGETAB;
case AccessibilityTypes::ROLE_PAGETABLIST:
return ROLE_SYSTEM_PAGETABLIST;
+ case AccessibilityTypes::ROLE_PANE:
+ return ROLE_SYSTEM_PANE;
case AccessibilityTypes::ROLE_PUSHBUTTON:
return ROLE_SYSTEM_PUSHBUTTON;
case AccessibilityTypes::ROLE_SEPARATOR:
@@ -740,7 +742,7 @@ long ViewAccessibility::MSAARole(AccessibilityTypes::Role role) {
}
}
-long ViewAccessibility::MSAAState(AccessibilityTypes::State state) {
+int32 ViewAccessibility::MSAAState(AccessibilityTypes::State state) {
switch (state) {
case AccessibilityTypes::STATE_HASPOPUP :
return STATE_SYSTEM_HASPOPUP;
diff --git a/views/accessibility/view_accessibility.h b/views/accessibility/view_accessibility.h
index 7d95794..b7a6dad 100644
--- a/views/accessibility/view_accessibility.h
+++ b/views/accessibility/view_accessibility.h
@@ -130,11 +130,11 @@ class ATL_NO_VTABLE ViewAccessibility
// Returns a conversion from the Role (as defined in accessibility_types.h)
// to an MSAA role.
- long MSAARole(AccessibilityTypes::Role role);
+ int32 MSAARole(AccessibilityTypes::Role role);
// Returns a conversion from the State (as defined in accessibility_types.h)
// to MSAA states set.
- long MSAAState(AccessibilityTypes::State state);
+ int32 MSAAState(AccessibilityTypes::State state);
// Returns the IAccessible interface for a native view if applicable.
// Returns S_OK on success.