chromium/fuchsia_web/shell/web_engine_shell_for_web_instance_host.cml

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// A component that is launched by web_engine_shell since web_engine_shell
// itself runs as a test component, and therefore cannot run WebInstanceHost
// directly.
{
  include: [
    "//fuchsia_web/webinstance_host/web_instance_host.shard.cml",
    "syslog/client.shard.cml",
  ],
  program: {
    runner: "elf",
    binary: "web_engine_shell_exec",
    args: [
      // Inform web_engine_shell that it is running as the sub-process in which
      // WebInstanceHost may be used. In this scenario, the main test component
      // is running only as a launcher of this child.
      "--no-relaunch",
    ],
  },
  use: [
    // Required if not run with --headless.
    {
      protocol: [ "fuchsia.element.GraphicalPresenter" ],
      availability: "optional",
    },

    // Used to hold the cdm_data directory passed to web_instance.
    {
      storage: "data",
      path: "/data",
    },

    // Needed when launched with --enable-web-instance-tmp.
    {
      storage: "tmp",
      path: "/tmp",
      availability: "optional",
    },
  ],
}