Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
ui::AXPlatformNode Class Referenceabstract

#include <ax_platform_node.h>

Inheritance diagram for ui::AXPlatformNode:
ui::AXPlatformNodeBase flutter::FlutterTextPlatformNode ui::AXPlatformNodeMac

Public Types

typedef AXPlatformNodeNativeWindowHandlerCallback(gfx::NativeWindow)
 

Public Member Functions

virtual void Destroy ()
 
virtual gfx::NativeViewAccessible GetNativeViewAccessible ()=0
 
virtual void NotifyAccessibilityEvent (ax::mojom::Event event_type)=0
 
virtual AXPlatformNodeDelegateGetDelegate () const =0
 
virtual bool IsDescendantOf (AXPlatformNode *ancestor) const =0
 
void SetIsPrimaryWebContentsForWindow (bool is_primary)
 
bool IsPrimaryWebContentsForWindow () const
 
int32_t GetUniqueId () const
 
std::string ToString ()
 
std::string SubtreeToString ()
 
virtual ~AXPlatformNode ()
 

Static Public Member Functions

static AXPlatformNodeCreate (AXPlatformNodeDelegate *delegate)
 
static AXPlatformNodeFromNativeViewAccessible (gfx::NativeViewAccessible accessible)
 
static AXPlatformNodeFromNativeWindow (gfx::NativeWindow native_window)
 
static void RegisterNativeWindowHandler (std::function< NativeWindowHandlerCallback > handler)
 
static void AddAXModeObserver (AXModeObserver *observer)
 
static void RemoveAXModeObserver (AXModeObserver *observer)
 
static AXMode GetAccessibilityMode ()
 
static void NotifyAddAXModeFlags (AXMode mode_flags)
 
static gfx::NativeViewAccessible GetPopupFocusOverride ()
 
static void SetPopupFocusOverride (gfx::NativeViewAccessible focus_override)
 

Protected Member Functions

 AXPlatformNode ()
 

Friends

std::ostream & operator<< (std::ostream &stream, AXPlatformNode &node)
 

Detailed Description

Definition at line 29 of file ax_platform_node.h.

Member Typedef Documentation

◆ NativeWindowHandlerCallback

typedef AXPlatformNode * ui::AXPlatformNode::NativeWindowHandlerCallback(gfx::NativeWindow)

Definition at line 31 of file ax_platform_node.h.

Constructor & Destructor Documentation

◆ ~AXPlatformNode()

ui::AXPlatformNode::~AXPlatformNode ( )
virtual

Definition at line 38 of file ax_platform_node.cc.

38{}

◆ AXPlatformNode()

ui::AXPlatformNode::AXPlatformNode ( )
protected

Definition at line 36 of file ax_platform_node.cc.

36{}

Member Function Documentation

◆ AddAXModeObserver()

void ui::AXPlatformNode::AddAXModeObserver ( AXModeObserver observer)
static

Definition at line 68 of file ax_platform_node.cc.

68 {
69 ax_mode_observers_.push_back(observer);
70}

◆ Create()

AXPlatformNode * ui::AXPlatformNode::Create ( AXPlatformNodeDelegate delegate)
static

Definition at line 1052 of file ax_platform_node_mac.mm.

1052 {
1053 AXPlatformNodeBase* node = new AXPlatformNodeMac();
1054 node->Init(delegate);
1055 return node;
1056}

◆ Destroy()

void ui::AXPlatformNode::Destroy ( )
virtual

Reimplemented in ui::AXPlatformNodeBase, and ui::AXPlatformNodeMac.

Definition at line 40 of file ax_platform_node.cc.

40{}

◆ FromNativeViewAccessible()

AXPlatformNode * ui::AXPlatformNode::FromNativeViewAccessible ( gfx::NativeViewAccessible  accessible)
static

Definition at line 1059 of file ax_platform_node_mac.mm.

1059 {
1060 if ([accessible isKindOfClass:[AXPlatformNodeCocoa class]])
1061 return [accessible node];
1062 return nullptr;
1063}

◆ FromNativeWindow()

AXPlatformNode * ui::AXPlatformNode::FromNativeWindow ( gfx::NativeWindow  native_window)
static

Definition at line 24 of file ax_platform_node.cc.

25 {
26 if (native_window_handler_)
27 return native_window_handler_(native_window);
28 return nullptr;
29}

◆ GetAccessibilityMode()

