diff options
Diffstat (limited to 'chrome/browser/browser_accessibility_manager_win.h')
-rw-r--r-- | chrome/browser/browser_accessibility_manager_win.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/chrome/browser/browser_accessibility_manager_win.h b/chrome/browser/browser_accessibility_manager_win.h index 32a8843..838bbda 100644 --- a/chrome/browser/browser_accessibility_manager_win.h +++ b/chrome/browser/browser_accessibility_manager_win.h @@ -10,6 +10,9 @@ #include <atlcom.h> #include <oleacc.h> +#include <hash_map> +#include <vector> + #include "base/hash_tables.h" #include "base/scoped_comptr_win.h" #include "base/scoped_ptr.h" @@ -32,6 +35,7 @@ class BrowserAccessibilityDelegate { virtual ~BrowserAccessibilityDelegate() {} virtual void SetAccessibilityFocus(int acc_obj_id) = 0; virtual void AccessibilityDoDefaultAction(int acc_obj_id) = 0; + virtual void AccessibilityObjectChildrenChangeAck() = 0; }; // Manages a tree of BrowserAccessibility objects. @@ -48,6 +52,9 @@ class BrowserAccessibilityManager { // Return a pointer to the root of the tree, does not make a new reference. BrowserAccessibility* GetRoot(); + // Removes the BrowserAccessibility child_id from the manager. + void Remove(LONG child_id); + // Return a pointer to the object corresponding to the given child_id, // does not make a new reference. BrowserAccessibility* GetFromChildID(LONG child_id); @@ -69,16 +76,22 @@ class BrowserAccessibilityManager { // Tell the renderer to do the default action for this node. void DoDefaultAction(const BrowserAccessibility& node); - // Called when the renderer process has notified us of a focus or state - // change. Send a notification to MSAA clients of the change. + // Called when the renderer process has notified us of a focus, state, + // or children change. Send a notification to MSAA clients of the change. void OnAccessibilityFocusChange(int acc_obj_id); void OnAccessibilityObjectStateChange(int acc_obj_id); + void OnAccessibilityObjectChildrenChange( + const std::vector<webkit_glue::WebAccessibility>& acc_changes); private: + // Returns the next MSAA child id. + static LONG GetNextChildID(); + // Recursively build a tree of BrowserAccessibility objects from // the WebAccessibility tree received from the renderer process. BrowserAccessibility* CreateAccessibilityTree( BrowserAccessibility* parent, + int child_id, const webkit_glue::WebAccessibility& src, int index_in_parent); |