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() {
AXPlatformNodeWin::Destroy();
}
void BrowserAccessibilityComWin::Init(ui::AXPlatformNodeDelegate* delegate) {
owner_ = static_cast<BrowserAccessibilityWin*>(delegate);
AXPlatformNodeBase::Init(delegate);
}
std::vector<base::string16> BrowserAccessibilityComWin::ComputeTextAttributes()
const {
std::vector<base::string16> attributes;
......
......@@ -24,6 +24,7 @@
#include "third_party/isimpledom/ISimpleDOMDocument.h"
#include "third_party/isimpledom/ISimpleDOMNode.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"
namespace ui {
......@@ -751,6 +752,7 @@ class __declspec(uuid("562072fe-3390-43b1-9e2c-dd4118f5ac79"))
// AXPlatformNode overrides
//
void Destroy() override;
void Init(ui::AXPlatformNodeDelegate* delegate) override;
// Returns the IA2 text attributes for this object.
std::vector<base::string16> ComputeTextAttributes() const;
......
......@@ -20,7 +20,6 @@ BrowserAccessibilityWin::BrowserAccessibilityWin() {
DCHECK(SUCCEEDED(hr));
browser_accessibility_com_->AddRef();
browser_accessibility_com_->SetOwner(this);
// Set the delegate to us
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