diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-07 15:34:20 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-07 15:34:20 +0000 |
commit | 00c18a05be35caa57342b1fa0c48ff8cb9ef19cf (patch) | |
tree | 79bba6e6a5b8c3498ad316c76f1544d6f3946d8d /views/focus | |
parent | 297d0e5e3659a6d4a80906e4fc8e757ababae82d (diff) | |
download | chromium_src-00c18a05be35caa57342b1fa0c48ff8cb9ef19cf.zip chromium_src-00c18a05be35caa57342b1fa0c48ff8cb9ef19cf.tar.gz chromium_src-00c18a05be35caa57342b1fa0c48ff8cb9ef19cf.tar.bz2 |
Committing on behalf of dtseng.
We currently only set focus to the widget's hWnd, but we really want
to also notify assistive technologies that a child view received focus
so that it can know to obtain an IAccessible for that custom child
view using the widget hWnd. The widget hWnd has our implementation of
IAccessible through AccessibilityWrapper/ViewAccessibility.
Original code review: http://codereview.chromium.org/1985002
BUG=43363
TEST=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus')
-rw-r--r-- | views/focus/focus_manager_win.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/views/focus/focus_manager_win.cc b/views/focus/focus_manager_win.cc index faf3815..4d897ac 100644 --- a/views/focus/focus_manager_win.cc +++ b/views/focus/focus_manager_win.cc @@ -12,6 +12,13 @@ namespace views { void FocusManager::ClearNativeFocus() { // Keep the top root window focused so we get keyboard events. ::SetFocus(widget_->GetNativeView()); + + // We need to let assistive technologies know which child view got focus so + // they can obtain the proper accessibility object for that child view. + if (focused_view_) { + ::NotifyWinEvent(EVENT_OBJECT_FOCUS, widget_->GetNativeView(), OBJID_CLIENT, + static_cast<LONG>(focused_view_->GetID())); + } } void FocusManager::FocusNativeView(gfx::NativeView native_view) { |