# 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.
source_set("toolbar") {
sources = [
"adaptive_toolbar_coordinator+subclassing.h",
"adaptive_toolbar_coordinator.h",
"adaptive_toolbar_coordinator.mm",
"adaptive_toolbar_mediator.h",
"adaptive_toolbar_mediator.mm",
"primary_toolbar_coordinator.h",
"primary_toolbar_coordinator.mm",
"secondary_toolbar_coordinator.h",
"secondary_toolbar_coordinator.mm",
"secondary_toolbar_mediator.h",
"secondary_toolbar_mediator.mm",
"toolbar_coordinatee.h",
"toolbar_coordinator.h",
"toolbar_coordinator.mm",
"toolbar_mediator.h",
"toolbar_mediator.mm",
]
deps = [
":toolbar_ui",
"//base",
"//components/bookmarks/browser",
"//components/bookmarks/common",
"//components/google/core/common",
"//components/open_from_clipboard",
"//components/prefs",
"//components/prefs/ios",
"//components/search_engines",
"//components/segmentation_platform/embedder/default_model",
"//components/segmentation_platform/public",
"//components/strings",
"//components/ukm/ios:ukm_url_recorder",
"//ios/chrome/app/strings",
"//ios/chrome/browser/autocomplete/model",
"//ios/chrome/browser/bookmarks/model",
"//ios/chrome/browser/bookmarks/ui_bundled:core",
"//ios/chrome/browser/contextual_panel/model",
"//ios/chrome/browser/contextual_panel/model:public",
"//ios/chrome/browser/feature_engagement/model",
"//ios/chrome/browser/first_run/model",
"//ios/chrome/browser/iph_for_new_chrome_user/model",
"//ios/chrome/browser/location_bar/ui_bundled",
"//ios/chrome/browser/main/model",
"//ios/chrome/browser/ntp/model",
"//ios/chrome/browser/ntp/model:util",
"//ios/chrome/browser/ntp/ui_bundled",
"//ios/chrome/browser/ntp/ui_bundled:coordinator",
"//ios/chrome/browser/omnibox/model",
"//ios/chrome/browser/orchestrator/ui_bundled",
"//ios/chrome/browser/overlays/model",
"//ios/chrome/browser/policy/model:policy_util",
"//ios/chrome/browser/prerender/model",
"//ios/chrome/browser/reading_list/model",
"//ios/chrome/browser/search_engines/model",
"//ios/chrome/browser/search_engines/model:search_engines_util",
"//ios/chrome/browser/segmentation_platform/model",
"//ios/chrome/browser/shared/coordinator/chrome_coordinator",
"//ios/chrome/browser/shared/coordinator/layout_guide",
"//ios/chrome/browser/shared/coordinator/scene:scene_state_header",
"//ios/chrome/browser/shared/model/application_context",
"//ios/chrome/browser/shared/model/browser_state",
"//ios/chrome/browser/shared/model/prefs",
"//ios/chrome/browser/shared/model/prefs:pref_names",
"//ios/chrome/browser/shared/model/profile",
"//ios/chrome/browser/shared/model/url",
"//ios/chrome/browser/shared/model/url:constants",
"//ios/chrome/browser/shared/model/utils",
"//ios/chrome/browser/shared/model/web_state_list",
"//ios/chrome/browser/shared/public/commands",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/shared/public/features:system_flags",
"//ios/chrome/browser/shared/ui/symbols",
"//ios/chrome/browser/shared/ui/util",
"//ios/chrome/browser/ui/broadcaster",
"//ios/chrome/browser/ui/fullscreen",
"//ios/chrome/browser/ui/lens:lens_availability",
"//ios/chrome/browser/ui/lens:lens_entrypoint",
"//ios/chrome/browser/ui/menu",
"//ios/chrome/browser/ui/omnibox",
"//ios/chrome/browser/ui/omnibox:omnibox_internal",
"//ios/chrome/browser/ui/omnibox/popup",
"//ios/chrome/browser/ui/popup_menu/public",
"//ios/chrome/browser/ui/toolbar/buttons",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/chrome/browser/ui/toolbar/public:constants",
"//ios/chrome/browser/ui/toolbar/tab_groups/coordinator",
"//ios/chrome/browser/url_loading/model",
"//ios/chrome/browser/url_loading/model:url_loading_params_header",
"//ios/chrome/browser/voice/ui_bundled:voice",
"//ios/chrome/browser/web/model",
"//ios/chrome/common",
"//ios/chrome/common/ui/colors",
"//ios/chrome/common/ui/util",
"//ios/components/webui:url_constants",
"//ios/public/provider/chrome/browser/lens:lens_api",
"//ios/public/provider/chrome/browser/voice_search:voice_search_api",
"//ios/web",
"//services/metrics/public/cpp:ukm_builders",
"//ui/base",
]
allow_circular_includes_from =
[ "//ios/chrome/browser/location_bar/ui_bundled" ]
}
source_set("toolbar_ui") {
sources = [
"adaptive_toolbar_menus_provider.h",
"adaptive_toolbar_view.h",
"adaptive_toolbar_view_controller+subclassing.h",
"adaptive_toolbar_view_controller.h",
"adaptive_toolbar_view_controller.mm",
"adaptive_toolbar_view_controller_delegate.h",
"primary_toolbar_view.h",
"primary_toolbar_view.mm",
"primary_toolbar_view_controller.h",
"primary_toolbar_view_controller.mm",
"primary_toolbar_view_controller_delegate.h",
"secondary_toolbar_consumer.h",
"secondary_toolbar_keyboard_state_provider.h",
"secondary_toolbar_view.h",
"secondary_toolbar_view.mm",
"secondary_toolbar_view_controller.h",
"secondary_toolbar_view_controller.mm",
"toolbar_consumer.h",
"toolbar_progress_bar.h",
"toolbar_progress_bar.mm",
]
deps = [
"//base",
"//ios/chrome/app/strings",
"//ios/chrome/browser/keyboard/ui_bundled",
"//ios/chrome/browser/ntp/ui_bundled:ui_bundled",
"//ios/chrome/browser/orchestrator/ui_bundled",
"//ios/chrome/browser/shared/public/commands",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/shared/ui/symbols",
"//ios/chrome/browser/shared/ui/util",
"//ios/chrome/browser/shared/ui/util:util_swift",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui_util",
"//ios/chrome/browser/ui/fullscreen",
"//ios/chrome/browser/ui/fullscreen:ui",
"//ios/chrome/browser/ui/omnibox:features",
"//ios/chrome/browser/ui/popup_menu/public",
"//ios/chrome/browser/ui/sharing",
"//ios/chrome/browser/ui/toolbar/buttons",
"//ios/chrome/browser/ui/toolbar/public",
"//ios/chrome/browser/ui/toolbar/public:constants",
"//ios/chrome/browser/ui/toolbar/tab_groups/ui",
"//ios/chrome/common:timing",
"//ios/chrome/common/ui/colors",
"//ios/chrome/common/ui/util",
"//ios/third_party/material_components_ios",
"//ui/base",
]
frameworks = [ "UIKit.framework" ]
}
source_set("unit_tests") {
testonly = true
sources = [
"adaptive_toolbar_mediator_unittest.mm",
"toolbar_coordinator_unittest.mm",
]
deps = [
":toolbar",
":toolbar_ui",
"//base",
"//base/test:test_support",
"//components/bookmarks/browser",
"//components/bookmarks/common",
"//components/bookmarks/test",
"//components/open_from_clipboard",
"//components/open_from_clipboard:test_support",
"//components/prefs",
"//components/prefs:test_support",
"//components/search_engines",
"//components/sync_preferences:test_support",
"//ios/chrome/app/strings",
"//ios/chrome/browser/bookmarks/model",
"//ios/chrome/browser/omnibox/model",
"//ios/chrome/browser/policy/model:policy_util",
"//ios/chrome/browser/search_engines/model",
"//ios/chrome/browser/shared/model/application_context",
"//ios/chrome/browser/shared/model/browser/test:test_support",
"//ios/chrome/browser/shared/model/prefs:pref_names",
"//ios/chrome/browser/shared/model/profile/test",
"//ios/chrome/browser/shared/model/url:constants",
"//ios/chrome/browser/shared/model/web_state_list",
"//ios/chrome/browser/shared/model/web_state_list/test:test_support",
"//ios/chrome/browser/shared/public/commands",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/shared/ui/symbols",
"//ios/chrome/browser/shared/ui/util",
"//ios/chrome/browser/ui/menu",
"//ios/chrome/browser/ui/popup_menu/public",
"//ios/chrome/browser/ui/toolbar/buttons",
"//ios/chrome/browser/ui/toolbar/test",
"//ios/chrome/browser/web/model",
"//ios/chrome/test:test_support",
"//ios/chrome/test/providers/voice_search",
"//ios/public/provider/chrome/browser/voice_search:voice_search_api",
"//ios/web",
"//ios/web/public/test",
"//ios/web/public/test/fakes",
"//testing/gtest",
"//third_party/ocmock",
"//ui/base",
]
}
source_set("eg_app_support+eg2") {
configs += [ "//build/config/ios:xctest_config" ]
testonly = true
sources = [
"adaptive_toolbar_app_interface.h",
"adaptive_toolbar_app_interface.mm",
]
deps = [
"//ios/chrome/browser/infobars/model",
"//ios/chrome/browser/ui/infobars:eg_app_support+eg2",
"//ios/chrome/test/app:test_support",
"//ios/testing:nserror_support",
]
}
source_set("eg_test_support+eg2") {
configs += [ "//build/config/ios:xctest_config" ]
testonly = true
sources = [
"adaptive_toolbar_app_interface.h",
"adaptive_toolbar_app_interface_stub.mm",
]
deps = [ "//ios/testing/earl_grey:eg_test_support+eg2" ]
}
source_set("eg2_tests") {
configs += [ "//build/config/ios:xctest_config" ]
testonly = true
sources = [
"adaptive_toolbar_egtest.mm",
"toolbar_egtest.mm",
]
deps = [
":eg_test_support+eg2",
"//components/strings",
"//ios/chrome/app/strings",
"//ios/chrome/browser/shared/model/prefs:pref_names",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/shared/ui/util",
"//ios/chrome/browser/start_surface/ui_bundled:feature_flags",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
"//ios/chrome/browser/ui/popup_menu:constants",
"//ios/chrome/browser/ui/toolbar/public:constants",
"//ios/chrome/common/ui/elements:form_input_accessory",
"//ios/chrome/test:eg_test_support+eg2",
"//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/web/common:features",
"//ios/web/public/test:element_selector",
"//ios/web/public/test/http_server",
"//net:test_support",
"//ui/base",
]
frameworks = [ "UIKit.framework" ]
}