diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 23:13:49 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 23:13:49 +0000 |
commit | c45dde3c15cddbca7795cab1c28fa472148b01b1 (patch) | |
tree | 74f32f6537b87946703839e7e2dfde2f2a2f9063 /views/view_win.cc | |
parent | 7c8f18ab4383e497f0ba3663156abf81ea5af3e6 (diff) | |
download | chromium_src-c45dde3c15cddbca7795cab1c28fa472148b01b1.zip chromium_src-c45dde3c15cddbca7795cab1c28fa472148b01b1.tar.gz chromium_src-c45dde3c15cddbca7795cab1c28fa472148b01b1.tar.bz2 |
Refactor Views accessibility.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6581010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76825 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() { |