# Copyright 2014 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("//build/config/ui.gni") static_library("browser") { sources = [ "language_state.cc", "language_state.h", "page_translated_details.h", "translate_accept_languages.cc", "translate_accept_languages.h", "translate_browser_metrics.cc", "translate_browser_metrics.h", "translate_client.h", "translate_download_manager.cc", "translate_download_manager.h", "translate_driver.h", "translate_error_details.h", "translate_event_details.cc", "translate_event_details.h", "translate_language_list.cc", "translate_language_list.h", "translate_manager.cc", "translate_manager.h", "translate_pref_names.cc", "translate_pref_names.h", "translate_prefs.cc", "translate_prefs.h", "translate_ranker.h", "translate_ranker_impl.cc", "translate_ranker_impl.h", "translate_script.cc", "translate_script.h", "translate_step.h", "translate_ui_delegate.cc", "translate_ui_delegate.h", "translate_url_fetcher.cc", "translate_url_fetcher.h", "translate_url_util.cc", "translate_url_util.h", ] deps = [ "//base", "//base:i18n", "//components/assist_ranker", "//components/assist_ranker/proto", "//components/data_use_measurement/core", "//components/keyed_service/core", "//components/language/core/browser", "//components/language_usage_metrics", "//components/metrics", "//components/pref_registry", "//components/prefs", "//components/resources:components_resources", "//components/strings", "//components/translate/core/common", "//components/variations", "//google_apis", "//net", "//services/metrics/public/cpp:metrics_cpp", "//services/metrics/public/cpp:ukm_builders", "//third_party/icu", "//third_party/metrics_proto", "//ui/base", "//url", ] if (!use_aura) { sources += [ "translate_infobar_delegate.cc", "translate_infobar_delegate.h", ] deps += [ "//components/infobars/core" ] } if (is_mac) { sources += [ "options_menu_model.cc", "options_menu_model.h", ] } } source_set("unit_tests") { testonly = true sources = [ "language_state_unittest.cc", "mock_translate_client.cc", "mock_translate_client.h", "mock_translate_driver.cc", "mock_translate_driver.h", "mock_translate_ranker.cc", "mock_translate_ranker.h", "translate_accept_languages_unittest.cc", "translate_browser_metrics_unittest.cc", "translate_language_list_unittest.cc", "translate_manager_unittest.cc", "translate_prefs_unittest.cc", "translate_ranker_impl_unittest.cc", "translate_script_unittest.cc", "translate_ui_delegate_unittest.cc", "translate_url_util_unittest.cc", ] deps = [ ":browser", "//base", "//components/assist_ranker", "//components/assist_ranker/proto", "//components/infobars/core", "//components/language/core/browser", "//components/pref_registry:pref_registry", "//components/prefs", "//components/prefs:test_support", "//components/sync_preferences:test_support", "//components/translate/core/common", "//components/ukm", "//components/ukm:test_support", "//components/variations", "//net:test_support", "//services/metrics/public/cpp:ukm_builders", "//testing/gtest", "//third_party/metrics_proto", "//ui/base", ] }