chromium/remoting/client/input/BUILD.gn

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

source_set("input") {
  sources = [
    "client_input_injector.h",
    "direct_touch_input_strategy.cc",
    "direct_touch_input_strategy.h",
    "key_event_mapper.cc",
    "key_event_mapper.h",
    "keyboard_input_strategy.h",
    "keyboard_interpreter.cc",
    "keyboard_interpreter.h",
    "keycode_map.cc",
    "keycode_map.h",
    "native_device_keymap.cc",
    "native_device_keymap.h",
    "text_keyboard_input_strategy.cc",
    "text_keyboard_input_strategy.h",
    "touch_input_scaler.cc",
    "touch_input_scaler.h",
    "touch_input_strategy.h",
    "trackpad_input_strategy.cc",
    "trackpad_input_strategy.h",
  ]

  deps = [
    ":normalizing_input_filter",
    "//remoting/base",
    "//remoting/client/ui:ui_manipulation",
    "//remoting/protocol",
    "//third_party/webrtc_overrides:webrtc_component",
    "//ui/events:dom_keycode_converter",
  ]

  if (is_android) {
    sources += [ "native_device_keymap_android.cc" ]
  }

  if (is_ios) {
    sources += [ "native_device_keymap_ios.cc" ]
  }

  if (is_android || is_ios) {
    sources -= [ "native_device_keymap.cc" ]
  }
}

source_set("normalizing_input_filter") {
  # Disabled the source filters because there are _mac files that need to
  # be compiled on all platforms.
  sources = [
    "normalizing_input_filter_cros.cc",
    "normalizing_input_filter_cros.h",
    "normalizing_input_filter_mac.cc",
    "normalizing_input_filter_mac.h",
    "normalizing_input_filter_win.cc",
    "normalizing_input_filter_win.h",
  ]

  deps = [
    "//remoting/base",
    "//remoting/protocol",
    "//third_party/webrtc_overrides:webrtc_component",
    "//ui/events:dom_keycode_converter",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "key_event_mapper_unittest.cc",
    "keycode_map_unittest.cc",
    "touch_input_scaler_unittest.cc",
  ]

  configs += [ "//remoting/build/config:version" ]

  deps = [
    ":input",
    ":normalizing_input_filter_unit_tests",
    "//base",
    "//remoting/proto",
    "//remoting/protocol:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/webrtc_overrides:webrtc_component",
  ]
}

source_set("normalizing_input_filter_unit_tests") {
  testonly = true

  sources = [
    "normalizing_input_filter_cros_unittest.cc",
    "normalizing_input_filter_mac_unittest.cc",
    "normalizing_input_filter_win_unittest.cc",
  ]

  configs += [ "//remoting/build/config:version" ]

  deps = [
    ":input",
    "//remoting/client/input:normalizing_input_filter",
    "//remoting/proto",
    "//remoting/protocol:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/webrtc_overrides:webrtc_component",
    "//ui/events:dom_keycode_converter",
  ]
}