blob: d993ecf6727dc694ec7fbdb7ab6799cb44be2468 [file] [log] [blame]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//components/spellcheck/spellcheck_build_features.gni")
source_set("renderer") {
sources = [
"custom_dictionary_engine.cc",
"custom_dictionary_engine.h",
"spellcheck.cc",
"spellcheck.h",
"spellcheck_language.cc",
"spellcheck_language.h",
"spellcheck_provider.cc",
"spellcheck_provider.h",
"spellcheck_worditerator.cc",
"spellcheck_worditerator.h",
"spelling_engine.h",
]
if (use_browser_spellchecker) {
sources += [
"platform_spelling_engine.cc",
"platform_spelling_engine.h",
]
}
if (has_spellcheck_panel) {
sources += [
"spellcheck_panel.cc",
"spellcheck_panel.h",
]
}
if (!is_android) {
sources += [
"hunspell_engine.cc",
"hunspell_engine.h",
]
}
public_deps = [
"//components/spellcheck:buildflags",
]
deps = [
"//base:i18n",
"//components/spellcheck/common",
"//content/public/common",
"//content/public/renderer",
"//ipc",
"//services/service_manager/public/cpp",
"//third_party/blink/public:blink",
"//third_party/icu",
]
if (!is_android) {
deps += [ "//third_party/hunspell" ]
}
}
source_set("unit_tests") {
testonly = true
sources = [
"custom_dictionary_engine_unittest.cc",
"empty_local_interface_provider.cc",
"empty_local_interface_provider.h",
"spellcheck_provider_mac_unittest.cc",
"spellcheck_provider_test.cc",
"spellcheck_provider_test.h",
"spellcheck_provider_unittest.cc",
"spellcheck_worditerator_unittest.cc",
]
data = [
"//third_party/hunspell_dictionaries/",
]
if (!is_android) {
sources += [ "spellcheck_unittest.cc" ]
}
if (!is_mac && !is_android) {
sources += [
# This tests Chrome's spellchecker which Mac doesn't use.
"spellcheck_multilingual_unittest.cc",
"spellcheck_provider_hunspell_unittest.cc",
]
}
deps = [
":renderer",
"//base:i18n",
"//base/test:test_support",
"//components/spellcheck/common",
"//ipc:ipc",
"//testing/gtest",
"//third_party/blink/public:blink",
"//third_party/icu",
]
if (is_mac && !is_ios) {
deps += [ "//third_party/hunspell" ]
}
}