chromium/ui/ozone/platform/wayland/mojom/BUILD.gn

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

import("//mojo/public/tools/bindings/mojom.gni")

mojom("mojom") {
  sources = [
    "wayland_buffer_manager.mojom",
    "wayland_overlay_config.mojom",
    "wayland_presentation_info.mojom",
  ]

  public_deps = [
    "//mojo/public/mojom/base",
    "//skia/public/mojom",
    "//ui/gfx/geometry/mojom",
    "//ui/gfx/mojom",
    "//ui/gl/mojom",
  ]

  cpp_typemaps = [
    {
      types = [
        {
          mojom = "wl.mojom.WaylandOverlayConfig"
          cpp = "::wl::WaylandOverlayConfig"
          move_only = true
        },
        {
          mojom = "wl.mojom.TransformUnion"
          cpp = "::absl::variant<::gfx::OverlayTransform, ::gfx::Transform>"
        },
      ]
      traits_sources = [ "wayland_overlay_config_mojom_traits.cc" ]
      traits_headers = [ "wayland_overlay_config_mojom_traits.h" ]
      traits_deps = [
        "//components/crash/core/common:crash_key",
        "//ui/ozone/platform/wayland:common",
      ]
    },
    {
      types = [
        {
          mojom = "wl.mojom.WaylandPresentationInfo"
          cpp = "::wl::WaylandPresentationInfo"
        },
      ]
      traits_sources = [ "wayland_presentation_info_mojom_traits.cc" ]
      traits_headers = [ "wayland_presentation_info_mojom_traits.h" ]
      traits_deps = [ "//ui/ozone/platform/wayland:common" ]
    },
  ]
}

mojom("test_interfaces") {
  sources = [ "wayland_overlay_config_traits_test_service.mojom" ]

  public_deps = [ ":mojom" ]
}