Flutter Engine
dart_runner.h
Go to the documentation of this file.
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_SHELL_PLATFORM_FUCHSIA_DART_RUNNER_DART_RUNNER_H_
6 #define FLUTTER_SHELL_PLATFORM_FUCHSIA_DART_RUNNER_DART_RUNNER_H_
7 
8 #include <fuchsia/sys/cpp/fidl.h>
9 #include <lib/fidl/cpp/binding_set.h>
10 #include <lib/sys/cpp/component_context.h>
11 
13 
14 namespace dart_runner {
15 
16 class DartRunner : public fuchsia::sys::Runner {
17  public:
18  explicit DartRunner(sys::ComponentContext* context);
19  ~DartRunner() override;
20 
21  private:
22  // |fuchsia::sys::Runner| implementation:
23  void StartComponent(
24  fuchsia::sys::Package package,
25  fuchsia::sys::StartupInfo startup_info,
26  ::fidl::InterfaceRequest<fuchsia::sys::ComponentController> controller)
27  override;
28 
29  // Not owned by DartRunner.
30  sys::ComponentContext* context_;
31  fidl::BindingSet<fuchsia::sys::Runner> bindings_;
32 
33 #if !defined(AOT_RUNTIME)
34  dart_utils::MappedResource vm_snapshot_data_;
35  dart_utils::MappedResource vm_snapshot_instructions_;
36 #endif
37 
38  // Disallow copy and assignment.
39  DartRunner(const DartRunner&) = delete;
40  DartRunner& operator=(const DartRunner&) = delete;
41 };
42 
43 } // namespace dart_runner
44 
45 #endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_DART_RUNNER_DART_RUNNER_H_
DartRunner(sys::ComponentContext *context)
Definition: dart_runner.cc:124