5#ifndef FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_PLUGIN_REGISTRAR_H_
6#define FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_PLUGIN_REGISTRAR_H_
54 void AddPlugin(std::unique_ptr<Plugin> plugin);
68 std::unique_ptr<BinaryMessenger> messenger_;
70 std::unique_ptr<TextureRegistrar> texture_registrar_;
73 std::set<std::unique_ptr<Plugin>> plugins_;
104 registrars_.emplace(registrar_ref, std::make_unique<T>(registrar_ref));
105 auto& registrar_pair = *(insert_result.first);
107 OnRegistrarDestroyed);
108 return static_cast<T*
>(registrar_pair.second.get());
114 void Reset() { registrars_.clear(); }
120 std::unique_ptr<PluginRegistrar>>;
124 WrapperMap* registrars() {
return ®istrars_; }
126 WrapperMap registrars_;
PluginRegistrarManager & operator=(PluginRegistrarManager const &)=delete
T * GetRegistrar(FlutterDesktopPluginRegistrarRef registrar_ref)
static PluginRegistrarManager * GetInstance()
PluginRegistrarManager(PluginRegistrarManager const &)=delete
void AddPlugin(std::unique_ptr< Plugin > plugin)
TextureRegistrar * texture_registrar()
FlutterDesktopPluginRegistrarRef registrar() const
PluginRegistrar & operator=(PluginRegistrar const &)=delete
PluginRegistrar(FlutterDesktopPluginRegistrarRef core_registrar)
virtual ~PluginRegistrar()
BinaryMessenger * messenger()
PluginRegistrar(PluginRegistrar const &)=delete
virtual ~Plugin()=default
struct FlutterDesktopPluginRegistrar * FlutterDesktopPluginRegistrarRef
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
void FlutterDesktopPluginRegistrarSetDestructionHandler(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopOnPluginRegistrarDestroyed callback)