| // Copyright 2022 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // TODO(fxbug.dev/88656): document this in an educational way, or maybe in the README.md |
| { |
| include: [ "syslog/client.shard.cml" ], |
| children: [ |
| { |
| name: "tiles_session", |
| url: "fuchsia-pkg://fuchsia.com/tiles-session#meta/tiles-session.cm", |
| startup: "eager", |
| }, |
| { |
| name: "scene_manager", |
| url: "fuchsia-pkg://fuchsia.com/scene_manager#meta/scene_manager.cm", |
| startup: "eager", |
| }, |
| |
| // TODO(fxbug.dev/88656): consider factoring element_manager into its own shard, e.g. |
| // element_manager/with_flutter_runner.shard.cml, so we don't need all of the |
| // boilerplate below. |
| { |
| name: "element_manager", |
| url: "fuchsia-pkg://fuchsia.com/element_manager#meta/element_manager.cm", |
| environment: "#elements_env", |
| }, |
| { |
| name: "dart_jit_runner", |
| url: "fuchsia-pkg://fuchsia.com/dart_jit_runner#meta/dart_jit_runner.cm", |
| startup: "lazy", |
| }, |
| { |
| name: "dart_aot_runner", |
| url: "fuchsia-pkg://fuchsia.com/dart_aot_runner#meta/dart_aot_runner.cm", |
| startup: "lazy", |
| }, |
| { |
| name: "flutter_jit_runner", |
| url: "fuchsia-pkg://fuchsia.com/flutter_jit_runner#meta/flutter_jit_runner.cm", |
| startup: "lazy", |
| }, |
| { |
| name: "flutter_aot_runner", |
| url: "fuchsia-pkg://fuchsia.com/flutter_aot_runner#meta/flutter_aot_runner.cm", |
| startup: "lazy", |
| }, |
| ], |
| collections: [ |
| { |
| name: "elements", |
| durability: "transient", |
| }, |
| ], |
| offer: [ |
| { |
| protocol: [ |
| "fuchsia.logger.LogSink", |
| "fuchsia.ui.composition.Flatland", |
| "fuchsia.ui.composition.FlatlandDisplay", |
| |
| // TODO(fxbug.dev/88656): shouldn't be necessary. Try removing once tiles-session |
| // is functional. |
| "fuchsia.ui.focus.FocusChainListenerRegistry", |
| "fuchsia.ui.input.ImeService", |
| "fuchsia.ui.input3.Keyboard", |
| "fuchsia.ui.input3.KeyEventInjector", |
| "fuchsia.ui.keyboard.focus.Controller", |
| "fuchsia.ui.pointerinjector.Registry", |
| |
| // TODO(fxbug.dev/88656): shouldn't be necessary, except (?) for ICanHazFlatland(). |
| "fuchsia.ui.scenic.Scenic", |
| "fuchsia.ui.shortcut.Manager", |
| |
| // TODO(fxbug.dev/88656): shouldn't be necessary, because the Flatland version of |
| // SceneManager receives the already-"installed" ViewRef from ChildViewWatcher. |
| "fuchsia.ui.views.ViewRefInstalled", |
| ], |
| from: "parent", |
| to: [ |
| "#elements", |
| "#scene_manager", |
| ], |
| }, |
| { |
| directory: "dev-input-report", |
| from: "parent", |
| to: [ "#scene_manager" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.logger.LogSink", // TODO(fxbug.dev/88656): can remove? |
| "fuchsia.tracing.provider.Registry", |
| "fuchsia.ui.composition.Flatland", |
| "fuchsia.ui.focus.FocusChainListenerRegistry", // TODO(fxbug.dev/88656): can remove? |
| "fuchsia.ui.input.ImeService", // TODO(fxbug.dev/88656): can remove? |
| "fuchsia.ui.keyboard.focus.Controller", |
| ], |
| from: "parent", |
| to: [ "#tiles_session" ], |
| }, |
| { |
| protocol: [ "fuchsia.session.scene.Manager" ], |
| from: "#scene_manager", |
| to: [ "#tiles_session" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.logger.LogSink", |
| "fuchsia.sys.Launcher", |
| "fuchsia.ui.scenic.Scenic", // TODO(fxbug.dev/88656): can remove? |
| ], |
| from: "parent", |
| to: [ "#element_manager" ], |
| }, |
| { |
| protocol: "fuchsia.component.Realm", |
| from: "framework", |
| to: "#element_manager", |
| }, |
| { |
| protocol: [ |
| "fuchsia.feedback.CrashReporter", |
| "fuchsia.intl.PropertyProvider", |
| "fuchsia.logger.LogSink", |
| "fuchsia.posix.socket.Provider", |
| "fuchsia.tracing.provider.Registry", |
| ], |
| from: "parent", |
| to: [ |
| "#dart_aot_runner", |
| "#dart_jit_runner", |
| "#flutter_aot_runner", |
| "#flutter_jit_runner", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.fonts.Provider", |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.ui.composition.Flatland", |
| "fuchsia.ui.scenic.Scenic", |
| "fuchsia.vulkan.loader.Loader", |
| ], |
| from: "parent", |
| to: [ |
| "#flutter_aot_runner", |
| "#flutter_jit_runner", |
| ], |
| }, |
| { |
| directory: "config-data", |
| from: "parent", |
| to: [ |
| "#dart_aot_runner", |
| "#dart_jit_runner", |
| "#flutter_aot_runner", |
| "#flutter_jit_runner", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.element.GraphicalPresenter" ], |
| from: "#tiles_session", |
| to: [ "#element_manager" ], |
| }, |
| ], |
| expose: [ |
| { |
| protocol: [ "fuchsia.element.Manager" ], |
| from: "#element_manager", |
| }, |
| { |
| protocol: [ |
| "fuchsia.input.injection.InputDeviceRegistry", |
| "fuchsia.input.keymap.Configuration", // TODO(fxbug.dev/88656): can remove? |
| "fuchsia.ui.accessibility.view.Registry", |
| ], |
| from: "#scene_manager", |
| }, |
| { |
| protocol: "fuchsia.component.Binder", // TODO(fxbug.dev/88656): can remove? |
| from: "framework", |
| }, |
| ], |
| environments: [ |
| { |
| name: "elements_env", |
| extends: "realm", |
| runners: [ |
| { |
| runner: "dart_jit_runner", |
| from: "#dart_jit_runner", |
| }, |
| { |
| runner: "dart_aot_runner", |
| from: "#dart_aot_runner", |
| }, |
| { |
| runner: "flutter_jit_runner", |
| from: "#flutter_jit_runner", |
| }, |
| { |
| runner: "flutter_aot_runner", |
| from: "#flutter_aot_runner", |
| }, |
| ], |
| }, |
| ], |
| } |