BUILD.gn 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Copyright 2022 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("//third_party/protobuf/proto_library.gni")
  5. source_set("screen_ai") {
  6. sources = [
  7. "screen_ai_ax_tree_serializer.cc",
  8. "screen_ai_ax_tree_serializer.h",
  9. "screen_ai_service_impl.cc",
  10. "screen_ai_service_impl.h",
  11. ]
  12. public_deps = [ "//components/services/screen_ai/proto:proto_convertors" ]
  13. deps = [
  14. "//components/services/screen_ai/public/cpp:utilities",
  15. "//components/services/screen_ai/public/mojom",
  16. "//mojo/public/cpp/bindings",
  17. "//sandbox/policy",
  18. "//ui/accessibility:accessibility",
  19. ]
  20. }
  21. if (!is_mac) {
  22. source_set("screen_ai_sandbox_hook") {
  23. sources = [
  24. "sandbox/screen_ai_sandbox_hook_linux.cc",
  25. "sandbox/screen_ai_sandbox_hook_linux.h",
  26. ]
  27. deps = [
  28. "//base",
  29. "//components/component_updater",
  30. "//components/services/screen_ai/public/cpp:utilities",
  31. "//sandbox/linux:sandbox_services",
  32. "//ui/accessibility:ax_base",
  33. ]
  34. public_deps = [ "//sandbox/policy" ]
  35. }
  36. }
  37. group("test_support_data") {
  38. visibility = [ ":test_support" ]
  39. testonly = true
  40. data = [ "$root_gen_dir/components/services/screen_ai/proto/view_hierarchy.descriptor" ]
  41. deps = [
  42. "//components/services/screen_ai/proto:view_hierarchy_proto_descriptor",
  43. ]
  44. }
  45. source_set("test_support") {
  46. testonly = true
  47. sources = [
  48. "proto/test_proto_loader.cc",
  49. "proto/test_proto_loader.h",
  50. ]
  51. data_deps = [ ":test_support_data" ]
  52. deps = [
  53. "//base",
  54. "//third_party/protobuf:protobuf_full",
  55. ]
  56. }
  57. source_set("unit_tests") {
  58. testonly = true
  59. sources = [
  60. "proto/proto_convertor_unittest.cc",
  61. "screen_ai_ax_tree_serializer_unittest.cc",
  62. ]
  63. data = [ "//components/test/data/screen_ai/" ]
  64. deps = [
  65. ":screen_ai",
  66. ":test_support",
  67. "//components/services/screen_ai/proto",
  68. "//testing/gtest",
  69. "//ui/accessibility:test_support",
  70. ]
  71. }