Flutter Engine
The Flutter Engine
isolate_configurator.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_FLUTTER_ISOLATE_CONFIGURATOR_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_ISOLATE_CONFIGURATOR_H_
7
8#include <lib/zx/channel.h>
9#include <lib/zx/eventpair.h>
10#include "flutter/fml/macros.h"
11#include "unique_fdio_ns.h"
12
13namespace flutter_runner {
14
15// Contains all the information necessary to configure a new root isolate. This
16// is a single use item. The lifetime of this object must extend past that of
17// the root isolate.
19 public:
21 zx::channel directory_request,
22 zx::eventpair view_ref);
23
25
26 // Can be used only once and only on the UI thread with the newly created
27 // isolate already current.
29
30 private:
31 bool used_ = false;
32 UniqueFDIONS fdio_ns_;
33 zx::channel directory_request_;
34 zx::eventpair view_ref_;
35
36 void BindFuchsia();
37
38 void BindZircon();
39
40 void BindDartIO();
41
42 FML_DISALLOW_COPY_AND_ASSIGN(IsolateConfigurator);
43};
44
45} // namespace flutter_runner
46
47#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_ISOLATE_CONFIGURATOR_H_
IsolateConfigurator(UniqueFDIONS fdio_ns, zx::channel directory_request, zx::eventpair view_ref)