Flutter Engine
 
Loading...
Searching...
No Matches
ui::AXPlatformNodeDelegateBase Class Reference

#include <ax_platform_node_delegate_base.h>

Inheritance diagram for ui::AXPlatformNodeDelegateBase:
ui::AXPlatformNodeDelegate flutter::AlertPlatformNodeDelegate flutter::FlutterPlatformNodeDelegate ui::AXFragmentRootWin ui::TestAXNodeWrapper flutter::FlutterPlatformNodeDelegateMac flutter::FlutterPlatformNodeDelegateWindows

Classes

class  ChildIteratorBase
 

Public Member Functions

 AXPlatformNodeDelegateBase ()
 
 ~AXPlatformNodeDelegateBase () override
 
const AXNodeDataGetData () const override
 
const AXTreeDataGetTreeData () const override
 
std::u16string GetInnerText () const override
 
const AXTree::Selection GetUnignoredSelection () const override
 
AXNodePosition::AXPositionInstance CreateTextPositionAt (int offset) const override
 
gfx::NativeViewAccessible GetNSWindow () override
 
gfx::NativeViewAccessible GetNativeViewAccessible () override
 
gfx::NativeViewAccessible GetParent () override
 
gfx::NativeViewAccessible GetLowestPlatformAncestor () const override
 
int GetIndexInParent () override
 
int GetChildCount () const override
 
gfx::NativeViewAccessible ChildAtIndex (int index) override
 
bool HasModalDialog () const override
 
gfx::NativeViewAccessible GetFirstChild () override
 
gfx::NativeViewAccessible GetLastChild () override
 
gfx::NativeViewAccessible GetNextSibling () override
 
gfx::NativeViewAccessible GetPreviousSibling () override
 
bool IsChildOfLeaf () const override
 
bool IsChildOfPlainTextField () const override
 
bool IsLeaf () const override
 
bool IsToplevelBrowserWindow () override
 
gfx::NativeViewAccessible GetClosestPlatformObject () const override
 
std::unique_ptr< AXPlatformNodeDelegate::ChildIteratorChildrenBegin () override
 
std::unique_ptr< AXPlatformNodeDelegate::ChildIteratorChildrenEnd () override
 
std::string GetName () const override
 
std::u16string GetHypertext () const override
 
bool SetHypertextSelection (int start_offset, int end_offset) override
 
TextAttributeMap ComputeTextAttributeMap (const TextAttributeList &default_attributes) const override
 
std::string GetInheritedFontFamilyName () const override
 
