| 1 | // Copyright 2013 The Flutter Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef FLUTTER_DART_PLUGIN_REGISTRANT_H_ |
| 6 | #define FLUTTER_DART_PLUGIN_REGISTRANT_H_ |
| 7 | |
| 8 | #include "third_party/dart/runtime/include/dart_api.h" |
| 9 | |
| 10 | namespace flutter { |
| 11 | |
| 12 | /// The name of the library where the Dart Plugin Registrant will be looked for. |
| 13 | /// This is available for testing. |
| 14 | extern const char* dart_plugin_registrant_library_override; |
| 15 | |
| 16 | /// Looks for the Dart Plugin Registrant in `library_handle` and invokes it if |
| 17 | /// it is found. |
| 18 | /// @return `true` when the registrant has been invoked. |
| 19 | bool InvokeDartPluginRegistrantIfAvailable(Dart_Handle library_handle); |
| 20 | |
| 21 | /// @return `true` when the registrant has been invoked. |
| 22 | bool FindAndInvokeDartPluginRegistrant(); |
| 23 | |
| 24 | } // namespace flutter |
| 25 | |
| 26 | #endif // FLUTTER_DART_PLUGIN_REGISTRANT_H_ |
| 27 | |