BUILD.gn 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Copyright 2016 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("//components/spellcheck/spellcheck_build_features.gni")
  5. source_set("renderer") {
  6. sources = [
  7. "custom_dictionary_engine.cc",
  8. "custom_dictionary_engine.h",
  9. "spellcheck.cc",
  10. "spellcheck.h",
  11. "spellcheck_language.cc",
  12. "spellcheck_language.h",
  13. "spellcheck_provider.cc",
  14. "spellcheck_provider.h",
  15. "spellcheck_renderer_metrics.cc",
  16. "spellcheck_renderer_metrics.h",
  17. "spellcheck_worditerator.cc",
  18. "spellcheck_worditerator.h",
  19. "spelling_engine.cc",
  20. "spelling_engine.h",
  21. ]
  22. if (use_browser_spellchecker) {
  23. sources += [
  24. "platform_spelling_engine.cc",
  25. "platform_spelling_engine.h",
  26. ]
  27. }
  28. if (has_spellcheck_panel) {
  29. sources += [
  30. "spellcheck_panel.cc",
  31. "spellcheck_panel.h",
  32. ]
  33. }
  34. if (!is_android) {
  35. sources += [
  36. "hunspell_engine.cc",
  37. "hunspell_engine.h",
  38. ]
  39. }
  40. public_deps = [ "//components/spellcheck:buildflags" ]
  41. deps = [
  42. "//base:i18n",
  43. "//components/spellcheck/common",
  44. "//content/public/common",
  45. "//content/public/renderer",
  46. "//ipc",
  47. "//services/service_manager/public/cpp",
  48. "//third_party/blink/public:blink",
  49. "//third_party/icu",
  50. ]
  51. if (!is_android) {
  52. deps += [ "//third_party/hunspell" ]
  53. }
  54. }
  55. source_set("unit_tests") {
  56. testonly = true
  57. sources = [
  58. "custom_dictionary_engine_unittest.cc",
  59. "empty_local_interface_provider.cc",
  60. "empty_local_interface_provider.h",
  61. "spellcheck_provider_test.cc",
  62. "spellcheck_provider_test.h",
  63. "spellcheck_provider_unittest.cc",
  64. "spellcheck_worditerator_unittest.cc",
  65. ]
  66. data = [ "//third_party/hunspell_dictionaries/" ]
  67. if (!is_android) {
  68. sources += [ "spellcheck_unittest.cc" ]
  69. }
  70. if (!is_mac && !is_android) {
  71. sources += [
  72. # This tests Chrome's spellchecker which Mac doesn't use.
  73. "spellcheck_multilingual_unittest.cc",
  74. "spellcheck_provider_hunspell_unittest.cc",
  75. ]
  76. }
  77. deps = [
  78. ":renderer",
  79. "//base:i18n",
  80. "//base/test:test_support",
  81. "//components/spellcheck/common",
  82. "//ipc:ipc",
  83. "//testing/gtest",
  84. "//third_party/blink/public:blink",
  85. "//third_party/icu",
  86. ]
  87. if (is_mac) {
  88. sources += [ "spellcheck_provider_mac_unittest.cc" ]
  89. deps += [ "//third_party/hunspell" ]
  90. }
  91. }