gfx::Rect GetBoundsRect (const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const override
 
gfx::Rect GetHypertextRangeBoundsRect (const int start_offset, const int end_offset, const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const override
 
gfx::Rect GetInnerTextRangeBoundsRect (const int start_offset, const int end_offset, const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const override
 
gfx::Rect GetClippedScreenBoundsRect (AXOffscreenResult *offscreen_result=nullptr) const override
 
gfx::Rect GetUnclippedScreenBoundsRect (AXOffscreenResult *offscreen_result=nullptr) const
 
gfx::NativeViewAccessible HitTestSync (int screen_physical_pixel_x, int screen_physical_pixel_y) const override
 
gfx::NativeViewAccessible GetFocus () override
 
bool IsOffscreen () const override
 
bool IsMinimized () const override
 
bool IsText () const override
 
bool IsWebContent () const override
 
bool HasVisibleCaretOrSelection () const override
 
AXPlatformNodeGetFromNodeID (int32_t id) override
 
AXPlatformNodeGetFromTreeIDAndNodeID (const ui::AXTreeID &ax_tree_id, int32_t id) override
 
AXPlatformNodeGetTargetNodeForRelation (ax::mojom::IntAttribute attr) override
 
std::vector< AXPlatformNode * > GetTargetNodesForRelation (ax::mojom::IntListAttribute attr) override
 
std::set< AXPlatformNode * > GetReverseRelations (ax::mojom::IntAttribute attr) override
 
std::set< AXPlatformNode * > GetReverseRelations (ax::mojom::IntListAttribute attr) override
 
std::u16string GetAuthorUniqueId () const override
 
const AXUniqueIdGetUniqueId () const override
 
std::optional< int > FindTextBoundary (ax::mojom::TextBoundary boundary, int offset, ax::mojom::MoveDirection direction, ax::mojom::TextAffinity affinity) const override
 
const std::vector< gfx::NativeViewAccessibleGetUIADescendants () const override
 
std::string GetLanguage () const override
 
bool IsTable () const override
 
std::optional< int > GetTableColCount () const override
 
std::optional< int > GetTableRowCount () const override
 
std::optional< int > GetTableAriaColCount () const override
 
std::optional< int > GetTableAriaRowCount () const override
 
std::optional< int > GetTableCellCount () const override
 
std::optional< bool > GetTableHasColumnOrRowHeaderNode () const override
 
std::vector< int32_t > GetColHeaderNodeIds () const override
 
std::vector< int32_t > GetColHeaderNodeIds (int col_index) const override
 
std::vector< int32_t > GetRowHeaderNodeIds () const override
 
std::vector< int32_t > GetRowHeaderNodeIds (int row_index) const override
 
AXPlatformNodeGetTableCaption () const override
 
bool IsTableRow () const override
 
std::optional< int > GetTableRowRowIndex () const override
 
bool IsTableCellOrHeader () const override
 
std::optional< int > GetTableCellIndex () const override
 
std::optional< int > GetTableCellColIndex () const override
 
std::optional< int > GetTableCellRowIndex () const override
 
std::optional< int > GetTableCellColSpan () const override
 
std::optional< int > GetTableCellRowSpan () const override
 
std::optional< int > GetTableCellAriaColIndex () const override
 
std::optional< int > GetTableCellAriaRowIndex () const override
 
std::optional< int32_t > GetCellId (int row_index, int col_index) const override
 
std::optional< int32_t > CellIndexToId (int cell_index) const override
 
bool IsCellOrHeaderOfARIATable () const override
 
bool IsCellOrHeaderOfARIAGrid () const override
 
bool IsOrderedSetItem () const override
 
bool IsOrderedSet () const override
 
std::optional< int > GetPosInSet () const override
 
std::optional< int > GetSetSize () const override
 
gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent () override
 
bool AccessibilityPerformAction (const AXActionData &data) override
 
std::u16string GetLocalizedStringForImageAnnotationStatus (ax::mojom::ImageAnnotationStatus status) const override
 
std::u16string GetLocalizedRoleDescriptionForUnlabeledImage () const override
 
std::u16string GetLocalizedStringForLandmarkType () const override
 
std::u16string GetLocalizedStringForRoleDescription () const override
 
std::u16string GetStyleNameAttributeAsLocalizedString () const override
 
bool ShouldIgnoreHoveredStateForTesting () override
 
- Public Member Functions inherited from ui::AXPlatformNodeDelegate
virtual ~AXPlatformNodeDelegate ()=default
 
std::string ToString ()
 
std::string SubtreeToString ()
 

Protected Member Functions

std::string SubtreeToStringHelper (size_t level) override
 
std::set< ui::AXPlatformNode * > GetNodesForNodeIds (const std::set< int32_t > &ids)
 
AXPlatformNodeDelegateGetParentDelegate ()
 
- Protected Member Functions inherited from ui::AXPlatformNodeDelegate
 AXPlatformNodeDelegate ()=default
 

Detailed Description

Definition at line 22 of file ax_platform_node_delegate_base.h.

Constructor & Destructor Documentation

◆ AXPlatformNodeDelegateBase()

ui::AXPlatformNodeDelegateBase::AXPlatformNodeDelegateBase ( )
default

◆ ~AXPlatformNodeDelegateBase()

ui::AXPlatformNodeDelegateBase::~AXPlatformNodeDelegateBase ( )
overridedefault

Member Function Documentation

◆ AccessibilityPerformAction()

bool ui::AXPlatformNodeDelegateBase::AccessibilityPerformAction ( const AXActionData data)
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper, and flutter::FlutterPlatformNodeDelegate.

Definition at line 503 of file ax_platform_node_delegate_base.cc.

504 {
505 return false;
506}

Referenced by SetHypertextSelection().

◆ CellIndexToId()

std::optional< int32_t > ui::AXPlatformNodeDelegateBase::CellIndexToId ( int  cell_index) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 474 of file ax_platform_node_delegate_base.cc.

475 {
476 return std::nullopt;
477}

◆ ChildAtIndex()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::ChildAtIndex ( int  index)
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in flutter::FlutterPlatformNodeDelegate, and ui::TestAXNodeWrapper.

Definition at line 121 of file ax_platform_node_delegate_base.cc.

121 {
122 return nullptr;
123}

Referenced by GetFirstChild(), GetInnerText(), and GetLastChild().

◆ ChildrenBegin()

std::unique_ptr< AXPlatformNodeDelegate::ChildIterator > ui::AXPlatformNodeDelegateBase::ChildrenBegin ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 259 of file ax_platform_node_delegate_base.cc.

259 {
260 return std::make_unique<ChildIteratorBase>(this, 0);
261}

◆ ChildrenEnd()

std::unique_ptr< AXPlatformNodeDelegate::ChildIterator > ui::AXPlatformNodeDelegateBase::ChildrenEnd ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 264 of file ax_platform_node_delegate_base.cc.

264 {
265 return std::make_unique<ChildIteratorBase>(this, GetChildCount());
266}

References GetChildCount().

◆ ComputeTextAttributeMap()

TextAttributeMap ui::AXPlatformNodeDelegateBase::ComputeTextAttributeMap ( const TextAttributeList default_attributes) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 535 of file ax_platform_node_delegate_base.cc.

536 {
537 ui::TextAttributeMap attributes_map;
538 attributes_map[0] = default_attributes;
539 return attributes_map;
540}
std::map< int, TextAttributeList > TextAttributeMap

◆ CreateTextPositionAt()

AXNodePosition::AXPositionInstance ui::AXPlatformNodeDelegateBase::CreateTextPositionAt ( int  offset) const
overridevirtual

◆ FindTextBoundary()

std::optional< int > ui::AXPlatformNodeDelegateBase::FindTextBoundary ( ax::mojom::TextBoundary  boundary,
int  offset,
ax::mojom::MoveDirection  direction,
ax::mojom::TextAffinity  affinity 
) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 641 of file ax_platform_node_delegate_base.cc.

645 {
646 return std::nullopt;
647}

◆ GetAuthorUniqueId()

std::u16string ui::AXPlatformNodeDelegateBase::GetAuthorUniqueId ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 632 of file ax_platform_node_delegate_base.cc.

632 {
634}
const AXNodeData & GetData() const override
std::u16string UTF8ToUTF16(std::string src)

References GetData(), ax::mojom::kIdentifier, and base::UTF8ToUTF16().

◆ GetBoundsRect()

gfx::Rect ui::AXPlatformNodeDelegateBase::GetBoundsRect ( const AXCoordinateSystem  coordinate_system,
const AXClippingBehavior  clipping_behavior,
AXOffscreenResult offscreen_result 
) const
overridevirtual

◆ GetCellId()

std::optional< int32_t > ui::AXPlatformNodeDelegateBase::GetCellId ( int  row_index,
int  col_index 
) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 464 of file ax_platform_node_delegate_base.cc.

466 {
467 return std::nullopt;
468}

◆ GetChildCount()

◆ GetClippedScreenBoundsRect()

gfx::Rect ui::AXPlatformNodeDelegateBase::GetClippedScreenBoundsRect ( AXOffscreenResult offscreen_result = nullptr) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 311 of file ax_platform_node_delegate_base.cc.

312 {
314 AXClippingBehavior::kClipped, offscreen_result);
315}
gfx::Rect GetBoundsRect(const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result) const override

References GetBoundsRect(), ui::kClipped, and ui::kScreenDIPs.

◆ GetClosestPlatformObject()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetClosestPlatformObject ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 184 of file ax_platform_node_delegate_base.cc.

185 {
186 return nullptr;
187}

◆ GetColHeaderNodeIds() [1/2]

std::vector< int32_t > ui::AXPlatformNodeDelegateBase::GetColHeaderNodeIds ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 401 of file ax_platform_node_delegate_base.cc.

401 {
402 return {};
403}

◆ GetColHeaderNodeIds() [2/2]

std::vector< int32_t > ui::AXPlatformNodeDelegateBase::GetColHeaderNodeIds ( int  col_index) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 405 of file ax_platform_node_delegate_base.cc.

406 {
407 return {};
408}

◆ GetData()

◆ GetFirstChild()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetFirstChild ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 129 of file ax_platform_node_delegate_base.cc.

129 {
130 if (GetChildCount() > 0)
131 return ChildAtIndex(0);
132 return nullptr;
133}
gfx::NativeViewAccessible ChildAtIndex(int index) override

References ChildAtIndex(), and GetChildCount().

◆ GetFocus()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetFocus ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in flutter::FlutterPlatformNodeDelegate, and ui::TestAXNodeWrapper.

Definition at line 329 of file ax_platform_node_delegate_base.cc.

329 {
330 return nullptr;
331}

◆ GetFromNodeID()

AXPlatformNode * ui::AXPlatformNodeDelegateBase::GetFromNodeID ( int32_t  id)
overridevirtual

◆ GetFromTreeIDAndNodeID()

AXPlatformNode * ui::AXPlatformNodeDelegateBase::GetFromTreeIDAndNodeID ( const ui::AXTreeID ax_tree_id,
int32_t  id 
)
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper, and flutter::FlutterPlatformNodeDelegate.

Definition at line 337 of file ax_platform_node_delegate_base.cc.

339 {
340 return nullptr;
341}

◆ GetHypertext()

std::u16string ui::AXPlatformNodeDelegateBase::GetHypertext ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 272 of file ax_platform_node_delegate_base.cc.

272 {
273 return std::u16string();
274}

◆ GetHypertextRangeBoundsRect()

gfx::Rect ui::AXPlatformNodeDelegateBase::GetHypertextRangeBoundsRect ( const int  start_offset,
const int  end_offset,
const AXCoordinateSystem  coordinate_system,
const AXClippingBehavior  clipping_behavior,
AXOffscreenResult offscreen_result 
) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 293 of file ax_platform_node_delegate_base.cc.

298 {
299 return gfx::Rect();
300}

◆ GetIndexInParent()

int ui::AXPlatformNodeDelegateBase::GetIndexInParent ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 343 of file ax_platform_node_delegate_base.cc.

343 {
345 if (!parent)
346 return -1;
347
348 for (int i = 0; i < parent->GetChildCount(); i++) {
349 AXPlatformNode* child_node =
350 AXPlatformNode::FromNativeViewAccessible(parent->ChildAtIndex(i));
351 if (child_node && child_node->GetDelegate() == this)
352 return i;
353 }
354 return -1;
355}
static AXPlatformNode * FromNativeViewAccessible(gfx::NativeViewAccessible accessible)

References ui::AXPlatformNodeDelegate::ChildAtIndex(), ui::AXPlatformNode::FromNativeViewAccessible(), ui::AXPlatformNodeDelegate::GetChildCount(), ui::AXPlatformNode::GetDelegate(), GetParentDelegate(), and i.

Referenced by GetNextSibling(), and GetPreviousSibling().

◆ GetInheritedFontFamilyName()

std::string ui::AXPlatformNodeDelegateBase::GetInheritedFontFamilyName ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 542 of file ax_platform_node_delegate_base.cc.

542 {
543 // We don't have access to AXNodeData here, so we cannot return
544 // an inherited font family name.
545 return std::string();
546}

◆ GetInnerText()

std::u16string ui::AXPlatformNodeDelegateBase::GetInnerText ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 36 of file ax_platform_node_delegate_base.cc.

36 {
37 // Unlike in web content The "kValue" attribute always takes precedence,
38 // because we assume that users of this base class, such as Views controls,
39 // are carefully crafted by hand, in contrast to HTML pages, where any content
40 // that might be present in the shadow DOM (AKA in the internal accessibility
41 // tree) is actually used by the renderer when assigning the "kValue"
42 // attribute, including any redundant white space.
43 std::u16string value =
45 if (!value.empty())
46 return value;
47
48 // TODO(https://crbug.com/1030703): The check for IsInvisibleOrIgnored()
49 // should not be needed. ChildAtIndex() and GetChildCount() are already
50 // supposed to skip over nodes that are invisible or ignored, but
51 // ViewAXPlatformNodeDelegate does not currently implement this behavior.
52 if (IsLeaf() && !GetData().IsInvisibleOrIgnored())
54
55 std::u16string inner_text;
56 for (int i = 0; i < GetChildCount(); ++i) {
57 // TODO(nektar): Add const to all tree traversal methods and remove
58 // const_cast.
59 const AXPlatformNode* child = AXPlatformNode::FromNativeViewAccessible(
60 const_cast<AXPlatformNodeDelegateBase*>(this)->ChildAtIndex(i));
61 if (!child || !child->GetDelegate())
62 continue;
63 inner_text += child->GetDelegate()->GetInnerText();
64 }
65 return inner_text;
66}
int32_t value
bool GetString16Attribute(ax::mojom::StringAttribute attribute, std::u16string *value) const

References ChildAtIndex(), ui::AXPlatformNode::FromNativeViewAccessible(), GetChildCount(), GetData(), ui::AXPlatformNode::GetDelegate(), ui::AXPlatformNodeDelegate::GetInnerText(), ui::AXNodeData::GetString16Attribute(), i, IsLeaf(), ax::mojom::kName, ax::mojom::kValue, and value.

◆ GetInnerTextRangeBoundsRect()

gfx::Rect ui::AXPlatformNodeDelegateBase::GetInnerTextRangeBoundsRect ( const int  start_offset,
const int  end_offset,
const AXCoordinateSystem  coordinate_system,
const AXClippingBehavior  clipping_behavior,
AXOffscreenResult offscreen_result = nullptr 
) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 302 of file ax_platform_node_delegate_base.cc.

307 {
308 return gfx::Rect();
309}

◆ GetLanguage()

std::string ui::AXPlatformNodeDelegateBase::GetLanguage ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 654 of file ax_platform_node_delegate_base.cc.

654 {
655 return std::string();
656}

◆ GetLastChild()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetLastChild ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 135 of file ax_platform_node_delegate_base.cc.

135 {
136 if (GetChildCount() > 0)
137 return ChildAtIndex(GetChildCount() - 1);
138 return nullptr;
139}

References ChildAtIndex(), and GetChildCount().

◆ GetLocalizedRoleDescriptionForUnlabeledImage()

std::u16string ui::AXPlatformNodeDelegateBase::GetLocalizedRoleDescriptionForUnlabeledImage ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 515 of file ax_platform_node_delegate_base.cc.

516 {
517 return std::u16string();
518}

◆ GetLocalizedStringForImageAnnotationStatus()

std::u16string ui::AXPlatformNodeDelegateBase::GetLocalizedStringForImageAnnotationStatus ( ax::mojom::ImageAnnotationStatus  status) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 509 of file ax_platform_node_delegate_base.cc.

510 {
511 return std::u16string();
512}

◆ GetLocalizedStringForLandmarkType()

std::u16string ui::AXPlatformNodeDelegateBase::GetLocalizedStringForLandmarkType ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 520 of file ax_platform_node_delegate_base.cc.

521 {
522 return std::u16string();
523}

◆ GetLocalizedStringForRoleDescription()

std::u16string ui::AXPlatformNodeDelegateBase::GetLocalizedStringForRoleDescription ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 526 of file ax_platform_node_delegate_base.cc.

526 {
527 return std::u16string();
528}

◆ GetLowestPlatformAncestor()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetLowestPlatformAncestor ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in flutter::FlutterPlatformNodeDelegate.

Definition at line 92 of file ax_platform_node_delegate_base.cc.

92 {
93 AXPlatformNodeDelegateBase* current_delegate =
94 const_cast<AXPlatformNodeDelegateBase*>(this);
95 AXPlatformNodeDelegateBase* lowest_unignored_delegate = current_delegate;
96
97 // `highest_leaf_delegate` could be nullptr.
98 AXPlatformNodeDelegateBase* highest_leaf_delegate = lowest_unignored_delegate;
99 // For the purposes of this method, a leaf node does not include leaves in the
100 // internal accessibility tree, only in the platform exposed tree.
101 for (AXPlatformNodeDelegateBase* ancestor_delegate =
102 lowest_unignored_delegate;
103 ancestor_delegate;
104 ancestor_delegate = static_cast<AXPlatformNodeDelegateBase*>(
105 ancestor_delegate->GetParentDelegate())) {
106 if (ancestor_delegate->IsLeaf())
107 highest_leaf_delegate = ancestor_delegate;
108 }
109 if (highest_leaf_delegate)
110 return highest_leaf_delegate->GetNativeViewAccessible();
111
112 if (lowest_unignored_delegate)
113 return lowest_unignored_delegate->GetNativeViewAccessible();
114 return current_delegate->GetNativeViewAccessible();
115}

References GetNativeViewAccessible().

◆ GetName()

std::string ui::AXPlatformNodeDelegateBase::GetName ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 268 of file ax_platform_node_delegate_base.cc.

268 {
270}
const std::string & GetStringAttribute(ax::mojom::StringAttribute attribute) const

References GetData(), ui::AXNodeData::GetStringAttribute(), and ax::mojom::kName.

◆ GetNativeViewAccessible()

◆ GetNextSibling()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetNextSibling ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 141 of file ax_platform_node_delegate_base.cc.

141 {
143 if (parent && GetIndexInParent() >= 0) {
144 int next_index = GetIndexInParent() + 1;
145 if (next_index >= 0 && next_index < parent->GetChildCount())
146 return parent->ChildAtIndex(next_index);
147 }
148 return nullptr;
149}

References ui::AXPlatformNodeDelegate::ChildAtIndex(), GetChildCount(), GetIndexInParent(), and GetParentDelegate().

◆ GetNodesForNodeIds()

std::set< AXPlatformNode * > ui::AXPlatformNodeDelegateBase::GetNodesForNodeIds ( const std::set< int32_t > &  ids)
protected

Definition at line 583 of file ax_platform_node_delegate_base.cc.

584 {
585 std::set<AXPlatformNode*> nodes;
586 for (int32_t node_id : ids) {
587 if (AXPlatformNode* node = GetFromNodeID(node_id)) {
588 nodes.insert(node);
589 }
590 }
591 return nodes;
592}
AXPlatformNode * GetFromNodeID(int32_t id) override

References GetFromNodeID().

Referenced by ui::TestAXNodeWrapper::GetReverseRelations(), and ui::TestAXNodeWrapper::GetReverseRelations().

◆ GetNSWindow()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetNSWindow ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in flutter::FlutterPlatformNodeDelegateMac.

Definition at line 78 of file ax_platform_node_delegate_base.cc.

78 {
79 return nullptr;
80}

◆ GetParent()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetParent ( )
overridevirtual

◆ GetParentDelegate()

AXPlatformNodeDelegate * ui::AXPlatformNodeDelegateBase::GetParentDelegate ( )
protected

Definition at line 658 of file ax_platform_node_delegate_base.cc.

658 {
659 AXPlatformNode* parent_node =
661 if (parent_node)
662 return parent_node->GetDelegate();
663
664 return nullptr;
665}
gfx::NativeViewAccessible GetParent() override

References ui::AXPlatformNode::FromNativeViewAccessible(), ui::AXPlatformNode::GetDelegate(), and GetParent().

Referenced by GetIndexInParent(), GetNextSibling(), GetPreviousSibling(), and IsChildOfLeaf().

◆ GetPosInSet()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetPosInSet ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 495 of file ax_platform_node_delegate_base.cc.

495 {
496 return std::nullopt;
497}

◆ GetPreviousSibling()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::GetPreviousSibling ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 151 of file ax_platform_node_delegate_base.cc.

151 {
153 if (parent && GetIndexInParent() >= 0) {
154 int next_index = GetIndexInParent() - 1;
155 if (next_index >= 0 && next_index < parent->GetChildCount())
156 return parent->ChildAtIndex(next_index);
157 }
158 return nullptr;
159}

References ui::AXPlatformNodeDelegate::ChildAtIndex(), GetChildCount(), GetIndexInParent(), and GetParentDelegate().

◆ GetReverseRelations() [1/2]

std::set< AXPlatformNode * > ui::AXPlatformNodeDelegateBase::GetReverseRelations ( ax::mojom::IntAttribute  attr)
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 617 of file ax_platform_node_delegate_base.cc.

618 {
619 // TODO(accessibility) Implement these if views ever use relations more
620 // widely. The use so far has been for the Omnibox to the suggestion popup.
621 // If this is ever implemented, then the "popup for" to "controlled by"
622 // mapping in AXPlatformRelationWin can be removed, as it would be
623 // redundant with setting the controls relationship.
624 return std::set<AXPlatformNode*>();
625}

◆ GetReverseRelations() [2/2]

std::set< AXPlatformNode * > ui::AXPlatformNodeDelegateBase::GetReverseRelations ( ax::mojom::IntListAttribute  attr)
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 627 of file ax_platform_node_delegate_base.cc.

628 {
629 return std::set<AXPlatformNode*>();
630}

◆ GetRowHeaderNodeIds() [1/2]

std::vector< int32_t > ui::AXPlatformNodeDelegateBase::GetRowHeaderNodeIds ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 410 of file ax_platform_node_delegate_base.cc.

410 {
411 return {};
412}

◆ GetRowHeaderNodeIds() [2/2]

std::vector< int32_t > ui::AXPlatformNodeDelegateBase::GetRowHeaderNodeIds ( int  row_index) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 414 of file ax_platform_node_delegate_base.cc.

415 {
416 return {};
417}

◆ GetSetSize()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetSetSize ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 499 of file ax_platform_node_delegate_base.cc.

499 {
500 return std::nullopt;
501}

◆ GetStyleNameAttributeAsLocalizedString()

std::u16string ui::AXPlatformNodeDelegateBase::GetStyleNameAttributeAsLocalizedString ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 531 of file ax_platform_node_delegate_base.cc.

531 {
532 return std::u16string();
533}

◆ GetTableAriaColCount()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableAriaColCount ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 374 of file ax_platform_node_delegate_base.cc.

374 {
375 int aria_column_count;
377 &aria_column_count)) {
378 return std::nullopt;
379 }
380 return aria_column_count;
381}

