blob: 4b5a254221dff5441a7789645c8770d898e16861 [file] [log] [blame]
# Copyright 2017 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("omnibox") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"location_bar_delegate.h",
"omnibox_left_image_consumer.h",
"web_omnibox_edit_controller.cc",
"web_omnibox_edit_controller.h",
]
deps = [
"//base",
"//components/omnibox/browser",
"//ui/base",
]
}
source_set("omnibox_popup_shared") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"omnibox_constants.h",
"omnibox_constants.mm",
]
}
# This util file must be separate from the below
# omnibox_util file because it is used in showcase. This
# means that its dependencies should be limited, avoiding
# components code.
source_set("omnibox_suggestion_icon_util") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"omnibox_suggestion_icon_util.h",
"omnibox_suggestion_icon_util.mm",
]
deps = [
"resources:answer_calculator",
"resources:answer_conversion",
"resources:answer_dictionary",
"resources:answer_local_time",
"resources:answer_stock",
"resources:answer_sunrise",
"resources:answer_translation",
"resources:answer_when_is",
"resources:background_solid",
"resources:favicon_fallback",
"resources:omnibox_completion_bookmark",
"resources:omnibox_completion_default_favicon",
"resources:omnibox_completion_history",
"resources:omnibox_popup_recent_query",
"resources:search",
"//base",
]
}
# See the comment above on omnibox_suggestion_icon_util
# for why these two targets are separated.
source_set("omnibox_util") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"omnibox_util.h",
"omnibox_util.mm",
]
deps = [
":omnibox_suggestion_icon_util",
"resources:omnibox_completion_bookmark",
"resources:omnibox_completion_default_favicon",
"resources:omnibox_completion_history",
"resources:search",
"//base",
"//components/omnibox/browser",
"//components/security_state/core",
"//ios/chrome/browser/ui:feature_flags",
]
public_deps = [
":omnibox_icon_type_constants",
"//ios/chrome/app/theme",
]
}
# This target can also be used on EG2 tests, so it should only contain constants
source_set("omnibox_icon_type_constants") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"omnibox_icon_type.h",
"omnibox_icon_type.mm",
]
deps = [ "//base" ]
}
source_set("omnibox_internal") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"chrome_omnibox_client_ios.h",
"chrome_omnibox_client_ios.mm",
"omnibox_consumer.h",
"omnibox_container_view.h",
"omnibox_container_view.mm",
"omnibox_coordinator.h",
"omnibox_coordinator.mm",
"omnibox_mediator.h",
"omnibox_mediator.mm",
"omnibox_text_change_delegate.h",
"omnibox_text_field_delegate.h",
"omnibox_text_field_experimental.h",
"omnibox_text_field_experimental.mm",
"omnibox_text_field_ios.h",
"omnibox_text_field_ios.mm",
"omnibox_text_field_legacy.h",
"omnibox_text_field_legacy.mm",
"omnibox_text_field_paste_delegate.h",
"omnibox_text_field_paste_delegate.mm",
"omnibox_view_controller.h",
"omnibox_view_controller.mm",
"omnibox_view_ios.h",
"omnibox_view_ios.mm",
"web_omnibox_edit_controller_impl.h",
"web_omnibox_edit_controller_impl.mm",
]
deps = [
":omnibox",
":omnibox_popup_shared",
":omnibox_util",
"resources:omnibox_clear_icon",
"//base",
"//components/favicon/ios",
"//components/open_from_clipboard:",
"//components/resources",
"//components/search_engines",
"//components/security_state/core",
"//components/strings",
"//ios/chrome/app/intents",
"//ios/chrome/app/strings",
"//ios/chrome/browser",
"//ios/chrome/browser/autocomplete",
"//ios/chrome/browser/bookmarks",
"//ios/chrome/browser/bookmarks:bookmarks_utils",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/favicon",
"//ios/chrome/browser/main:public",
"//ios/chrome/browser/net",
"//ios/chrome/browser/prerender",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/sessions",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/default_promo",
"//ios/chrome/browser/ui/default_promo:utils",
"//ios/chrome/browser/ui/fullscreen",
"//ios/chrome/browser/ui/location_bar:constants",
"//ios/chrome/browser/ui/main:default_browser_scene_agent",
"//ios/chrome/browser/ui/main:scene_state_header",
"//ios/chrome/browser/ui/omnibox/popup",
"//ios/chrome/browser/ui/orchestrator:orchestrator",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/chrome/browser/ui/util",
"//ios/chrome/common",
"//ios/chrome/common/ui/colors",
"//ios/chrome/common/ui/favicon",
"//ios/chrome/common/ui/util",
"//ios/chrome/common/ui/util:dynamic_type_util",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/chrome/browser/images",
"//ios/web",
"//net",
"//skia",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
"//url",
]
public_deps = [
":omnibox_icon_type_constants",
"//components/omnibox/browser",
]
frameworks = [
"CoreText.framework",
"MobileCoreServices.framework",
"QuartzCore.framework",
"UIKit.framework",
]
}
source_set("app_support+eg2") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [
"omnibox_app_interface.h",
"omnibox_app_interface.mm",
]
deps = [
"//base",
"//components/google/core/common",
"//components/variations:variations",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/ui/omnibox/popup:popup_ui",
"//ios/chrome/test/app:test_support",
"//ios/testing/earl_grey:eg_app_support+eg2",
"//ios/third_party/earl_grey2:app_framework+link",
"//ios/web/public",
"//ios/web/public/navigation",
"//net:test_support",
"//ui/base",
"//ui/base:test_support",
]
}
source_set("test_support+eg2") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [ "omnibox_app_interface.h" ]
}
source_set("eg2_tests") {
defines = [ "CHROME_EARL_GREY_2" ]
configs += [
"//build/config/compiler:enable_arc",
"//build/config/ios:xctest_config",
]
testonly = true
sources = [ "omnibox_egtest.mm" ]
deps = [
":test_support+eg2",
"//ios/chrome/app/strings:ios_strings_grit",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
"//ios/chrome/browser/ui/omnibox/popup:popup_accessibility_identifier_constants",
"//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib",
"//net:test_support",
"//ui/base",
]
frameworks = [ "UIKit.framework" ]
}
source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"omnibox_text_field_ios_experimental_unittest.mm",
"omnibox_text_field_ios_unittest.mm",
"omnibox_view_ios_unittest.mm",
]
deps = [
":omnibox",
":omnibox_internal",
":resources_unit_tests",
"//base",
"//base/test:test_support",
"//ios/chrome/app/strings",
"//ios/chrome/browser",
"//ios/chrome/browser/browser_state:test_support",
"//ios/chrome/browser/ui/util",
"//testing/gtest",
"//third_party/ocmock",
"//ui/base",
]
}
bundle_data("resources_unit_tests") {
visibility = [ ":unit_tests" ]
testonly = true
sources = [ "//ios/chrome/test/data/omnibox/selected_ranges.txt" ]
outputs = [ "{{bundle_resources_dir}}/" +
"ios/chrome/test/data/omnibox/{{source_file_part}}" ]
}
source_set("perf_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [ "omnibox_perftest.mm" ]
deps = [
":omnibox_internal",
"//base",
"//base/test:test_support",
"//components/omnibox/browser:test_support",
"//ios/chrome/browser/autocomplete",
"//ios/chrome/browser/browser_state:test_support",
"//ios/chrome/browser/main:test_support",
"//ios/chrome/browser/search_engines",
"//ios/chrome/browser/tabs",
"//ios/chrome/browser/tabs:tabs_internal",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/location_bar:location_bar_model_delegate",
"//ios/chrome/browser/ui/toolbar",
"//ios/chrome/browser/ui/toolbar:toolbar_ui",
"//ios/chrome/browser/ui/util",
"//ios/chrome/browser/web_state_list",
"//ios/chrome/browser/web_state_list:test_support",
"//ios/chrome/test/base:perf_test_support",
"//ios/web/public/test/fakes",
"//testing/gtest",
"//third_party/ocmock",
"//ui/base:test_support",
]
frameworks = [ "UIKit.framework" ]
}