BUILD.gn 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Copyright 2018 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/chromeos/ui_mode.gni")
  5. assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash")
  6. component("constants") {
  7. output_name = "ash_ime_constants"
  8. defines = [ "IS_ASH_IME_CONSTANTS_IMPL" ]
  9. deps = [
  10. "//base",
  11. "//build:branding_buildflags",
  12. ]
  13. sources = [
  14. "constants.cc",
  15. "constants.h",
  16. ]
  17. }
  18. source_set("decoder") {
  19. sources = [
  20. "ime_decoder.cc",
  21. "ime_decoder.h",
  22. ]
  23. deps = [
  24. ":constants",
  25. "//ash/constants",
  26. "//ash/services/ime/public/cpp/shared_lib:interfaces",
  27. "//base",
  28. ]
  29. }
  30. source_set("lib") {
  31. sources = [
  32. "connection_factory.cc",
  33. "connection_factory.h",
  34. "decoder/decoder_engine.cc",
  35. "decoder/decoder_engine.h",
  36. "decoder/system_engine.cc",
  37. "decoder/system_engine.h",
  38. "ime_service.cc",
  39. "ime_service.h",
  40. "rule_based_engine.cc",
  41. "rule_based_engine.h",
  42. ]
  43. deps = [
  44. ":constants",
  45. ":decoder",
  46. "//ash/constants",
  47. "//ash/services/ime/public/cpp:rulebased",
  48. "//ash/services/ime/public/cpp/shared_lib:interfaces",
  49. "//ash/services/ime/public/mojom",
  50. "//base",
  51. ]
  52. }
  53. source_set("sandbox_hook") {
  54. sources = [
  55. "ime_sandbox_hook.cc",
  56. "ime_sandbox_hook.h",
  57. ]
  58. deps = [
  59. ":constants",
  60. ":decoder",
  61. "//base",
  62. "//sandbox/linux:sandbox_services",
  63. "//sandbox/policy",
  64. ]
  65. }
  66. source_set("unit_tests") {
  67. testonly = true
  68. deps = [ "//ash/services/ime/public/cpp:rulebased_unit_tests" ]
  69. }
  70. source_set("services_unittests") {
  71. testonly = true
  72. deps = [
  73. ":lib",
  74. ":test_support",
  75. "//ash/constants",
  76. "//ash/services/ime:decoder",
  77. "//ash/services/ime/public/mojom",
  78. "//base",
  79. "//base/test:test_support",
  80. "//mojo/public/cpp/bindings",
  81. "//services/network:test_support",
  82. "//testing/gmock",
  83. "//testing/gtest",
  84. ]
  85. sources = [
  86. "decoder/system_engine_unittest.cc",
  87. "ime_service_unittest.cc",
  88. ]
  89. }
  90. static_library("test_support") {
  91. testonly = true
  92. sources = [
  93. "mock_input_channel.cc",
  94. "mock_input_channel.h",
  95. ]
  96. deps = [
  97. "//ash/services/ime/public/mojom",
  98. "//testing/gmock",
  99. ]
  100. }