| # Copyright 2016 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/build/chrome_build.gni") |
| import("//ios/web/public/js_messaging/optimize_ts.gni") |
| import("//rlz/buildflags/buildflags.gni") |
| |
| source_set("search_engines") { |
| sources = [ |
| "search_engine_java_script_feature.h", |
| "search_engine_java_script_feature.mm", |
| "search_engine_observer_bridge.h", |
| "search_engine_observer_bridge.mm", |
| "search_engine_tab_helper.h", |
| "search_engine_tab_helper.mm", |
| "search_engine_tab_helper_factory.h", |
| "search_engine_tab_helper_factory.mm", |
| "template_url_fetcher_factory.cc", |
| "template_url_fetcher_factory.h", |
| "template_url_service_client_impl.cc", |
| "template_url_service_client_impl.h", |
| "template_url_service_factory.h", |
| "template_url_service_factory.mm", |
| "ui_thread_search_terms_data.h", |
| "ui_thread_search_terms_data.mm", |
| ] |
| deps = [ |
| ":search_engine_js", |
| "//base", |
| "//components/country_codes", |
| "//components/favicon/ios", |
| "//components/google/core/common", |
| "//components/history/core/browser", |
| "//components/keyed_service/core", |
| "//components/keyed_service/ios", |
| "//components/omnibox/browser", |
| "//components/prefs", |
| "//components/search", |
| "//components/search_engines", |
| "//components/version_info", |
| "//ios/chrome/browser/google", |
| "//ios/chrome/browser/history", |
| "//ios/chrome/browser/shared/model/application_context", |
| "//ios/chrome/browser/shared/model/browser_state", |
| "//ios/chrome/browser/shared/public/features:system_flags", |
| "//ios/chrome/browser/webdata_services", |
| "//ios/chrome/common", |
| "//ios/public/provider/chrome/browser/app_distribution:app_distribution_api", |
| "//ios/web/public", |
| "//ios/web/public/js_messaging", |
| "//net", |
| "//rlz/buildflags", |
| "//ui/base", |
| "//url", |
| ] |
| configs += [ "//build/config/compiler:enable_arc" ] |
| |
| if (enable_rlz) { |
| deps += [ "//components/rlz" ] |
| } |
| } |
| |
| source_set("extension_search_engine_data_updater") { |
| sources = [ |
| "extension_search_engine_data_updater.h", |
| "extension_search_engine_data_updater.mm", |
| ] |
| deps = [ |
| ":search_engines_util", |
| "//base", |
| "//components/search_engines", |
| "//ios/chrome/browser/widget_kit:features", |
| "//ios/chrome/common/app_group", |
| ] |
| configs += [ "//build/config/compiler:enable_arc" ] |
| |
| if (ios_enable_widget_kit_extension) { |
| deps += [ "//ios/chrome/browser/widget_kit" ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| testonly = true |
| sources = [ |
| "extension_search_engine_data_updater_unittest.mm", |
| "search_engine_js_unittest.mm", |
| "search_engine_tab_helper_unittest.mm", |
| ] |
| deps = [ |
| ":extension_search_engine_data_updater", |
| ":search_engines", |
| "//base:base", |
| "//base/test:test_support", |
| "//components/favicon/core", |
| "//components/favicon/ios", |
| "//components/search_engines", |
| "//ios/chrome/browser/favicon:favicon", |
| "//ios/chrome/browser/shared/model/browser_state", |
| "//ios/chrome/browser/shared/model/browser_state:test_support", |
| "//ios/chrome/browser/web:web_internal", |
| "//ios/chrome/common/app_group", |
| "//ios/web", |
| "//ios/web/public/test", |
| "//ios/web/public/test/fakes", |
| "//net:test_support", |
| "//testing/gtest", |
| ] |
| } |
| |
| source_set("template_url_service_factory") { |
| # TODO(crbug.com/1382864): This target was added to prevent dependency |
| # cycles for Lens navigation. |
| # Remove this target after fixing the Lens / Web dependency cycle. |
| sources = [ "template_url_service_factory.h" ] |
| deps = [ |
| "//base", |
| "//components/keyed_service/ios", |
| ] |
| configs += [ "//build/config/compiler:enable_arc" ] |
| } |
| |
| source_set("search_engines_util") { |
| sources = [ |
| "search_engines_util.cc", |
| "search_engines_util.h", |
| ] |
| deps = [ |
| "//base", |
| "//components/country_codes", |
| "//components/prefs", |
| "//components/search_engines", |
| ] |
| configs += [ "//build/config/compiler:enable_arc" ] |
| } |
| |
| optimize_ts("search_engine_js") { |
| sources = [ "resources/search_engine.ts" ] |
| |
| deps = [ "//ios/web/public/js_messaging:util_scripts" ] |
| } |
| |
| source_set("eg_app_support+eg2") { |
| configs += [ |
| "//build/config/compiler:enable_arc", |
| "//build/config/ios:xctest_config", |
| ] |
| testonly = true |
| |
| sources = [ |
| "search_engines_app_interface.h", |
| "search_engines_app_interface.mm", |
| ] |
| deps = [ |
| "//base", |
| "//base/test:test_support", |
| "//components/search_engines", |
| "//ios/chrome/browser/search_engines", |
| "//ios/chrome/test/app:test_support", |
| "//ios/testing/earl_grey:eg_app_support+eg2", |
| "//ios/third_party/earl_grey2:app_framework+link", |
| "//testing/gmock", |
| "//testing/gtest:gtest", |
| ] |
| } |
| |
| source_set("eg_test_support+eg2") { |
| configs += [ |
| "//build/config/compiler:enable_arc", |
| "//build/config/ios:xctest_config", |
| ] |
| testonly = true |
| |
| sources = [ |
| "search_engines_app_interface.h", |
| "search_engines_app_interface_stub.mm", |
| ] |
| |
| deps = [ "//ios/testing/earl_grey:eg_test_support+eg2" ] |
| } |