Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
alert_platform_node_delegate.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_PLATFORM_COMMON_ALERT_PLATFORM_NODE_DELEGATE_H_
6#define FLUTTER_SHELL_PLATFORM_COMMON_ALERT_PLATFORM_NODE_DELEGATE_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/third_party/accessibility/ax/ax_node_data.h"
10#include "flutter/third_party/accessibility/ax/platform/ax_platform_node_delegate_base.h"
11
12namespace flutter {
13
14// A delegate for a node that holds the text of an a11y alert that a
15// screen-reader should announce. The delegate is used to construct an
16// AXPlatformNode, and in order to serve as an alert, only needs to be able to
17// hold a text announcement and make that text available to the platform node.
19 public:
21 ui::AXPlatformNodeDelegate& parent_delegate);
23
24 // Set the alert text of the node for which this is the delegate.
25 void SetText(const std::u16string& text);
26
27 // |AXPlatformNodeDelegate|
29
30 private:
31 // AXPlatformNodeDelegate overrides.
32 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override;
33 const ui::AXUniqueId& GetUniqueId() const override;
34 const ui::AXNodeData& GetData() const override;
35
36 // Delegate of the parent of this node. Returned by GetParent.
37 ui::AXPlatformNodeDelegate& parent_delegate_;
38
39 // Node Data that contains the alert text. Returned by GetData.
40 ui::AXNodeData data_;
41
42 // A unique ID used to identify this node. Returned by GetUniqueId.
44
46};
47
48} // namespace flutter
49
50#endif // FLUTTER_SHELL_PLATFORM_COMMON_ALERT_PLATFORM_NODE_DELEGATE_H_
gfx::NativeViewAccessible GetParent() override
gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override
const ui::AXNodeData & GetData() const override
const ui::AXUniqueId & GetUniqueId() const override
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
std::u16string text
UnimplementedNativeViewAccessible * NativeViewAccessible