• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_RUNTIME_DART_VM_DATA_H_
6 #define FLUTTER_RUNTIME_DART_VM_DATA_H_
7 
8 #include "flutter/fml/macros.h"
9 #include "flutter/runtime/dart_snapshot.h"
10 
11 namespace flutter {
12 
13 class DartVMData {
14  public:
15   static std::shared_ptr<const DartVMData> Create(
16       Settings settings,
17       fml::RefPtr<DartSnapshot> vm_snapshot,
18       fml::RefPtr<DartSnapshot> isolate_snapshot,
19       fml::RefPtr<DartSnapshot> shared_snapshot);
20 
21   ~DartVMData();
22 
23   const Settings& GetSettings() const;
24 
25   const DartSnapshot& GetVMSnapshot() const;
26 
27   fml::RefPtr<const DartSnapshot> GetIsolateSnapshot() const;
28 
29   fml::RefPtr<const DartSnapshot> GetSharedSnapshot() const;
30 
31  private:
32   const Settings settings_;
33   const fml::RefPtr<const DartSnapshot> vm_snapshot_;
34   const fml::RefPtr<const DartSnapshot> isolate_snapshot_;
35   const fml::RefPtr<const DartSnapshot> shared_snapshot_;
36 
37   DartVMData(Settings settings,
38              fml::RefPtr<const DartSnapshot> vm_snapshot,
39              fml::RefPtr<const DartSnapshot> isolate_snapshot,
40              fml::RefPtr<const DartSnapshot> shared_snapshot);
41 
42   FML_DISALLOW_COPY_AND_ASSIGN(DartVMData);
43 };
44 
45 }  // namespace flutter
46 
47 #endif  // FLUTTER_RUNTIME_DART_VM_DATA_H_
48