Index: views/widget/widget_win.h |
=================================================================== |
--- views/widget/widget_win.h (revision 50246) |
+++ views/widget/widget_win.h (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -10,6 +10,8 @@ |
#include <atlcrack.h> |
#include <atlmisc.h> |
+#include <vector> |
+ |
#include "app/win/window_impl.h" |
#include "base/message_loop.h" |
#include "base/scoped_comptr_win.h" |
@@ -92,6 +94,21 @@ |
can_update_layered_window_ = can_update_layered_window; |
} |
+ // Obtain the view event with the given MSAA child id. Used in |
+ // ViewAccessibility::get_accChild to support requests for children of |
+ // windowless controls. May return NULL (see ViewHierarchyChanged). |
+ View* GetAccessibilityViewEventAt(int id); |
+ |
+ // Add a view that has recently fired an accessibility event. Returns a MSAA |
+ // child id which is generated by: -(index of view in vector + 1) which |
+ // guarantees a negative child id. This distinguishes the view from |
+ // positive MSAA child id's which are direct leaf children of views that have |
+ // associated hWnd's (e.g. WidgetWin). |
+ int AddAccessibilityViewEvent(View* view); |
+ |
+ // Clear a view that has recently been removed on a hierarchy change. |
+ void ClearAccessibilityViewEvent(View* view); |
+ |
BEGIN_MSG_MAP_EX(WidgetWin) |
// Range handlers must go first! |
MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) |
@@ -549,6 +566,17 @@ |
// Non owned pointer to optional delegate. May be NULL if no delegate is |
// being used. |
WidgetDelegate* delegate_; |
+ |
+ // The maximum number of view events in our vector below. |
+ static const int kMaxAccessibilityViewEvents = 20; |
+ |
+ // A vector used to access views for which we have sent notifications to |
+ // accessibility clients. It is used as a circular queue. |
+ std::vector<View*> accessibility_view_events_; |
+ |
+ // The current position of the view events vector. When incrementing, |
+ // we always mod this value with the max view events above . |
+ int accessibility_view_events_index_; |
}; |
} // namespace views |