chromium/ash/webui/common/mojom/BUILD.gn

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

import("//build/config/chromeos/ui_mode.gni")
import("//mojo/public/tools/bindings/mojom.gni")

assert(is_chromeos_ash)

mojom("mojom") {
  sources = [ "accessibility_features.mojom" ]

  webui_module_path = "/ash/webui/common"

  disable_variants = true

  public_deps = [
    ":accelerator_fetcher",
    ":shortcut_input_provider",
    "//mojo/public/mojom/base",
    "//ui/events/ash/mojom",
  ]
}

# This is a separate target so that downstream WebUI targets can take
# advantage of JS module Mojom files, without having to generate WebUI Mojom
# files for all dependencies(and their dependencies) in //ash/public/mojom.
mojom("shortcut_input_provider") {
  disable_variants = true
  webui_module_path = "/"

  sources = [ "shortcut_input_provider.mojom" ]

  public_deps = [ "//mojo/public/mojom/base" ]

  deps = [ "//ash/public/mojom:mojom" ]
}

mojom("accelerator_fetcher") {
  disable_variants = true
  webui_module_path = "/"

  sources = [ "accelerator_fetcher.mojom" ]

  public_deps = [ "//mojo/public/mojom/base" ]

  deps = [ "//ash/public/mojom:mojom" ]
}

mojom("sea_pen") {
  disable_variants = true
  webui_module_path = "/"
  sources = [
    "sea_pen.mojom",
    "sea_pen_generated.mojom",
  ]
  public_deps = [
    "//mojo/public/mojom/base",
    "//url/mojom:url_mojom_gurl",
  ]
  cpp_typemaps = [
    {
      types = [
        {
          mojom = "ash.personalization_app.mojom.MantaStatusCode"
          cpp = "::manta::MantaStatusCode"
        },
      ]
      traits_headers = [ "sea_pen_mojom_traits.h" ]
      traits_sources = [ "sea_pen_mojom_traits.cc" ]
      traits_public_deps = [
        "//ash/webui/personalization_app/proto",
        "//components/manta",
      ]
    },
  ]
}