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 LIB_TONIC_DART_CLASS_PROVIDER_H_ |
6 | #define LIB_TONIC_DART_CLASS_PROVIDER_H_ |
7 | |
8 | #include "third_party/dart/runtime/include/dart_api.h" |
9 | #include "tonic/dart_persistent_value.h" |
10 | |
11 | namespace tonic { |
12 | class DartState; |
13 | |
14 | class DartClassProvider { |
15 | public: |
16 | DartClassProvider(DartState* dart_state, const char* library_name); |
17 | ~DartClassProvider(); |
18 | |
19 | Dart_Handle GetClassByName(const char* class_name); |
20 | |
21 | private: |
22 | DartPersistentValue library_; |
23 | |
24 | TONIC_DISALLOW_COPY_AND_ASSIGN(DartClassProvider); |
25 | }; |
26 | |
27 | } // namespace tonic |
28 | |
29 | #endif // LIB_TONIC_DART_CLASS_PROVIDER_H_ |
30 |