Flutter Engine
 
Loading...
Searching...
No Matches
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 void handle_unknown_method(uint64_t ordinal,
23 bool method_has_response) override;
24
25 private:
26 // |fuchsia::component::runner::ComponentRunner| implementation:
27 void Start(
28 fuchsia::component::runner::ComponentStartInfo start_info,
29 fidl::InterfaceRequest<fuchsia::component::runner::ComponentController>
30 controller) override;
31
32 // Add test components to this map to ensure it is kept alive in memory for
33 // the duration of test execution and retrieval of exit code.
35 std::shared_ptr<DartTestComponentController>>
36 test_components_;
37
38 // Not owned by DartRunner.
39 sys::ComponentContext* context_;
40 fidl::BindingSet<fuchsia::component::runner::ComponentRunner>
41 component_runner_bindings_;
42
43#if !defined(AOT_RUNTIME)
44 dart_utils::MappedResource vm_snapshot_data_;
45 dart_utils::MappedResource vm_snapshot_instructions_;
46#endif
47
48 // Disallow copy and assignment.
49 DartRunner(const DartRunner&) = delete;
50 DartRunner& operator=(const DartRunner&) = delete;
51};
52
53} // namespace dart_runner
54
55#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_DART_RUNNER_DART_RUNNER_H_
void handle_unknown_method(uint64_t ordinal, bool method_has_response) override