chromium/device/gamepad/public/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_component("mojom") {
  sources = [ "gamepad.mojom" ]

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

  output_prefix = "gamepad_mojom"
  macro_prefix = "GAMEPAD_MOJOM"

  shared_cpp_typemap = {
    types = [
      {
        mojom = "device.mojom.Gamepad"
        cpp = "::device::Gamepad"
      },
      {
        mojom = "device.mojom.GamepadButton"
        cpp = "::device::GamepadButton"
      },
      {
        mojom = "device.mojom.GamepadHand"
        cpp = "::device::GamepadHand"
      },
      {
        mojom = "device.mojom.GamepadHapticActuator"
        cpp = "::device::GamepadHapticActuator"
        nullable_is_same_type = true
      },
      {
        mojom = "device.mojom.GamepadHapticActuatorType"
        cpp = "::device::GamepadHapticActuatorType"
      },
      {
        mojom = "device.mojom.GamepadMapping"
        cpp = "::device::GamepadMapping"
      },
      {
        mojom = "device.mojom.GamepadPose"
        cpp = "::device::GamepadPose"
        nullable_is_same_type = true
      },
      {
        mojom = "device.mojom.GamepadQuaternion"
        cpp = "::device::GamepadQuaternion"
        nullable_is_same_type = true
      },
      {
        mojom = "device.mojom.GamepadTouch"
        cpp = "::device::GamepadTouch"
      },
      {
        mojom = "device.mojom.GamepadVector"
        cpp = "::device::GamepadVector"
        nullable_is_same_type = true
      },
    ]
    traits_headers = [ "//device/gamepad/public/cpp/gamepad_mojom_traits.h" ]
    traits_public_deps = [
      "//device/gamepad/public/cpp:shared_typemap_traits",
      "//device/gamepad/public/cpp:shared_with_blink",
      "//third_party/blink/public:blink_headers",
    ]
  }

  cpp_typemaps = [ shared_cpp_typemap ]
  blink_cpp_typemaps = [ shared_cpp_typemap ]
}