# Copyright 2017 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("//build/config/ozone.gni")
import("//build/config/ui.gni")
assert(is_chromeos_ash)
source_set("ash") {
output_name = "ui_events_ash"
sources = [
"caps_lock_event_rewriter.cc",
"caps_lock_event_rewriter.h",
"discard_key_event_rewriter.cc",
"discard_key_event_rewriter.h",
"event_property.cc",
"event_property.h",
"event_rewriter_ash.cc",
"event_rewriter_ash.h",
"event_rewriter_metrics.cc",
"event_rewriter_metrics.h",
"event_rewriter_utils.h",
"keyboard_capability.cc",
"keyboard_capability.h",
"keyboard_device_id_event_rewriter.cc",
"keyboard_device_id_event_rewriter.h",
"keyboard_info_metrics.cc",
"keyboard_info_metrics.h",
"keyboard_layout_util.cc",
"keyboard_layout_util.h",
"keyboard_modifier_event_rewriter.cc",
"keyboard_modifier_event_rewriter.h",
"modifier_split_dogfood_controller.cc",
"modifier_split_dogfood_controller.h",
"pref_names.h",
"top_row_action_keys.cc",
"top_row_action_keys.h",
]
deps = [
"//ash/constants",
"//base",
"//components/user_manager",
"//device/udev_linux",
"//google_apis",
"//ui/base",
"//ui/base:features",
"//ui/base/ime/ash",
"//ui/events",
"//ui/events:dom_keycode_converter",
"//ui/events/ash/mojom",
"//ui/events/devices",
"//ui/events/ozone/evdev",
"//ui/events/ozone/evdev:event_device_info",
"//ui/events/ozone/layout",
]
if (ozone_platform_x11) {
deps += [
"//ui/base/x",
"//ui/events/keycodes:x11",
]
}
}
source_set("unit_tests") {
sources = [
"keyboard_capability_unittest.cc",
"keyboard_device_id_event_rewriter_unittest.cc",
"keyboard_info_metrics_unittest.cc",
"top_row_action_keys_unittest.cc",
]
deps = [
":ash",
"//ash/constants",
"//base",
"//base/test:test_support",
"//components/user_manager:test_support",
"//device/udev_linux:test_support",
"//testing/gtest",
"//ui/base",
"//ui/events",
"//ui/events/ash/mojom",
"//ui/events/devices",
"//ui/events/devices:test_support",
"//ui/events/ozone/evdev:event_device_info",
"//ui/events/ozone/evdev:event_device_info_test_utils",
]
testonly = true
}
source_set("test_support") {
sources = [
"fake_event_rewriter_ash_delegate.cc",
"fake_event_rewriter_ash_delegate.h",
]
deps = [
":ash",
"//base",
]
testonly = true
}