# Copyright 2015 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/features.gni")
import("//ios/web/public/js_messaging/optimize_ts.gni")
source_set("browser") {
sources = [
"ios_translate_driver.h",
"ios_translate_driver.mm",
"language_detection_model_service.h",
"language_detection_model_service.mm",
"translate_controller.h",
"translate_controller.mm",
"translate_java_script_feature.h",
"translate_java_script_feature.mm",
]
deps = [
":injected_js",
"//base",
"//components/keyed_service/core",
"//components/language/ios/browser",
"//components/language_detection/core:language_detection",
"//components/prefs",
"//components/translate/core/browser",
"//components/translate/core/browser:translate_model_service",
"//components/translate/core/common",
"//components/translate/core/language_detection",
"//components/ukm/ios:ukm_url_recorder",
"//ios/web/public",
"//ios/web/public/annotations",
"//ios/web/public/js_messaging",
"//net",
"//net/traffic_annotation:traffic_annotation",
"//services/network/public/cpp:cpp_base",
"//ui/base",
"//url",
]
}
optimize_ts("injected_js") {
visibility = [ ":browser" ]
sources = [ "resources/translate_ios.ts" ]
deps = [
"//ios/web/public/js_messaging:gcrweb",
"//ios/web/public/js_messaging:util_scripts",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"ios_translate_driver_unittest.mm",
"translate_controller_unittest.mm",
]
deps = [
":browser",
"//base",
"//base/test:test_support",
"//components/language/core/browser",
"//components/language/ios/browser",
"//components/resources",
"//components/sync_preferences:test_support",
"//components/translate/core/browser",
"//components/translate/core/browser:test_support",
"//ios/web/public/js_messaging",
"//ios/web/public/test",
"//ios/web/public/test:test_fixture",
"//testing/gtest",
"//ui/base",
"//url",
]
}