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_;
131 #endif // FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_PLUGIN_REGISTRAR_H_