diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 06:56:33 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 06:56:33 +0000 |
commit | 79e549faf26611d5ac05bc4f7fefd4a71a23fcb2 (patch) | |
tree | e7c50ebe8d193233ce2b06bbf5751bb9e82115b7 /views/view_win.cc | |
parent | 36096983abafe5aa7a1df56904db3c0c8fa9ee2e (diff) | |
download | chromium_src-79e549faf26611d5ac05bc4f7fefd4a71a23fcb2.zip chromium_src-79e549faf26611d5ac05bc4f7fefd4a71a23fcb2.tar.gz chromium_src-79e549faf26611d5ac05bc4f7fefd4a71a23fcb2.tar.bz2 |
Re-land: Refactor Views accessibility.
BUG=74988
TEST=none
Review URL: http://codereview.chromium.org/6581010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_win.cc')
-rw-r--r-- | views/view_win.cc | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/views/view_win.cc b/views/view_win.cc index 2c213c2..011b319 100644 --- a/views/view_win.cc +++ b/views/view_win.cc @@ -13,7 +13,7 @@ #include "ui/base/dragdrop/drag_drop_types.h" #include "ui/gfx/canvas.h" #include "ui/gfx/path.h" -#include "views/accessibility/view_accessibility.h" +#include "views/accessibility/native_view_accessibility_win.h" #include "views/border.h" #include "views/views_delegate.h" #include "views/widget/root_view.h" @@ -22,28 +22,11 @@ namespace views { -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<WidgetWin*>(GetWidget()); - int child_id = view_widget->AddAccessibilityViewEvent(this); - ::NotifyWinEvent(ViewAccessibility::MSAAEvent(event_type), - view_widget->GetNativeView(), OBJID_CLIENT, child_id); - } -} - -ViewAccessibility* View::GetViewAccessibility() { - if (!view_accessibility_.get()) - view_accessibility_.swap(ViewAccessibility::Create(this)); - return view_accessibility_.get(); +NativeViewAccessibilityWin* View::GetNativeViewAccessibilityWin() { + if (!native_view_accessibility_win_.get()) + native_view_accessibility_win_.swap( + NativeViewAccessibilityWin::Create(this)); + return native_view_accessibility_win_.get(); } int View::GetHorizontalDragThreshold() { |