Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: views/widget/widget_win.h

Issue 2823009: Keep a map of all views that have sent notifications. This ensures that Acce... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/view_win.cc ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « views/view_win.cc ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698