chromium/fuchsia_web/webengine/web_instance-common.shard.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.
{
  program: {
    runner: "elf",
    binary: "web_engine_exe",
  },
  capabilities: [
    {
      protocol: [
        "fuchsia.web.Context",
        "fuchsia.web.Debug",
        "fuchsia.web.FrameHost",
      ],
    },
  ],
  use: [
    // fuchsia.web/CreateContextParams.cdm_data_directory.
    {
      directory: "cdm_data",
      rights: [ "rw*" ],
      path: "/cdm_data",
      availability: "optional",
    },

    // Holds optional .json config files.
    {
      directory: "config-data",
      rights: [ "r*" ],
      path: "/config/data",
      availability: "optional",
    },

    // fuchsia.web/CreateContextParams.content_directories.
    {
      directory: "content-directories",
      rights: [ "r*" ],
      path: "/content-directories",
      availability: "optional",
    },

    // Expected to host an "argv.json" file containing command line args.
    {
      directory: "command-line-config",
      rights: [ "r*" ],
      path: "/config/command-line",
      availability: "optional",
    },

    // fuchsia.web/CreateContextParams.data_directory.
    {
      directory: "data",
      rights: [ "rw*" ],
      path: "/data",
      availability: "optional",
    },

    // Holds cert.pem; the system root certificate store.
    {
      directory: "root-ssl-certificates",
      rights: [ "r*" ],
      path: "/config/ssl",
      availability: "optional",
    },

    // Holds ICU time zone data files.
    // See:
    // https://fuchsia.dev/fuchsia-src/concepts/process/namespaces?typical_directory_structure
    {
      directory: "tzdata-icu",
      rights: [ "r*" ],
      path: "/config/tzdata/icu",
    },

    // Temporary directory specified by WebInstanceHost.set_tmp_dir.
    {
      directory: "tmp",
      rights: [ "rw*" ],
      path: "/tmp",
      availability: "optional",
    },
  ],
  expose: [
    {
      protocol: [
        "fuchsia.web.Context",
        "fuchsia.web.Debug",
        "fuchsia.web.FrameHost",
      ],
      from: "self",
    },
    {
      protocol: "fuchsia.component.Binder",
      from: "framework",
    },
  ],
}