5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_PLATFORM_VIEW_IOS_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_PLATFORM_VIEW_IOS_H_
10 #include "flutter/fml/closure.h"
11 #include "flutter/fml/macros.h"
12 #include "flutter/shell/common/platform_view.h"
42 const std::shared_ptr<IOSContext>& context,
44 const flutter::TaskRunners& task_runners);
47 PlatformView::Delegate& delegate,
50 const flutter::TaskRunners& task_runners,
51 const std::shared_ptr<fml::ConcurrentTaskRunner>& worker_task_runner,
52 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch);
107 flutter::CustomAccessibilityActionUpdates actions)
override;
117 const std::vector<std::string>& supported_locale_data)
override;
123 return platform_message_handler_;
127 return platform_message_handler_;
133 class ScopedObserver {
137 void reset(id<NSObject> observer);
138 ScopedObserver(
const ScopedObserver&) =
delete;
139 ScopedObserver& operator=(
const ScopedObserver&) =
delete;
142 id<NSObject> observer_ = nil;
147 class AccessibilityBridgeManager {
149 explicit AccessibilityBridgeManager(
const std::function<
void(
bool)>& set_semantics_enabled);
150 AccessibilityBridgeManager(
const std::function<
void(
bool)>& set_semantics_enabled,
151 AccessibilityBridge* bridge);
152 explicit operator bool() const noexcept {
return static_cast<bool>(accessibility_bridge_); }
153 AccessibilityBridge* get() const noexcept {
return accessibility_bridge_.get(); }
154 void Set(std::unique_ptr<AccessibilityBridge> bridge);
158 FML_DISALLOW_COPY_AND_ASSIGN(AccessibilityBridgeManager);
159 std::unique_ptr<AccessibilityBridge> accessibility_bridge_;
160 std::function<void(
bool)> set_semantics_enabled_;
166 std::mutex ios_surface_mutex_;
167 std::unique_ptr<IOSSurface> ios_surface_;
168 std::shared_ptr<IOSContext> ios_context_;
170 AccessibilityBridgeManager accessibility_bridge_;
171 ScopedObserver dealloc_view_controller_observer_;
172 std::vector<std::string> platform_resolved_locale_;
173 std::shared_ptr<PlatformMessageHandlerIos> platform_message_handler_;
180 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_PLATFORM_VIEW_IOS_H_