diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-10 05:41:23 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-10 05:41:23 +0000 |
commit | a64f3390904e06e4ee06203bcd03055e77dbde12 (patch) | |
tree | 09686f3874743f0e1ee5c6e027f48a31da4d5735 /views/accessibility/view_accessibility.h | |
parent | b5f4cc278286dd1b0f7d9fb98d2c3554de325f0c (diff) | |
download | chromium_src-a64f3390904e06e4ee06203bcd03055e77dbde12.zip chromium_src-a64f3390904e06e4ee06203bcd03055e77dbde12.tar.gz chromium_src-a64f3390904e06e4ee06203bcd03055e77dbde12.tar.bz2 |
Accessibility information from the renderer was not being returned to tools like screen readers, etc.
This was because the object implementing the root IAccessible interface did not know how to navigate
a native render view. To work around this, we now check if the underlying view is a native view in
our root IAccessible::get_accChild function and if yes we send the WM_GETOBJECT message to the
corresponding RenderWidgetHostViewWin class, which returns an IAccessible interface which then can
expose information from the renderer.
The other changes in the accessibility code are for some crashes I observed while testing the
screen readers like nvda, the Windows screen reader which send a flurry of WM_GETOBJECT messages
leading to some race conditions.
We also ensure that the accessibility information for a view is torn down when the view is destroyed.
Fixes portions of http://code.google.com/p/chromium/issues/detail?id=13291
Bug=13291
Review URL: http://codereview.chromium.org/261044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28655 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/accessibility/view_accessibility.h')
-rw-r--r-- | views/accessibility/view_accessibility.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/views/accessibility/view_accessibility.h b/views/accessibility/view_accessibility.h index bc1c26f..57eb45d 100644 --- a/views/accessibility/view_accessibility.h +++ b/views/accessibility/view_accessibility.h @@ -10,6 +10,7 @@ #include <oleacc.h> +#include "views/controls/native/native_view_host.h" #include "views/view.h" //////////////////////////////////////////////////////////////////////////////// @@ -135,10 +136,18 @@ class ATL_NO_VTABLE ViewAccessibility // to MSAA states set. long MSAAState(AccessibilityTypes::State state); + // Returns the IAccessible interface for a native view if applicable. + // Returns S_OK on success. + HRESULT GetNativeIAccessibleInterface(views::NativeViewHost* native_host, + IDispatch** disp_child); + // Member View needed for view-specific calls. views::View* view_; DISALLOW_EVIL_CONSTRUCTORS(ViewAccessibility); }; +extern const wchar_t kViewsUninitializeAccessibilityInstance[]; +extern const wchar_t kViewsNativeHostPropForAccessibility[]; + #endif // VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_H_ |