| Flutter Linux Embedder |

Public Member Functions | Protected Member Functions | List of all members
flutter::PluginRegistrar Class Reference

`#include <plugin_registrar.h>`

## Public Member Functions
| PluginRegistrar (FlutterDesktopPluginRegistrarRef core_registrar)
virtual | ~PluginRegistrar ()
| PluginRegistrar (PluginRegistrar const &)=delete
PluginRegistrar & | operator= (PluginRegistrar const &)=delete
BinaryMessenger * | messenger ()
TextureRegistrar * | texture_registrar ()
void | AddPlugin (std::unique_ptr< Plugin > plugin)

## Protected Member Functions
FlutterDesktopPluginRegistrarRef | registrar () const
void | ClearPlugins ()

## Detailed Description

Definition at line 27 of file plugin_registrar.h.

## Constructor & Destructor Documentation

## ◆ PluginRegistrar() [1/2]

flutter::PluginRegistrar::PluginRegistrar | ( | FlutterDesktopPluginRegistrarRef | core_registrar | ) |
| explicit

Definition at line 19 of file plugin_registrar.cc.

20 : registrar_(registrar) {
21 auto core_messenger = FlutterDesktopPluginRegistrarGetMessenger(registrar_);
22 messenger_ = std::make_unique<BinaryMessengerImpl>(core_messenger);
23
24 auto texture_registrar =
25 FlutterDesktopRegistrarGetTextureRegistrar(registrar_);
26 texture_registrar_ =
27 std::make_unique<TextureRegistrarImpl>(texture_registrar);
28 }
flutter::PluginRegistrar::registrar
FlutterDesktopPluginRegistrarRef registrar() const
Definition: plugin_registrar.h:57
flutter::PluginRegistrar::texture_registrar
TextureRegistrar * texture_registrar()
Definition: plugin_registrar.h:47
FlutterDesktopRegistrarGetTextureRegistrar
FLUTTER_EXPORT FlutterDesktopTextureRegistrarRef FlutterDesktopRegistrarGetTextureRegistrar(FlutterDesktopPluginRegistrarRef registrar)
FlutterDesktopPluginRegistrarGetMessenger
FLUTTER_EXPORT FlutterDesktopMessengerRef FlutterDesktopPluginRegistrarGetMessenger(FlutterDesktopPluginRegistrarRef registrar)

## ◆ ~PluginRegistrar()

flutter::PluginRegistrar::~PluginRegistrar | ( |  | ) |
| virtual

Definition at line 30 of file plugin_registrar.cc.

30 {
31 // This must always be the first call.
32 ClearPlugins();
33
34 // Explicitly cleared to facilitate testing of destruction order.
35 messenger_.reset();
36 }
flutter::PluginRegistrar::ClearPlugins
void ClearPlugins()
Definition: plugin_registrar.cc:42

References ClearPlugins().

## ◆ PluginRegistrar() [2/2]

flutter::PluginRegistrar::PluginRegistrar | ( | PluginRegistrar const & |  | ) |
| delete

## Member Function Documentation

## ◆ AddPlugin()

void flutter::PluginRegistrar::AddPlugin | ( | std::unique_ptr< Plugin > | plugin | ) |

Definition at line 38 of file plugin_registrar.cc.

38 {
39 plugins_.insert(std::move(plugin));
40 }

Referenced by flutter::TEST().

## ◆ ClearPlugins()

void flutter::PluginRegistrar::ClearPlugins | ( |  | ) |
| protected

Definition at line 42 of file plugin_registrar.cc.

42 {
43 plugins_.clear();
44 }

Referenced by ~PluginRegistrar().

## ◆ messenger()

BinaryMessenger* flutter::PluginRegistrar::messenger | ( |  | ) |
| inline

Definition at line 43 of file plugin_registrar.h.

43 { return messenger_.get(); }

Referenced by flutter::TEST().

## ◆ operator=()

PluginRegistrar& flutter::PluginRegistrar::operator= | ( | PluginRegistrar const & |  | ) |
| delete

## ◆ registrar()

FlutterDesktopPluginRegistrarRef flutter::PluginRegistrar::registrar | ( |  | ) | const
| inlineprotected

Definition at line 57 of file plugin_registrar.h.

57 { return registrar_; }

## ◆ texture_registrar()

TextureRegistrar* flutter::PluginRegistrar::texture_registrar | ( |  | ) |
| inline

Definition at line 47 of file plugin_registrar.h.

47 { return texture_registrar_.get(); }

Referenced by flutter::TEST().

The documentation for this class was generated from the following files:

- shell/platform/common/client_wrapper/include/flutter/plugin_registrar.h
- shell/platform/common/client_wrapper/plugin_registrar.cc