# 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.
import("//build/config/apple/swift_source_set.gni")
swift_source_set("popup_swift") {
bridge_header = "popup_swift_bridge.h"
sources = [ "shared/omnibox_pedal.swift" ]
deps = [
":popup_ui_protocols",
"//base",
"//ios/chrome/app/strings",
"//ios/chrome/app/theme",
"//ios/chrome/browser/net/model:crurl",
"//ios/chrome/common/ui/colors:swift",
"//ui/base",
]
frameworks = [
"Foundation.framework",
"SwiftUI.framework",
]
}
source_set("popup") {
sources = [
"autocomplete_controller_observer_bridge.h",
"autocomplete_controller_observer_bridge.mm",
"omnibox_pedal_annotator.h",
"omnibox_pedal_annotator.mm",
"omnibox_popup_coordinator.h",
"omnibox_popup_coordinator.mm",
"omnibox_popup_mediator+Testing.h",
"omnibox_popup_mediator.h",
"omnibox_popup_mediator.mm",
"omnibox_popup_presenter.h",
"omnibox_popup_presenter.mm",
"omnibox_popup_provider.h",
"omnibox_popup_view_ios.h",
"omnibox_popup_view_ios.mm",
"omnibox_popup_view_suggestions_delegate.h",
"pedal_section_extractor.h",
"pedal_section_extractor.mm",
"pedal_suggestion_wrapper.h",
"pedal_suggestion_wrapper.mm",
"popup_debug_info_consumer.h",
"popup_debug_info_view_controller.h",
"popup_debug_info_view_controller.mm",
"remote_suggestions_service_observer_bridge.h",
"remote_suggestions_service_observer_bridge.mm",
]
deps = [
":popup_icon",
":popup_internal",
":popup_swift",
":popup_ui",
":popup_ui_protocols",
"//base",
"//components/favicon/core",
"//components/feature_engagement/public",
"//components/image_fetcher/core",
"//components/omnibox/browser",
"//components/open_from_clipboard",
"//components/password_manager/core/browser",
"//components/search_engines",
"//components/strings:components_strings_grit",
"//components/variations",
"//ios/chrome/app/strings",
"//ios/chrome/browser/autocomplete/model",
"//ios/chrome/browser/default_browser/model",
"//ios/chrome/browser/default_browser/model:default_browser_interest_signals",
"//ios/chrome/browser/default_promo/ui_bundled:coordinator",
"//ios/chrome/browser/download/model",
"//ios/chrome/browser/favicon/model",
"//ios/chrome/browser/favicon/ui_bundled",
"//ios/chrome/browser/feature_engagement/model",
"//ios/chrome/browser/history/model",
"//ios/chrome/browser/net/model:crurl",
"//ios/chrome/browser/ntp/model",
"//ios/chrome/browser/ntp/model:util",
"//ios/chrome/browser/ntp/shared/metrics:home_metrics",
"//ios/chrome/browser/policy/model:policy_util",
"//ios/chrome/browser/search_engines/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",
"//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:constants",
"//ios/chrome/browser/shared/model/web_state_list: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/symbols:symbols_views",
"//ios/chrome/browser/shared/ui/util",
"//ios/chrome/browser/shared/ui/util:util_swift",
"//ios/chrome/browser/ui/main:default_browser_scene_agent",
"//ios/chrome/browser/ui/menu",
"//ios/chrome/browser/ui/omnibox",
"//ios/chrome/browser/ui/omnibox:features",
"//ios/chrome/browser/ui/omnibox:omnibox_util",
"//ios/chrome/browser/ui/omnibox/popup/carousel",
"//ios/chrome/browser/ui/omnibox/popup/debugger",
"//ios/chrome/browser/ui/omnibox/popup/row/actions",
"//ios/chrome/browser/ui/settings/clear_browsing_data:features",
"//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/common/ui/colors",
"//ios/chrome/common/ui/favicon",
"//ios/chrome/common/ui/util",
"//ios/chrome/common/ui/util:image_util",
"//ios/web/public:public",
"//net",
"//ui/base",
]
public_deps = [ "//ios/third_party/material_components_ios" ]
}
source_set("popup_accessibility_identifier_constants") {
sources = [
"omnibox_popup_accessibility_identifier_constants.h",
"omnibox_popup_accessibility_identifier_constants.mm",
]
}
source_set("popup_ui") {
sources = [
"omnibox_popup_view_controller.h",
"omnibox_popup_view_controller.mm",
]
deps = [
":popup_accessibility_identifier_constants",
":popup_ui_protocols",
"//base",
"//components/favicon/core",
"//components/omnibox/common",
"//ios/chrome/browser/download/model",
"//ios/chrome/browser/favicon/ui_bundled",
"//ios/chrome/browser/net/model:crurl",
"//ios/chrome/browser/shared/public/features:system_flags",
"//ios/chrome/browser/shared/ui/elements",
"//ios/chrome/browser/shared/ui/util",
"//ios/chrome/browser/shared/ui/util:util_swift",
"//ios/chrome/browser/ui/content_suggestions/cells:constants",
"//ios/chrome/browser/ui/omnibox:features",
"//ios/chrome/browser/ui/omnibox:omnibox_popup_shared",
"//ios/chrome/browser/ui/omnibox:omnibox_util",
"//ios/chrome/browser/ui/omnibox/popup/carousel",
"//ios/chrome/browser/ui/omnibox/popup/row",
"//ios/chrome/browser/ui/omnibox/popup/row/actions",
"//ios/chrome/browser/ui/toolbar/buttons",
"//ios/chrome/common/ui/colors",
"//ios/chrome/common/ui/util",
"//net",
"//ui/base",
]
}
source_set("popup_icon") {
sources = [
"favicon_retriever.h",
"image_retriever.h",
"omnibox_icon_view.h",
"omnibox_icon_view.mm",
"simple_omnibox_icon.h",
"simple_omnibox_icon.mm",
]
deps = [
":popup_ui_protocols",
"//base",
"//ios/chrome/browser/net/model:crurl",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/shared/ui/symbols",
"//ios/chrome/browser/shared/ui/symbols:symbols_views",
"//ios/chrome/browser/ui/omnibox:features",
"//ios/chrome/browser/ui/omnibox:omnibox_suggestion_icon_util",
"//ios/chrome/common/ui/colors",
"//ios/public/provider/chrome/browser/branded_images:branded_images_api",
"//url",
]
}
source_set("popup_internal") {
sources = [
"autocomplete_match_formatter.h",
"autocomplete_match_formatter.mm",
"autocomplete_suggestion_group_impl.h",
"autocomplete_suggestion_group_impl.mm",
"omnibox_icon_formatter.h",
"omnibox_icon_formatter.mm",
]
deps = [
":popup_icon",
":popup_swift",
":popup_ui",
":popup_ui_protocols",
"//base",
"//components/omnibox/browser",
"//ios/chrome/browser/net/model:crurl",
"//ios/chrome/browser/shared/model/browser_state",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/ui/omnibox:features",
"//ios/chrome/browser/ui/omnibox:omnibox_util",
"//ios/chrome/browser/ui/omnibox/popup/row/actions",
"//ios/chrome/common/ui/colors",
"//ios/third_party/material_components_ios",
]
}
source_set("popup_ui_protocols") {
sources = [
"autocomplete_result_consumer.h",
"autocomplete_suggestion.h",
"content_providing.h",
"omnibox_icon.h",
"omnibox_pedal.h",
"popup_match_preview_delegate.h",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"omnibox_pedal_annotator_unittest.mm",
"omnibox_popup_mediator_unittest.mm",
"omnibox_popup_view_controller_unittest.mm",
"pedal_section_extractor_unittest.mm",
]
deps = [
":popup",
":popup_accessibility_identifier_constants",
":popup_icon",
":popup_internal",
":popup_swift",
":popup_ui",
":popup_ui_protocols",
"//base",
"//base/test:test_support",
"//components/feature_engagement/public",
"//components/feature_engagement/test:test_support",
"//components/image_fetcher/core",
"//components/omnibox/browser",
"//components/omnibox/browser:test_support",
"//components/password_manager/core/browser",
"//components/search_engines",
"//components/search_engines:test_support",
"//ios/chrome/browser/favicon/model",
"//ios/chrome/browser/net/model:crurl",
"//ios/chrome/browser/shared/model/profile/test",
"//ios/chrome/common/ui/favicon",
"//ios/chrome/test:test_support",
"//testing/gtest",
"//third_party/ocmock",
"//ui/base",
]
}
source_set("eg2_tests") {
configs += [ "//build/config/ios:xctest_config" ]
testonly = true
sources = [
"omnibox_popup_egtest.mm",
"omnibox_popup_pedal_egtest.mm",
]
deps = [
":popup_accessibility_identifier_constants",
"//base",
"//components/omnibox/common",
"//components/strings",
"//ios/chrome/app/strings:ios_strings_grit",
"//ios/chrome/browser/history/ui_bundled:constants",
"//ios/chrome/browser/shared/model/url:constants",
"//ios/chrome/browser/shared/public/features",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
"//ios/chrome/browser/ui/omnibox:eg_test_support+eg2",
"//ios/chrome/browser/ui/omnibox:features",
"//ios/chrome/browser/ui/omnibox:omnibox_popup_shared",
"//ios/chrome/browser/ui/settings:constants",
"//ios/chrome/browser/ui/settings/cells:clear_browsing_data_constants",
"//ios/chrome/browser/ui/settings/clear_browsing_data:features",
"//ios/chrome/browser/ui/settings/password:eg_test_support+eg2",
"//ios/chrome/common/ui/confirmation_alert:constants",
"//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2",
"//net:test_support",
"//ui/base",
"//ui/strings",
]
frameworks = [ "UIKit.framework" ]
}