Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Protected Member Functions | List of all members
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< intFindTextBoundary (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< intGetTableColCount () const override
 
std::optional< intGetTableRowCount () const override
 
std::optional< intGetTableAriaColCount () const override
 
std::optional< intGetTableAriaRowCount () const override
 
std::optional< intGetTableCellCount () 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< intGetTableRowRowIndex () const override
 
bool IsTableCellOrHeader () const override
 
std::optional< intGetTableCellIndex () const override
 
std::optional< intGetTableCellColIndex () const override
 
std::optional< intGetTableCellRowIndex () const override
 
std::optional< intGetTableCellColSpan () const override
 
std::optional< intGetTableCellRowSpan () const override
 
std::optional< intGetTableCellAriaColIndex () const override
 
std::optional< intGetTableCellAriaRowIndex () 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< intGetPosInSet () const override
 
std::optional< intGetSetSize () 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
 
virtual const AXNodeDataGetData () const =0
 
virtual const AXTreeDataGetTreeData () const =0
 
virtual std::u16string GetInnerText () const =0
 
virtual const AXTree::Selection GetUnignoredSelection () const =0
 
virtual AXNodePosition::AXPositionInstance CreateTextPositionAt (int offset) const =0
 
virtual gfx::NativeViewAccessible GetNSWindow ()=0
 
virtual gfx::NativeViewAccessible GetNativeViewAccessible ()=0
 
virtual gfx::NativeViewAccessible GetParent ()=0
 
virtual int GetIndexInParent ()=0
 
virtual int GetChildCount () const =0
 
virtual gfx::NativeViewAccessible ChildAtIndex (int index)=0
 
virtual bool HasModalDialog () const =0
 
virtual gfx::NativeViewAccessible GetFirstChild ()=0
 
virtual gfx::NativeViewAccessible GetLastChild ()=0
 
virtual gfx::NativeViewAccessible GetNextSibling ()=0
 
virtual gfx::NativeViewAccessible GetPreviousSibling ()=0
 
virtual bool IsChildOfLeaf () const =0
 
virtual bool IsChildOfPlainTextField () const =0
 
virtual bool IsLeaf () const =0
 
virtual bool IsToplevelBrowserWindow ()=0
 
virtual gfx::NativeViewAccessible GetClosestPlatformObject () const =0
 
virtual std::unique_ptr< AXPlatformNodeDelegate::ChildIteratorChildrenBegin ()=0
 
virtual std::unique_ptr< AXPlatformNodeDelegate::ChildIteratorChildrenEnd ()=0
 
virtual std::string GetName () const =0
 
virtual std::u16string GetHypertext () const =0
 
virtual bool SetHypertextSelection (int start_offset, int end_offset)=0
 
virtual TextAttributeMap ComputeTextAttributeMap (const TextAttributeList &default_attributes) const =0
 
virtual std::string GetInheritedFontFamilyName () const =0
 
virtual gfx::Rect GetBoundsRect (const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result=nullptr) const =0
 
virtual gfx::Rect GetClippedScreenBoundsRect (AXOffscreenResult *offscreen_result=nullptr) const =0
 
virtual gfx::Rect GetHypertextRangeBoundsRect (const int start_offset, const int end_offset, const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result=nullptr) const =0
 
virtual gfx::Rect GetInnerTextRangeBoundsRect (const int start_offset, const int end_offset, const AXCoordinateSystem coordinate_system, const AXClippingBehavior clipping_behavior, AXOffscreenResult *offscreen_result=nullptr) const =0
 
virtual gfx::NativeViewAccessible HitTestSync (int screen_physical_pixel_x, int screen_physical_pixel_y) const =0
 
virtual gfx::NativeViewAccessible GetFocus ()=0
 
virtual bool IsOffscreen () const =0
 
virtual bool IsMinimized () const =0
 
virtual bool IsText () const =0
 
virtual bool IsWebContent () const =0
 
virtual bool HasVisibleCaretOrSelection () const =0
 
virtual AXPlatformNodeGetFromNodeID (int32_t id)=0
 
virtual AXPlatformNodeGetFromTreeIDAndNodeID (const ui::AXTreeID &ax_tree_id, int32_t id)=0
 
virtual AXPlatformNodeGetTargetNodeForRelation (ax::mojom::IntAttribute attr)=0
 
virtual std::vector< AXPlatformNode * > GetTargetNodesForRelation (ax::mojom::IntListAttribute attr)=0
 
virtual std::set< AXPlatformNode * > GetReverseRelations (ax::mojom::IntAttribute attr)=0
 
virtual std::set< AXPlatformNode * > GetReverseRelations (ax::mojom::IntListAttribute attr)=0
 
virtual std::u16string GetAuthorUniqueId () const =0
 
virtual const AXUniqueIdGetUniqueId () const =0
 
virtual std::optional< intFindTextBoundary (ax::mojom::TextBoundary boundary, int offset, ax::mojom::MoveDirection direction, ax::mojom::TextAffinity affinity) const =0
 
virtual const std::vector< gfx::NativeViewAccessibleGetUIADescendants () const =0
 
virtual std::string GetLanguage () const =0
 
virtual bool IsTable () const =0
 
virtual std::optional< intGetTableColCount () const =0
 
virtual std::optional< intGetTableRowCount () const =0
 
virtual std::optional< intGetTableAriaColCount () const =0
 
virtual std::optional< intGetTableAriaRowCount () const =0
 
virtual std::optional< intGetTableCellCount () const =0
 
virtual std::optional< bool > GetTableHasColumnOrRowHeaderNode () const =0
 
virtual std::vector< int32_t > GetColHeaderNodeIds () const =0
 
virtual std::vector< int32_t > GetColHeaderNodeIds (int col_index) const =0
 
virtual std::vector< int32_t > GetRowHeaderNodeIds () const =0
 
virtual std::vector< int32_t > GetRowHeaderNodeIds (int row_index) const =0
 
virtual AXPlatformNodeGetTableCaption () const =0
 
virtual bool IsTableRow () const =0
 
virtual std::optional< intGetTableRowRowIndex () const =0
 
virtual bool IsTableCellOrHeader () const =0
 
virtual std::optional< intGetTableCellIndex () const =0
 
virtual std::optional< intGetTableCellColIndex () const =0
 
virtual std::optional< intGetTableCellRowIndex () const =0
 
virtual std::optional< intGetTableCellColSpan () const =0
 
virtual std::optional< intGetTableCellRowSpan () const =0
 
virtual std::optional< intGetTableCellAriaColIndex () const =0
 
virtual std::optional< intGetTableCellAriaRowIndex () const =0
 
virtual std::optional< int32_t > GetCellId (int row_index, int col_index) const =0
 
virtual std::optional< int32_t > CellIndexToId (int cell_index) const =0
 
virtual bool IsCellOrHeaderOfARIATable () const =0
 
virtual bool IsCellOrHeaderOfARIAGrid () const =0
 
virtual bool IsOrderedSetItem () const =0
 
virtual bool IsOrderedSet () const =0
 
virtual std::optional< intGetPosInSet () const =0
 
virtual std::optional< intGetSetSize () const =0
 
virtual gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent ()=0
 
virtual bool AccessibilityPerformAction (const AXActionData &data)=0
 
virtual std::u16string GetLocalizedRoleDescriptionForUnlabeledImage () const =0
 
virtual std::u16string GetLocalizedStringForImageAnnotationStatus (ax::mojom::ImageAnnotationStatus status) const =0
 
virtual std::u16string GetLocalizedStringForLandmarkType () const =0
 
virtual std::u16string GetLocalizedStringForRoleDescription () const =0
 
virtual std::u16string GetStyleNameAttributeAsLocalizedString () const =0
 
virtual bool ShouldIgnoreHoveredStateForTesting ()=0
 
virtual gfx::NativeViewAccessible GetLowestPlatformAncestor () const =0
 
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
 
virtual std::string SubtreeToStringHelper (size_t level)=0
 

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.

Definition at line 502 of file ax_platform_node_delegate_base.cc.

503 {
504 return false;
505}

◆ CellIndexToId()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 473 of file ax_platform_node_delegate_base.cc.

474 {
475 return std::nullopt;
476}

◆ ChildAtIndex()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 120 of file ax_platform_node_delegate_base.cc.

120 {
121 return nullptr;
122}

◆ ChildrenBegin()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 258 of file ax_platform_node_delegate_base.cc.

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

◆ ChildrenEnd()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 263 of file ax_platform_node_delegate_base.cc.

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

◆ ComputeTextAttributeMap()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 534 of file ax_platform_node_delegate_base.cc.

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

◆ CreateTextPositionAt()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 73 of file ax_platform_node_delegate_base.cc.

73 {
75}
static AXPositionInstance CreateNullPosition()
Definition: ax_position.h:183

◆ 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 640 of file ax_platform_node_delegate_base.cc.

644 {
645 return std::nullopt;
646}

◆ GetAuthorUniqueId()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 631 of file ax_platform_node_delegate_base.cc.

631 {
632 return std::u16string();
633}

◆ GetBoundsRect()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 285 of file ax_platform_node_delegate_base.cc.

288 {
289 return gfx::Rect();
290}
TRect< Scalar > Rect
Definition: rect.h:769

◆ 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 463 of file ax_platform_node_delegate_base.cc.

465 {
466 return std::nullopt;
467}

◆ GetChildCount()

int ui::AXPlatformNodeDelegateBase::GetChildCount ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 116 of file ax_platform_node_delegate_base.cc.

116 {
117 return 0;
118}

◆ GetClippedScreenBoundsRect()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 310 of file ax_platform_node_delegate_base.cc.

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

◆ GetClosestPlatformObject()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 183 of file ax_platform_node_delegate_base.cc.

184 {
185 return nullptr;
186}

◆ GetColHeaderNodeIds() [1/2]

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 400 of file ax_platform_node_delegate_base.cc.

400 {
401 return {};
402}

◆ 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 404 of file ax_platform_node_delegate_base.cc.

405 {
406 return {};
407}

◆ GetData()

const AXNodeData & ui::AXPlatformNodeDelegateBase::GetData ( ) const
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 25 of file ax_platform_node_delegate_base.cc.

25 {
26 static base::NoDestructor<AXNodeData> empty_data;
27 return *empty_data;
28}

◆ GetFirstChild()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 128 of file ax_platform_node_delegate_base.cc.

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

◆ GetFocus()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 328 of file ax_platform_node_delegate_base.cc.

328 {
329 return nullptr;
330}

◆ GetFromNodeID()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 332 of file ax_platform_node_delegate_base.cc.

332 {
333 return nullptr;
334}

◆ GetFromTreeIDAndNodeID()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 336 of file ax_platform_node_delegate_base.cc.

338 {
339 return nullptr;
340}

◆ GetHypertext()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 271 of file ax_platform_node_delegate_base.cc.

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

◆ 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 292 of file ax_platform_node_delegate_base.cc.

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

◆ GetIndexInParent()

int ui::AXPlatformNodeDelegateBase::GetIndexInParent ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 342 of file ax_platform_node_delegate_base.cc.

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

◆ GetInheritedFontFamilyName()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 541 of file ax_platform_node_delegate_base.cc.

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

◆ GetInnerText()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 35 of file ax_platform_node_delegate_base.cc.

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

◆ 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 301 of file ax_platform_node_delegate_base.cc.

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

◆ GetLanguage()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 653 of file ax_platform_node_delegate_base.cc.

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

◆ GetLastChild()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 134 of file ax_platform_node_delegate_base.cc.

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

◆ GetLocalizedRoleDescriptionForUnlabeledImage()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 514 of file ax_platform_node_delegate_base.cc.

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

◆ GetLocalizedStringForImageAnnotationStatus()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 508 of file ax_platform_node_delegate_base.cc.

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

◆ GetLocalizedStringForLandmarkType()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 519 of file ax_platform_node_delegate_base.cc.

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

◆ GetLocalizedStringForRoleDescription()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 525 of file ax_platform_node_delegate_base.cc.

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

◆ GetLowestPlatformAncestor()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 91 of file ax_platform_node_delegate_base.cc.

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

◆ GetName()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 267 of file ax_platform_node_delegate_base.cc.

267 {
269}
const std::string & GetStringAttribute(ax::mojom::StringAttribute attribute) const

◆ GetNativeViewAccessible()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 82 of file ax_platform_node_delegate_base.cc.

82 {
83 return nullptr;
84}

◆ GetNextSibling()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 140 of file ax_platform_node_delegate_base.cc.

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

◆ GetNodesForNodeIds()

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

Definition at line 582 of file ax_platform_node_delegate_base.cc.

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

◆ GetNSWindow()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 77 of file ax_platform_node_delegate_base.cc.

77 {
78 return nullptr;
79}

◆ GetParent()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 86 of file ax_platform_node_delegate_base.cc.

86 {
87 return nullptr;
88}

◆ GetParentDelegate()

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

Definition at line 657 of file ax_platform_node_delegate_base.cc.

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

◆ GetPosInSet()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 494 of file ax_platform_node_delegate_base.cc.

494 {
495 return std::nullopt;
496}

◆ GetPreviousSibling()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 150 of file ax_platform_node_delegate_base.cc.

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

◆ GetReverseRelations() [1/2]

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 616 of file ax_platform_node_delegate_base.cc.

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

◆ GetReverseRelations() [2/2]

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 626 of file ax_platform_node_delegate_base.cc.

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

◆ GetRowHeaderNodeIds() [1/2]

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 409 of file ax_platform_node_delegate_base.cc.

409 {
410 return {};
411}

◆ 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 413 of file ax_platform_node_delegate_base.cc.

414 {
415 return {};
416}

◆ GetSetSize()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 498 of file ax_platform_node_delegate_base.cc.

498 {
499 return std::nullopt;
500}

◆ GetStyleNameAttributeAsLocalizedString()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 530 of file ax_platform_node_delegate_base.cc.

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

◆ GetTableAriaColCount()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 373 of file ax_platform_node_delegate_base.cc.

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

◆ GetTableAriaRowCount()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 382 of file ax_platform_node_delegate_base.cc.

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

◆ GetTableCaption()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 418 of file ax_platform_node_delegate_base.cc.

418 {
419 return nullptr;
420}

◆ GetTableCellAriaColIndex()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 452 of file ax_platform_node_delegate_base.cc.

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

◆ 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 391 of file ax_platform_node_delegate_base.cc.

391 {
392 return std::nullopt;
393}

◆ GetTableCellIndex()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 469 of file ax_platform_node_delegate_base.cc.

469 {
470 return std::nullopt;
471}

◆ 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 396 of file ax_platform_node_delegate_base.cc.

396 {
397 return std::nullopt;
398}

◆ 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 ui::TestAXNodeWrapper.

Definition at line 357 of file ax_platform_node_delegate_base.cc.

357 {
358 return gfx::kNullAcceleratedWidget;
359}

◆ GetTargetNodeForRelation()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 571 of file ax_platform_node_delegate_base.cc.

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

◆ GetTargetNodesForRelation()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 594 of file ax_platform_node_delegate_base.cc.

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

◆ GetTreeData()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 30 of file ax_platform_node_delegate_base.cc.

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

◆ GetUIADescendants()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 649 of file ax_platform_node_delegate_base.cc.

649 {
650 return {};
651}

◆ 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 ui::TestAXNodeWrapper.

Definition at line 67 of file ax_platform_node_delegate_base.cc.

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

◆ GetUniqueId()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 635 of file ax_platform_node_delegate_base.cc.

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

◆ HasModalDialog()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 124 of file ax_platform_node_delegate_base.cc.

124 {
125 return false;
126}

◆ HasVisibleCaretOrSelection()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 567 of file ax_platform_node_delegate_base.cc.

567 {
568 return false;
569}

◆ HitTestSync()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 322 of file ax_platform_node_delegate_base.cc.

324 {
325 return nullptr;
326}

◆ IsCellOrHeaderOfARIAGrid()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 482 of file ax_platform_node_delegate_base.cc.

482 {
483 return false;
484}

◆ IsCellOrHeaderOfARIATable()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 478 of file ax_platform_node_delegate_base.cc.

478 {
479 return false;
480}

◆ IsChildOfLeaf()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 160 of file ax_platform_node_delegate_base.cc.

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

◆ IsChildOfPlainTextField()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 179 of file ax_platform_node_delegate_base.cc.

179 {
180 return false;
181}

◆ IsLeaf()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 171 of file ax_platform_node_delegate_base.cc.

171 {
172 return !GetChildCount();
173}

◆ IsMinimized()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 555 of file ax_platform_node_delegate_base.cc.

555 {
556 return false;
557}

◆ IsOffscreen()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 551 of file ax_platform_node_delegate_base.cc.

551 {
552 return false;
553}

◆ IsOrderedSet()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 490 of file ax_platform_node_delegate_base.cc.

490 {
491 return false;
492}

◆ IsOrderedSetItem()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 486 of file ax_platform_node_delegate_base.cc.

486 {
487 return false;
488}

◆ IsTable()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 361 of file ax_platform_node_delegate_base.cc.

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

◆ IsTableCellOrHeader()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 430 of file ax_platform_node_delegate_base.cc.

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

◆ IsTableRow()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 422 of file ax_platform_node_delegate_base.cc.

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

◆ IsText()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 559 of file ax_platform_node_delegate_base.cc.

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

◆ IsToplevelBrowserWindow()

bool ui::AXPlatformNodeDelegateBase::IsToplevelBrowserWindow ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Definition at line 175 of file ax_platform_node_delegate_base.cc.

175 {
176 return false;
177}

◆ IsWebContent()

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

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 563 of file ax_platform_node_delegate_base.cc.

563 {
564 return false;
565}

◆ SetHypertextSelection()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 275 of file ax_platform_node_delegate_base.cc.

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

◆ ShouldIgnoreHoveredStateForTesting()

bool ui::AXPlatformNodeDelegateBase::ShouldIgnoreHoveredStateForTesting ( )
overridevirtual

Implements ui::AXPlatformNodeDelegate.

Reimplemented in ui::TestAXNodeWrapper.

Definition at line 547 of file ax_platform_node_delegate_base.cc.

547 {
548 return true;
549}

◆ SubtreeToStringHelper()

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

Implements ui::AXPlatformNodeDelegate.

Definition at line 666 of file ax_platform_node_delegate_base.cc.

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

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