Commit df2eff4a authored by dougt's avatar dougt Committed by Commit bot

Force AXPlatformNode to have the same unique id as the owning BA object.

This CL allows us to override the AXPlatformNode's GetFromUniqueId
method.  In BrowserAccessibilityComWin we implement this by using the
BrowserAccessibility GetFromUniqueId.

BUG=703369

Review-Url: https://codereview.chromium.org/2894673003
Cr-Commit-Position: refs/heads/master@{#473771}
parent d340a11e
...@@ -4105,6 +4105,12 @@ void BrowserAccessibilityComWin::Init(ui::AXPlatformNodeDelegate* delegate) { ...@@ -4105,6 +4105,12 @@ void BrowserAccessibilityComWin::Init(ui::AXPlatformNodeDelegate* delegate) {
AXPlatformNodeBase::Init(delegate); AXPlatformNodeBase::Init(delegate);
} }
ui::AXPlatformNode* BrowserAccessibilityComWin::GetFromUniqueId(
int32_t unique_id) {
return ToBrowserAccessibilityComWin(
BrowserAccessibility::GetFromUniqueID(unique_id));
}
std::vector<base::string16> BrowserAccessibilityComWin::ComputeTextAttributes() std::vector<base::string16> BrowserAccessibilityComWin::ComputeTextAttributes()
const { const {
std::vector<base::string16> attributes; std::vector<base::string16> attributes;
......
...@@ -753,6 +753,7 @@ class __declspec(uuid("562072fe-3390-43b1-9e2c-dd4118f5ac79")) ...@@ -753,6 +753,7 @@ class __declspec(uuid("562072fe-3390-43b1-9e2c-dd4118f5ac79"))
// //
void Destroy() override; void Destroy() override;
void Init(ui::AXPlatformNodeDelegate* delegate) override; void Init(ui::AXPlatformNodeDelegate* delegate) override;
AXPlatformNode* GetFromUniqueId(int32_t unique_id) override;
// Returns the IA2 text attributes for this object. // Returns the IA2 text attributes for this object.
std::vector<base::string16> ComputeTextAttributes() const; std::vector<base::string16> ComputeTextAttributes() const;
......
...@@ -50,7 +50,7 @@ class AX_EXPORT AXPlatformNode { ...@@ -50,7 +50,7 @@ class AX_EXPORT AXPlatformNode {
AXPlatformNode(); AXPlatformNode();
virtual ~AXPlatformNode(); virtual ~AXPlatformNode();
AXPlatformNode* GetFromUniqueId(int32_t unique_id); virtual AXPlatformNode* GetFromUniqueId(int32_t unique_id);
int32_t unique_id_; int32_t unique_id_;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment