# 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. source_set("public") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "translate_constants.h", "translate_constants.mm", "translate_infobar_delegate_observer_bridge.h", "translate_infobar_delegate_observer_bridge.mm", "translate_infobar_metrics_recorder.h", "translate_infobar_metrics_recorder.mm", ] deps = [ "//base", "//components/translate/core/browser", ] } source_set("translate") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "chrome_ios_translate_client.h", "chrome_ios_translate_client.mm", "language_selection_context.h", "language_selection_context.mm", "language_selection_delegate.h", "language_selection_handler.h", "translate_accept_languages_factory.cc", "translate_accept_languages_factory.h", "translate_infobar_controller.h", "translate_infobar_controller.mm", "translate_infobar_tags.h", "translate_option_selection_delegate.h", "translate_option_selection_handler.h", "translate_ranker_factory.cc", "translate_ranker_factory.h", "translate_ranker_metrics_provider.cc", "translate_ranker_metrics_provider.h", "translate_service_ios.h", "translate_service_ios.mm", ] deps = [ ":public", "//base", "//components/infobars/core", "//components/keyed_service/core", "//components/keyed_service/ios", "//components/language/core/browser", "//components/metrics", "//components/prefs", "//components/strings", "//components/translate/core/browser", "//components/translate/core/common", "//components/translate/ios/browser", "//components/web_resource", "//ios/chrome/app/strings", "//ios/chrome/app/theme", "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/infobars", "//ios/chrome/browser/infobars:public", "//ios/chrome/browser/language", "//ios/chrome/browser/ui/infobars:feature_flags", "//ios/chrome/browser/ui/infobars:infobars_ui", "//ios/chrome/browser/ui/infobars/coordinators:translate", "//ios/chrome/browser/ui/translate:translate_ui", "//ios/chrome/browser/ui/util", "//ios/components/webui:url_constants", "//ios/web/public/deprecated", "//third_party/metrics_proto", "//ui/base", "//ui/gfx", "//url", ] allow_circular_includes_from = [ "//ios/chrome/browser/infobars" ] } source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "js_language_detection_manager_unittest.mm", "translate_infobar_delegate_observer_bridge_unittest.mm", "translate_service_ios_unittest.cc", ] deps = [ ":public", ":translate", "//base", "//base/test:test_support", "//components/language/core/browser", "//components/translate/core/browser:test_support", "//components/translate/ios/browser", "//ios/chrome/browser", "//ios/chrome/browser/web:test_support", "//ios/chrome/common", "//ios/public/provider/chrome/browser:test_support", "//ios/web/public", "//ios/web/public/deprecated", "//ios/web/public/test:util", "//skia", "//testing/gmock", "//testing/gtest", "//url:url", ] } source_set("test_support") { testonly = true sources = [ "fake_translate_infobar_delegate.h", "fake_translate_infobar_delegate.mm", ] deps = [ "//components/infobars/core", "//components/sync_preferences:test_support", "//components/translate/core/browser:browser", "//components/translate/core/browser:test_support", "//ios/chrome/test/fakes:fakes", "//testing/gmock", "//third_party/metrics_proto", ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("eg_app_support+eg2") { defines = [ "CHROME_EARL_GREY_2" ] configs += [ "//build/config/compiler:enable_arc", "//build/config/ios:xctest_config", ] testonly = true sources = [ "translate_app_interface.h", "translate_app_interface.mm", ] deps = [ "//base:base", "//components/translate/core/browser:browser", "//components/translate/core/common:common", "//components/translate/ios/browser:browser", "//ios/chrome/browser/browser_state:browser_state", "//ios/chrome/browser/translate:translate", "//ios/chrome/test/app:test_support", "//ios/chrome/test/fakes:fakes", "//net:net", ] } source_set("eg_test_support+eg2") { defines = [ "CHROME_EARL_GREY_2" ] configs += [ "//build/config/compiler:enable_arc", "//build/config/ios:xctest_config", ] testonly = true sources = [ "translate_app_interface.h", "translate_app_interface_stub.mm", ] deps = [ "//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/testing/earl_grey:eg_test_support+eg2", "//ios/third_party/earl_grey2:test_lib", ] }