Commit 8f57fb3c authored by dougt's avatar dougt Committed by Commit bot

Reuse AXPlatformNodeBase::Init to set owner.

BUG=703369

Review-Url: https://codereview.chromium.org/2872983002
Cr-Commit-Position: refs/heads/master@{#471080}
parent 51d2ef45
...@@ -4091,6 +4091,11 @@ void BrowserAccessibilityComWin::Destroy() { ...@@ -4091,6 +4091,11 @@ void BrowserAccessibilityComWin::Destroy() {
AXPlatformNodeWin::Destroy(); AXPlatformNodeWin::Destroy();
} }
void BrowserAccessibilityComWin::Init(ui::AXPlatformNodeDelegate* delegate) {
owner_ = static_cast<BrowserAccessibilityWin*>(delegate);
AXPlatformNodeBase::Init(delegate);
}
std::vector<base::string16> BrowserAccessibilityComWin::ComputeTextAttributes() std::vector<base::string16> BrowserAccessibilityComWin::ComputeTextAttributes()
const { const {
std::vector<base::string16> attributes; std::vector<base::string16> attributes;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "third_party/isimpledom/ISimpleDOMDocument.h" #include "third_party/isimpledom/ISimpleDOMDocument.h"
#include "third_party/isimpledom/ISimpleDOMNode.h" #include "third_party/isimpledom/ISimpleDOMNode.h"
#include "third_party/isimpledom/ISimpleDOMText.h" #include "third_party/isimpledom/ISimpleDOMText.h"
#include "ui/accessibility/platform/ax_platform_node_delegate.h"
#include "ui/accessibility/platform/ax_platform_node_win.h" #include "ui/accessibility/platform/ax_platform_node_win.h"
namespace ui { namespace ui {
...@@ -751,6 +752,7 @@ class __declspec(uuid("562072fe-3390-43b1-9e2c-dd4118f5ac79")) ...@@ -751,6 +752,7 @@ class __declspec(uuid("562072fe-3390-43b1-9e2c-dd4118f5ac79"))
// AXPlatformNode overrides // AXPlatformNode overrides
// //
void Destroy() override; void Destroy() override;
void Init(ui::AXPlatformNodeDelegate* delegate) 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;
......
...@@ -20,7 +20,6 @@ BrowserAccessibilityWin::BrowserAccessibilityWin() { ...@@ -20,7 +20,6 @@ BrowserAccessibilityWin::BrowserAccessibilityWin() {
DCHECK(SUCCEEDED(hr)); DCHECK(SUCCEEDED(hr));
browser_accessibility_com_->AddRef(); browser_accessibility_com_->AddRef();
browser_accessibility_com_->SetOwner(this);
// Set the delegate to us // Set the delegate to us
browser_accessibility_com_->Init(this); browser_accessibility_com_->Init(this);
......
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