summaryrefslogtreecommitdiffstats
path: root/content/browser/accessibility/browser_accessibility_manager_win.h
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-21 10:46:20 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-21 10:46:20 +0000
commita91c27f77a40920fb9af5b8c1249dfe03e35d9bc (patch)
treea1316405c6adb9650c159a1c98d4668e9a49fcb0 /content/browser/accessibility/browser_accessibility_manager_win.h
parentc923ccc455bda766a9cf46e1feddc099933a3af9 (diff)
downloadchromium_src-a91c27f77a40920fb9af5b8c1249dfe03e35d9bc.zip
chromium_src-a91c27f77a40920fb9af5b8c1249dfe03e35d9bc.tar.gz
chromium_src-a91c27f77a40920fb9af5b8c1249dfe03e35d9bc.tar.bz2
Make BrowserAccessibilityManager use AXTree.
This is the final step of migrating content/*/accessibility to make full use of the new infrastructure in ui/accessibility. Previously, BrowserAccessibilityManager owned the tree of BrowserAccessibility objects and handled making changes to the tree in response to messages from the renderer. Now, AXTree handles the updates from the renderer and notifies BrowserAccessibilityManager (via AXTreeDelegate) when it should create or destroy BrowserAccessibility objects, and when it should notify a BrowserAccessibility object that it's been modified. This makes the serialization/unserialization logic fully tested now, and greatly clarifies the semantics of when in the update cycle various notifications are called (e.g., PreInitialize and PostInitialize are now OnDataChanged and OnUpdateFinished). BUG=316726 Review URL: https://codereview.chromium.org/234723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264979 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/accessibility/browser_accessibility_manager_win.h')
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_win.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.h b/content/browser/accessibility/browser_accessibility_manager_win.h
index 3fbbd3f..18260e4 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.h
+++ b/content/browser/accessibility/browser_accessibility_manager_win.h
@@ -23,13 +23,13 @@ class CONTENT_EXPORT BrowserAccessibilityManagerWin
BrowserAccessibilityManagerWin(
content::LegacyRenderWidgetHostHWND* accessible_hwnd,
IAccessible* parent_iaccessible,
- const ui::AXNodeData& src,
+ const ui::AXTreeUpdate& initial_tree,
BrowserAccessibilityDelegate* delegate,
BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory());
virtual ~BrowserAccessibilityManagerWin();
- static ui::AXNodeData GetEmptyDocument();
+ static ui::AXTreeUpdate GetEmptyDocument();
// Get the closest containing HWND.
HWND parent_hwnd() { return parent_hwnd_; }
@@ -43,9 +43,11 @@ class CONTENT_EXPORT BrowserAccessibilityManagerWin
// Calls NotifyWinEvent if the parent window's IAccessible pointer is known.
void MaybeCallNotifyWinEvent(DWORD event, LONG child_id);
+ // AXTree methods
+ virtual void OnNodeWillBeDeleted(ui::AXNode* node) OVERRIDE;
+ virtual void OnNodeCreated(ui::AXNode* node) OVERRIDE;
+
// BrowserAccessibilityManager methods
- virtual void AddNodeToMap(BrowserAccessibility* node);
- virtual void RemoveNode(BrowserAccessibility* node) OVERRIDE;
virtual void OnWindowFocused() OVERRIDE;
virtual void OnWindowBlurred() OVERRIDE;
virtual void NotifyAccessibilityEvent(
@@ -65,7 +67,7 @@ class CONTENT_EXPORT BrowserAccessibilityManagerWin
protected:
// BrowserAccessibilityManager methods
- virtual void OnRootChanged() OVERRIDE;
+ virtual void OnRootChanged(ui::AXNode* new_root) OVERRIDE;
private:
// The closest ancestor HWND.
@@ -83,8 +85,8 @@ class CONTENT_EXPORT BrowserAccessibilityManagerWin
BrowserAccessibilityWin* tracked_scroll_object_;
// A mapping from the Windows-specific unique IDs (unique within the
- // browser process) to renderer ids within this page.
- base::hash_map<long, int32> unique_id_to_renderer_id_map_;
+ // browser process) to accessibility ids within this page.
+ base::hash_map<long, int32> unique_id_to_ax_id_map_;
// Owned by its parent; OnAccessibleHwndDeleted gets called upon deletion.
LegacyRenderWidgetHostHWND* accessible_hwnd_;