chromium/third_party/blink/renderer/modules/gamepad/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("//third_party/blink/renderer/modules/modules.gni")

blink_modules_sources("gamepad") {
  sources = [
    "gamepad.cc",
    "gamepad.h",
    "gamepad_axis_event.cc",
    "gamepad_axis_event.h",
    "gamepad_button.cc",
    "gamepad_button.h",
    "gamepad_button_event.cc",
    "gamepad_button_event.h",
    "gamepad_comparisons.cc",
    "gamepad_comparisons.h",
    "gamepad_dispatcher.cc",
    "gamepad_dispatcher.h",
    "gamepad_event.cc",
    "gamepad_event.h",
    "gamepad_haptic_actuator.cc",
    "gamepad_haptic_actuator.h",
    "gamepad_listener.h",
    "gamepad_shared_memory_reader.cc",
    "gamepad_shared_memory_reader.h",
    "gamepad_touch.cc",
    "gamepad_touch.h",
    "navigator_gamepad.cc",
    "navigator_gamepad.h",
  ]

  deps = [
    "//device/gamepad/public/cpp:shared_with_blink",
    "//device/gamepad/public/cpp:switches",
    "//device/gamepad/public/mojom:mojom_blink",
    "//third_party/blink/public:blink_headers",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "gamepad_comparisons_test.cc" ]

  configs += [
    "//third_party/blink/renderer:config",
    "//third_party/blink/renderer:inside_blink",
    "//third_party/blink/renderer/core:blink_core_pch",
  ]

  deps = [
    "//device/gamepad/public/cpp:shared_with_blink",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/renderer/modules",
    "//third_party/blink/renderer/platform",
    "//third_party/blink/renderer/platform:test_support",
    "//third_party/blink/renderer/platform/wtf",
  ]
}