| 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_LIB_UI_ISOLATE_NAME_SERVER_NATIVES_H_ |
| 6 | #define FLUTTER_LIB_UI_ISOLATE_NAME_SERVER_NATIVES_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | #include "third_party/dart/runtime/include/dart_api.h" |
| 10 | |
| 11 | namespace tonic { |
| 12 | class DartLibraryNatives; |
| 13 | } // namespace tonic |
| 14 | |
| 15 | namespace flutter { |
| 16 | |
| 17 | class IsolateNameServerNatives { |
| 18 | public: |
| 19 | static Dart_Handle LookupPortByName(const std::string& name); |
| 20 | static Dart_Handle RegisterPortWithName(Dart_Handle port_handle, |
| 21 | const std::string& name); |
| 22 | static Dart_Handle RemovePortNameMapping(const std::string& name); |
| 23 | static void RegisterNatives(tonic::DartLibraryNatives* natives); |
| 24 | }; |
| 25 | |
| 26 | } // namespace flutter |
| 27 | |
| 28 | #endif // FLUTTER_LIB_UI_ISOLATE_NAME_SERVER_NATIVES_H_ |
| 29 | |