summaryrefslogtreecommitdiffstats
path: root/views/view_win.cc
diff options
context:
space:
mode:
authordtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-18 23:53:41 +0000
committerdtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-18 23:53:41 +0000
commit9870326b1412b1f3804eed8d9b6402ac60ddf8f0 (patch)
tree46225afad011decdd6b138dba35836636dee33db /views/view_win.cc
parent23b060ece7a2db1ef5b4802d4903f93edb538ae3 (diff)
downloadchromium_src-9870326b1412b1f3804eed8d9b6402ac60ddf8f0.zip
chromium_src-9870326b1412b1f3804eed8d9b6402ac60ddf8f0.tar.gz
chromium_src-9870326b1412b1f3804eed8d9b6402ac60ddf8f0.tar.bz2
Keep a cache of all views that have sent notifications. This ensures that AccessibleObjectFromEvent works properly.
BUG=9601 TEST=none Review URL: http://codereview.chromium.org/2823009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view_win.cc')
-rw-r--r--views/view_win.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/views/view_win.cc b/views/view_win.cc
index bce8fa8..3079b5c 100644
--- a/views/view_win.cc
+++ b/views/view_win.cc
@@ -8,10 +8,12 @@
#include "base/string_util.h"
#include "gfx/canvas.h"
#include "gfx/path.h"
+#include "views/accessibility/view_accessibility.h"
#include "views/accessibility/view_accessibility_wrapper.h"
#include "views/border.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"
+#include "views/widget/widget_win.h"
namespace views {
@@ -28,6 +30,17 @@ 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) {
+ 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);
+}
+
ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() {
if (accessibility_.get() == NULL) {
accessibility_.reset(new ViewAccessibilityWrapper(this));