static AXMode ui::AXPlatformNode::GetAccessibilityMode ( )
inlinestatic

Definition at line 56 of file ax_platform_node.h.

56{ return ax_mode_; }

◆ GetDelegate()

virtual AXPlatformNodeDelegate * ui::AXPlatformNode::GetDelegate ( ) const
pure virtual

Implemented in ui::AXPlatformNodeBase.

◆ GetNativeViewAccessible()

virtual gfx::NativeViewAccessible ui::AXPlatformNode::GetNativeViewAccessible ( )
pure virtual

◆ GetPopupFocusOverride()

gfx::NativeViewAccessible ui::AXPlatformNode::GetPopupFocusOverride ( )
static

Definition at line 99 of file ax_platform_node.cc.

99 {
100 return popup_focus_override_;
101}

◆ GetUniqueId()

int32_t ui::AXPlatformNode::GetUniqueId ( ) const

Definition at line 42 of file ax_platform_node.cc.

42 {
44 return GetDelegate() ? GetDelegate()->GetUniqueId().Get() : -1;
45}
virtual const AXUniqueId & GetUniqueId() const =0
virtual AXPlatformNodeDelegate * GetDelegate() const =0
int32_t Get() const
#define BASE_DCHECK(condition)
Definition logging.h:63

◆ IsDescendantOf()

virtual bool ui::AXPlatformNode::IsDescendantOf ( AXPlatformNode ancestor) const
pure virtual

Implemented in ui::AXPlatformNodeBase.

◆ IsPrimaryWebContentsForWindow()

bool ui::AXPlatformNode::IsPrimaryWebContentsForWindow ( ) const

Definition at line 51 of file ax_platform_node.cc.

51 {
52 return is_primary_web_contents_for_window_;
53}

◆ NotifyAccessibilityEvent()

virtual void ui::AXPlatformNode::NotifyAccessibilityEvent ( ax::mojom::Event  event_type)
pure virtual

◆ NotifyAddAXModeFlags()

void ui::AXPlatformNode::NotifyAddAXModeFlags ( AXMode  mode_flags)
static

Definition at line 79 of file ax_platform_node.cc.

79 {
80 // Note: this is only called on Windows.
81 AXMode new_ax_mode(ax_mode_);
82 new_ax_mode |= mode_flags;
83
84 if (new_ax_mode == ax_mode_)
85 return; // No change.
86
87 ax_mode_ = new_ax_mode;
88 for (AXModeObserver* observer : ax_mode_observers_)
89 observer->OnAXModeAdded(mode_flags);
90}

◆ RegisterNativeWindowHandler()

void ui::AXPlatformNode::RegisterNativeWindowHandler ( std::function< NativeWindowHandlerCallback handler)
static

Definition at line 31 of file ax_platform_node.cc.

32 {
33 native_window_handler_ = handler;
34}

◆ RemoveAXModeObserver()

void ui::AXPlatformNode::RemoveAXModeObserver ( AXModeObserver observer)
static

Definition at line 73 of file ax_platform_node.cc.

73 {
74 ax_mode_observers_.erase(std::find(ax_mode_observers_.begin(),
75 ax_mode_observers_.end(), observer));
76}

◆ SetIsPrimaryWebContentsForWindow()

void ui::AXPlatformNode::SetIsPrimaryWebContentsForWindow ( bool  is_primary)

Definition at line 47 of file ax_platform_node.cc.

47 {
48 is_primary_web_contents_for_window_ = is_primary;
49}

◆ SetPopupFocusOverride()

void ui::AXPlatformNode::SetPopupFocusOverride ( gfx::NativeViewAccessible  focus_override)
static

Definition at line 93 of file ax_platform_node.cc.

94 {
95 popup_focus_override_ = popup_focus_override;
96}

◆ SubtreeToString()

std::string ui::AXPlatformNode::SubtreeToString ( )

Definition at line 59 of file ax_platform_node.cc.

59 {
60 return GetDelegate() ? GetDelegate()->SubtreeToString() : "No delegate";
61}

◆ ToString()

std::string ui::AXPlatformNode::ToString ( )

Definition at line 55 of file ax_platform_node.cc.

55 {
56 return GetDelegate() ? GetDelegate()->ToString() : "No delegate";
57}

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
AXPlatformNode node 
)
friend

Definition at line 63 of file ax_platform_node.cc.

63 {
64 return stream << node.ToString();
65}

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