Flutter Engine
The 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/component/runner/cpp/fidl.h>
9#include <lib/fidl/cpp/binding_set.h>
10#include <lib/sys/cpp/component_context.h>
11
14
15namespace dart_runner {
16
17class DartRunner : public fuchsia::component::runner::ComponentRunner {
18 public:
19 explicit DartRunner(sys::ComponentContext* context);
20 ~DartRunner() override;
21
22 private:
23 // |fuchsia::component::runner::ComponentRunner| implementation:
24 void Start(
25 fuchsia::component::runner::ComponentStartInfo start_info,
26 fidl::InterfaceRequest<fuchsia::component::runner::ComponentController>
27 controller) override;
28
29 // Add test components to this map to ensure it is kept alive in memory for
30 // the duration of test execution and retrieval of exit code.
32 std::shared_ptr<DartTestComponentController>>
33 test_components_;
34
35 // Not owned by DartRunner.
36 sys::ComponentContext* context_;
37 fidl::BindingSet<fuchsia::component::runner::ComponentRunner>
38 component_runner_bindings_;
39
40#if !defined(AOT_RUNTIME)
41 dart_utils::MappedResource vm_snapshot_data_;
42 dart_utils::MappedResource vm_snapshot_instructions_;
43#endif
44
45 // Disallow copy and assignment.
46 DartRunner(const DartRunner&) = delete;
47 DartRunner& operator=(const DartRunner&) = delete;
48};
49
50} // namespace dart_runner
51
52#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_DART_RUNNER_DART_RUNNER_H_
DartRunner(sys::ComponentContext *context)
Definition: dart_runner.cc:189
sys::ComponentContext * ComponentContext()
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
Definition: SkVx.h:680