| # Copyright 2017 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//ios/web/public/js_messaging/optimize_ts.gni") |
| |
| source_set("browser") { |
| sources = [ |
| "ios_language_detection_tab_helper.h", |
| "ios_language_detection_tab_helper.mm", |
| "ios_language_detection_tab_helper_observer_bridge.h", |
| "ios_language_detection_tab_helper_observer_bridge.mm", |
| "language_detection_java_script_feature.h", |
| "language_detection_java_script_feature.mm", |
| "string_clipping_util.cc", |
| "string_clipping_util.h", |
| ] |
| |
| deps = [ |
| ":language_detection_js", |
| "//base", |
| "//components/language/core/browser", |
| "//components/prefs", |
| "//components/translate/core/browser:translate_pref_names", |
| "//components/translate/core/common", |
| "//components/translate/core/language_detection", |
| "//ios/web/common", |
| "//ios/web/public", |
| "//ios/web/public/js_messaging", |
| "//net", |
| ] |
| } |
| |
| optimize_ts("language_detection_js") { |
| visibility = [ ":browser" ] |
| |
| sources = [ "resources/language_detection.ts" ] |
| |
| deps = [ |
| "//ios/web/public/js_messaging:gcrweb", |
| "//ios/web/public/js_messaging:util_scripts", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "ios_language_detection_tab_helper_observer_bridge_unittest.mm", |
| "ios_language_detection_tab_helper_unittest.mm", |
| "language_detection_javascript_unittest.mm", |
| "string_clipping_util_unittest.cc", |
| ] |
| deps = [ |
| ":browser", |
| "//base/test:test_support", |
| "//components/language_detection/core", |
| "//components/prefs", |
| "//components/prefs:test_support", |
| "//components/translate/core/browser:translate_pref_names", |
| "//components/translate/core/common", |
| "//components/translate/core/language_detection", |
| "//ios/web/public/test:javascript_test", |
| "//ios/web/public/test:util", |
| "//ios/web/public/test/fakes", |
| "//testing/gtest", |
| ] |
| } |