From d53049c6c12fa149fe048f23da143029f2f18ac5 Mon Sep 17 00:00:00 2001 From: "rohitrao@chromium.org" Date: Thu, 29 Jul 2010 03:24:45 +0000 Subject: Revert 54074 - Add initial tests for keyboard access (tabbing in some dialogs). BUG=none TEST=none Review URL: http://codereview.chromium.org/3015026 TBR=dtseng@chromium.org Review URL: http://codereview.chromium.org/3046031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54093 0039d316-1c4b-4281-b951-d872f2087c98 --- views/view_win.cc | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'views/view_win.cc') diff --git a/views/view_win.cc b/views/view_win.cc index bbbe90e..3079b5c 100644 --- a/views/view_win.cc +++ b/views/view_win.cc @@ -11,7 +11,6 @@ #include "views/accessibility/view_accessibility.h" #include "views/accessibility/view_accessibility_wrapper.h" #include "views/border.h" -#include "views/views_delegate.h" #include "views/widget/root_view.h" #include "views/widget/widget.h" #include "views/widget/widget_win.h" @@ -31,26 +30,15 @@ int View::GetMenuShowDelay() { return delay; } +// Notifies accessibility clients of the event_type on this view. +// Clients will call get_accChild found in ViewAccessibility with the supplied +// child id we generate here to retrieve the IAccessible associated with this +// view. void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type) { - NotifyAccessibilityEvent(event_type, true); -} - -void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type, - bool send_native_event) { - // Send the notification to the delegate. - if (ViewsDelegate::views_delegate) - ViewsDelegate::views_delegate->NotifyAccessibilityEvent(this, event_type); - - // Now call the Windows-specific method to notify MSAA clients of this - // event. The widget gives us a temporary unique child ID to associate - // with this view so that clients can call get_accChild in ViewAccessibility - // to retrieve the IAccessible associated with this view. - if (send_native_event) { - WidgetWin* view_widget = static_cast(GetWidget()); - int child_id = view_widget->AddAccessibilityViewEvent(this); - ::NotifyWinEvent(ViewAccessibility::MSAAEvent(event_type), - view_widget->GetNativeView(), OBJID_CLIENT, child_id); - } + WidgetWin* view_widget = static_cast(GetWidget()); + int child_id = view_widget->AddAccessibilityViewEvent(this); + ::NotifyWinEvent(ViewAccessibility::MSAAEvent(event_type), + view_widget->GetNativeView(), OBJID_CLIENT, child_id); } ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() { -- cgit v1.1