References GetData(), and ax::mojom::kAriaColumnCount.

◆ GetTableAriaRowCount()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableAriaRowCount ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 383 of file ax_platform_node_delegate_base.cc.

383 {
384 int aria_row_count;
385 if (!GetData().GetIntAttribute(ax::mojom::IntAttribute::kAriaRowCount,
386 &aria_row_count)) {
387 return std::nullopt;
388 }
389 return aria_row_count;
390}

References GetData(), and ax::mojom::kAriaRowCount.

◆ GetTableCaption()

AXPlatformNode * ui::AXPlatformNodeDelegateBase::GetTableCaption ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 419 of file ax_platform_node_delegate_base.cc.

419 {
420 return nullptr;
421}

◆ GetTableCellAriaColIndex()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableCellAriaColIndex ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 453 of file ax_platform_node_delegate_base.cc.

454 {
455 return GetData().GetIntAttribute(
457}
int GetIntAttribute(ax::mojom::IntAttribute attribute) const

References GetData(), ui::AXNodeData::GetIntAttribute(), and ax::mojom::kAriaCellColumnIndex.

◆ GetTableCellAriaRowIndex()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableCellAriaRowIndex ( ) const
overridevirtual

◆ GetTableCellColIndex()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableCellColIndex ( ) const
overridevirtual

◆ GetTableCellColSpan()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableCellColSpan ( ) const
overridevirtual

◆ GetTableCellCount()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableCellCount ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 392 of file ax_platform_node_delegate_base.cc.

392 {
393 return std::nullopt;
394}

◆ GetTableCellIndex()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableCellIndex ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 470 of file ax_platform_node_delegate_base.cc.

470 {
471 return std::nullopt;
472}

◆ GetTableCellRowIndex()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableCellRowIndex ( ) const
overridevirtual

◆ GetTableCellRowSpan()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableCellRowSpan ( ) const
overridevirtual

◆ GetTableColCount()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableColCount ( ) const
overridevirtual

◆ GetTableHasColumnOrRowHeaderNode()

std::optional< bool > ui::AXPlatformNodeDelegateBase::GetTableHasColumnOrRowHeaderNode ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 397 of file ax_platform_node_delegate_base.cc.

397 {
398 return std::nullopt;
399}

◆ GetTableRowCount()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableRowCount ( ) const
overridevirtual

◆ GetTableRowRowIndex()

std::optional< int > ui::AXPlatformNodeDelegateBase::GetTableRowRowIndex ( ) const
overridevirtual

◆ GetTargetForNativeAccessibilityEvent()

gfx::AcceleratedWidget ui::AXPlatformNodeDelegateBase::GetTargetForNativeAccessibilityEvent ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in flutter::FlutterPlatformNodeDelegateWindows, and ui::TestAXNodeWrapper.

Definition at line 358 of file ax_platform_node_delegate_base.cc.

358 {
359 return gfx::kNullAcceleratedWidget;
360}

◆ GetTargetNodeForRelation()

AXPlatformNode * ui::AXPlatformNodeDelegateBase::GetTargetNodeForRelation ( ax::mojom::IntAttribute  attr)
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 572 of file ax_platform_node_delegate_base.cc.

573 {
575
576 int target_id;
577 if (!GetData().GetIntAttribute(attr, &target_id))
578 return nullptr;
579
580 return GetFromNodeID(target_id);
581}
bool IsNodeIdIntAttribute(ax::mojom::IntAttribute attr)
#define BASE_DCHECK(condition)
Definition logging.h:63

References BASE_DCHECK, GetData(), GetFromNodeID(), and ui::IsNodeIdIntAttribute().

◆ GetTargetNodesForRelation()

std::vector< AXPlatformNode * > ui::AXPlatformNodeDelegateBase::GetTargetNodesForRelation ( ax::mojom::IntListAttribute  attr)
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 595 of file ax_platform_node_delegate_base.cc.

596 {
598 std::vector<int32_t> target_ids;
599 if (!GetData().GetIntListAttribute(attr, &target_ids))
600 return std::vector<AXPlatformNode*>();
601
602 // If we use std::set to eliminate duplicates, the resulting set will be
603 // sorted by the id and we will lose the original order which may be of
604 // interest to ATs. The number of ids should be small.
605
606 std::vector<ui::AXPlatformNode*> nodes;
607 for (int32_t target_id : target_ids) {
608 if (ui::AXPlatformNode* node = GetFromNodeID(target_id)) {
609 if (std::find(nodes.begin(), nodes.end(), node) == nodes.end())
610 nodes.push_back(node);
611 }
612 }
613
614 return nodes;
615}
bool IsNodeIdIntListAttribute(ax::mojom::IntListAttribute attr)

References BASE_DCHECK, GetData(), GetFromNodeID(), and ui::IsNodeIdIntListAttribute().

◆ GetTreeData()

const AXTreeData & ui::AXPlatformNodeDelegateBase::GetTreeData ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 31 of file ax_platform_node_delegate_base.cc.

31 {
32 static base::NoDestructor<AXTreeData> empty_data;
33 return *empty_data;
34}

◆ GetUIADescendants()

const std::vector< gfx::NativeViewAccessible > ui::AXPlatformNodeDelegateBase::GetUIADescendants ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 650 of file ax_platform_node_delegate_base.cc.

650 {
651 return {};
652}

◆ GetUnclippedScreenBoundsRect()

gfx::Rect ui::AXPlatformNodeDelegateBase::GetUnclippedScreenBoundsRect ( AXOffscreenResult offscreen_result = nullptr) const

◆ GetUnignoredSelection()

const AXTree::Selection ui::AXPlatformNodeDelegateBase::GetUnignoredSelection ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in flutter::FlutterPlatformNodeDelegate, and ui::TestAXNodeWrapper.

Definition at line 68 of file ax_platform_node_delegate_base.cc.

69 {
70 return AXTree::Selection{false, -1, -1, ax::mojom::TextAffinity::kDownstream};
71}

References ax::mojom::kDownstream.

◆ GetUniqueId()

const AXUniqueId & ui::AXPlatformNodeDelegateBase::GetUniqueId ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in flutter::FlutterPlatformNodeDelegate, and ui::TestAXNodeWrapper.

Definition at line 636 of file ax_platform_node_delegate_base.cc.

636 {
637 static base::NoDestructor<AXUniqueId> dummy_unique_id;
638 return *dummy_unique_id;
639}

◆ HasModalDialog()

bool ui::AXPlatformNodeDelegateBase::HasModalDialog ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 125 of file ax_platform_node_delegate_base.cc.

125 {
126 return false;
127}

◆ HasVisibleCaretOrSelection()

bool ui::AXPlatformNodeDelegateBase::HasVisibleCaretOrSelection ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 568 of file ax_platform_node_delegate_base.cc.

568 {
569 return false;
570}

◆ HitTestSync()

gfx::NativeViewAccessible ui::AXPlatformNodeDelegateBase::HitTestSync ( int  screen_physical_pixel_x,
int  screen_physical_pixel_y 
) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in flutter::FlutterPlatformNodeDelegateWindows, and ui::TestAXNodeWrapper.

Definition at line 323 of file ax_platform_node_delegate_base.cc.

325 {
326 return nullptr;
327}

◆ IsCellOrHeaderOfARIAGrid()

bool ui::AXPlatformNodeDelegateBase::IsCellOrHeaderOfARIAGrid ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 483 of file ax_platform_node_delegate_base.cc.

483 {
484 return false;
485}

◆ IsCellOrHeaderOfARIATable()

bool ui::AXPlatformNodeDelegateBase::IsCellOrHeaderOfARIATable ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 479 of file ax_platform_node_delegate_base.cc.

479 {
480 return false;
481}

◆ IsChildOfLeaf()

bool ui::AXPlatformNodeDelegateBase::IsChildOfLeaf ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 161 of file ax_platform_node_delegate_base.cc.

161 {
162 // TODO(nektar): Make all tree traversal methods const and remove const_cast.
163 const AXPlatformNodeDelegate* parent =
164 const_cast<AXPlatformNodeDelegateBase*>(this)->GetParentDelegate();
165 if (!parent)
166 return false;
167 if (parent->IsLeaf())
168 return true;
169 return parent->IsChildOfLeaf();
170}
virtual bool IsChildOfLeaf() const =0

References GetParentDelegate(), ui::AXPlatformNodeDelegate::IsChildOfLeaf(), and ui::AXPlatformNodeDelegate::IsLeaf().

◆ IsChildOfPlainTextField()

bool ui::AXPlatformNodeDelegateBase::IsChildOfPlainTextField ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 180 of file ax_platform_node_delegate_base.cc.

180 {
181 return false;
182}

◆ IsLeaf()

bool ui::AXPlatformNodeDelegateBase::IsLeaf ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 172 of file ax_platform_node_delegate_base.cc.

172 {
173 return !GetChildCount();
174}

References GetChildCount().

Referenced by GetInnerText().

◆ IsMinimized()

bool ui::AXPlatformNodeDelegateBase::IsMinimized ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 556 of file ax_platform_node_delegate_base.cc.

556 {
557 return false;
558}

◆ IsOffscreen()

bool ui::AXPlatformNodeDelegateBase::IsOffscreen ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 552 of file ax_platform_node_delegate_base.cc.

552 {
553 return false;
554}

◆ IsOrderedSet()

bool ui::AXPlatformNodeDelegateBase::IsOrderedSet ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 491 of file ax_platform_node_delegate_base.cc.

491 {
492 return false;
493}

◆ IsOrderedSetItem()

bool ui::AXPlatformNodeDelegateBase::IsOrderedSetItem ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 487 of file ax_platform_node_delegate_base.cc.

487 {
488 return false;
489}

◆ IsTable()

bool ui::AXPlatformNodeDelegateBase::IsTable ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 362 of file ax_platform_node_delegate_base.cc.

362 {
363 return ui::IsTableLike(GetData().role);
364}
bool IsTableLike(const ax::mojom::Role role)

References GetData(), and ui::IsTableLike().

◆ IsTableCellOrHeader()

bool ui::AXPlatformNodeDelegateBase::IsTableCellOrHeader ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 431 of file ax_platform_node_delegate_base.cc.

431 {
432 return ui::IsCellOrTableHeader(GetData().role);
433}
bool IsCellOrTableHeader(const ax::mojom::Role role)

References GetData(), and ui::IsCellOrTableHeader().

◆ IsTableRow()

bool ui::AXPlatformNodeDelegateBase::IsTableRow ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 423 of file ax_platform_node_delegate_base.cc.

423 {
424 return ui::IsTableRow(GetData().role);
425}
bool IsTableRow(ax::mojom::Role role)

References GetData(), and ui::IsTableRow().

◆ IsText()

bool ui::AXPlatformNodeDelegateBase::IsText ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 560 of file ax_platform_node_delegate_base.cc.

560 {
561 return ui::IsText(GetData().role);
562}
bool IsText(ax::mojom::Role role)

References GetData(), and ui::IsText().

◆ IsToplevelBrowserWindow()

bool ui::AXPlatformNodeDelegateBase::IsToplevelBrowserWindow ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 176 of file ax_platform_node_delegate_base.cc.

176 {
177 return false;
178}

◆ IsWebContent()

bool ui::AXPlatformNodeDelegateBase::IsWebContent ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 564 of file ax_platform_node_delegate_base.cc.

564 {
565 return false;
566}

◆ SetHypertextSelection()

bool ui::AXPlatformNodeDelegateBase::SetHypertextSelection ( int  start_offset,
int  end_offset 
)
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 276 of file ax_platform_node_delegate_base.cc.

277 {
278 AXActionData action_data;
279 action_data.action = ax::mojom::Action::kSetSelection;
280 action_data.anchor_node_id = action_data.focus_node_id = GetData().id;
281 action_data.anchor_offset = start_offset;
282 action_data.focus_offset = end_offset;
283 return AccessibilityPerformAction(action_data);
284}
bool AccessibilityPerformAction(const AXActionData &data) override

References AccessibilityPerformAction(), ui::AXActionData::action, ui::AXActionData::anchor_node_id, ui::AXActionData::anchor_offset, ui::AXActionData::focus_node_id, ui::AXActionData::focus_offset, GetData(), ui::AXNodeData::id, and ax::mojom::kSetSelection.

◆ ShouldIgnoreHoveredStateForTesting()

bool ui::AXPlatformNodeDelegateBase::ShouldIgnoreHoveredStateForTesting ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 548 of file ax_platform_node_delegate_base.cc.

548 {
549 return true;
550}

◆ SubtreeToStringHelper()

std::string ui::AXPlatformNodeDelegateBase::SubtreeToStringHelper ( size_t  level)
overrideprotectedvirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 667 of file ax_platform_node_delegate_base.cc.

667 {
668 std::string result(level * 2, '+');
669 result += ToString();
670 result += '\n';
671
672 // We can't use ChildrenBegin() and ChildrenEnd() here, because they both
673 // return an std::unique_ptr<ChildIterator> which is an abstract class.
674 //
675 // TODO(accessibility): Refactor ChildIterator into a separate base
676 // (non-abstract) class.
677 auto iter_start = ChildIteratorBase(this, 0);
678 auto iter_end = ChildIteratorBase(this, GetChildCount());
679 for (auto iter = iter_start; iter != iter_end; ++iter) {
681 static_cast<AXPlatformNodeDelegateBase&>(*iter);
682 result += child.SubtreeToStringHelper(level + 1);
683 }
684
685 return result;
686}

References GetChildCount(), SubtreeToStringHelper(), and ui::AXPlatformNodeDelegate::ToString().

Referenced by SubtreeToStringHelper().


The documentation for this class was generated from the following files: