5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_ACCESSIBILITY_BRIDGE_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_ACCESSIBILITY_BRIDGE_H_
8 #import <UIKit/UIKit.h>
11 #include <unordered_map>
12 #include <unordered_set>
15 #include "flutter/fml/macros.h"
16 #include "flutter/fml/memory/weak_ptr.h"
17 #include "flutter/fml/platform/darwin/scoped_nsobject.h"
18 #include "flutter/lib/ui/semantics/custom_accessibility_action.h"
19 #include "flutter/lib/ui/semantics/semantics_node.h"
26 #include "third_party/skia/include/core/SkRect.h"
54 std::shared_ptr<PlatformViewsController> platform_views_controller,
55 std::unique_ptr<IosDelegate> ios_delegate =
nullptr);
59 const flutter::CustomAccessibilityActionUpdates& actions);
60 void HandleEvent(NSDictionary<NSString*, id>* annotatedEvent);
63 flutter::SemanticsAction action,
64 fml::MallocMapping args)
override;
70 UIView*
view()
const override {
return view_controller_.view; }
74 fml::WeakPtr<AccessibilityBridge>
GetWeakPtr();
77 return platform_views_controller_;
83 SemanticsObject* GetOrCreateObject(int32_t
id, flutter::SemanticsNodeUpdates& updates);
91 NSMutableArray<NSNumber*>* doomed_uids);
95 const std::shared_ptr<PlatformViewsController> platform_views_controller_;
99 int32_t last_focused_semantics_object_id_;
103 fml::scoped_nsobject<NSMutableDictionary<NSNumber*, SemanticsObject*>> objects_;
104 fml::scoped_nsprotocol<FlutterBasicMessageChannel*> accessibility_channel_;
105 int32_t previous_route_id_ = 0;
106 std::unordered_map<int32_t, flutter::CustomAccessibilityAction> actions_;
107 std::vector<int32_t> previous_routes_;
108 std::unique_ptr<IosDelegate> ios_delegate_;
109 fml::WeakPtrFactory<AccessibilityBridge> weak_factory_;
115 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_ACCESSIBILITY_BRIDGE_H_