# Copyright 2016 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/ios/rules.gni") source_set("ui") { sources = [ "UIView+SizeClassSupport.h", "UIView+SizeClassSupport.mm", "animation_util.h", "animation_util.mm", "background_generator.h", "background_generator.mm", "file_locations.h", "file_locations.mm", "native_content_controller.h", "native_content_controller.mm", "orientation_limiting_navigation_controller.h", "orientation_limiting_navigation_controller.mm", "prerender_final_status.h", "reversed_animation.h", "reversed_animation.mm", "side_swipe_gesture_recognizer.h", "side_swipe_gesture_recognizer.mm", "url_loader.h", ] public_deps = [ ":network_activity_indicator_manager", ":ui_util", "//ios/chrome/common/ui_util", ] deps = [ "//base", "//base:i18n", "//components/sessions", "//ios/chrome/browser", "//ios/chrome/browser/store_kit", "//ios/chrome/browser/ui/commands", "//ios/web", "//ui/base", ] allow_circular_includes_from = [ "//ios/chrome/browser/ui/commands" ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("network_activity_indicator_manager") { sources = [ "network_activity_indicator_manager.h", "network_activity_indicator_manager.mm", ] deps = [ "//base", ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("ui_util") { sources = [ "rtl_geometry.h", "rtl_geometry.mm", "ui_util.h", "ui_util.mm", "uikit_ui_util.h", "uikit_ui_util.mm", ] deps = [ ":feature_flags", "//base", "//base:i18n", "//ios/chrome/app:tests_hook", "//ios/chrome/browser", "//ios/chrome/browser/ui/toolbar/public:feature_flags", "//ios/web", "//ui/base", "//ui/gfx", ] libs = [ "Accelerate.framework", "CoreGraphics.framework", "QuartzCore.framework", ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("feature_flags") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "ui_feature_flags.cc", "ui_feature_flags.h", ] deps = [ "//base", ] } source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "browser_view_controller_helper_unittest.mm", "browser_view_controller_unittest.mm", "chrome_web_view_factory_unittest.mm", "file_locations_unittest.mm", "key_commands_provider_unittest.mm", "native_content_controller_unittest.mm", "network_activity_indicator_manager_unittest.mm", "open_in_controller_unittest.mm", "open_in_toolbar_unittest.mm", "page_not_available_controller_unittest.mm", "ui_util_unittest.mm", "uikit_ui_util_unittest.mm", ] deps = [ ":native_content_controller_test_xib", ":resources_unit_tests", ":ui", ":ui_internal", "//base", "//base/test:test_support", "//components/bookmarks/browser", "//components/bookmarks/test", "//components/payments/core", "//components/prefs:test_support", "//components/search_engines", "//components/sessions", "//components/toolbar:test_support", "//ios/chrome/app/strings", "//ios/chrome/browser", "//ios/chrome/browser/bookmarks", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/favicon", "//ios/chrome/browser/find_in_page", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/sessions", "//ios/chrome/browser/snapshots", "//ios/chrome/browser/store_kit", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui/activity_services", "//ios/chrome/browser/ui/alert_coordinator", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/toolbar", "//ios/chrome/browser/ui/toolbar/public", "//ios/chrome/browser/ui/toolbar/test", "//ios/chrome/browser/web:web_internal", "//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list:test_support", "//ios/chrome/test:test_support", "//ios/net", "//ios/testing:ocmock_support", "//ios/web", "//ios/web/public/test", "//ios/web/public/test/fakes", "//net", "//net:test_support", "//testing/gmock", "//testing/gtest", "//third_party/ocmock", "//ui/base", "//ui/base:test_support", "//url", ] } bundle_data_ib_file("native_content_controller_test_xib") { visibility = [ ":unit_tests" ] testonly = true source = "native_content_controller_test.xib" } bundle_data("resources") { sources = [ # On iOS, the terms of service file need to be loaded from the application # bundle, not from a datapack. As GetTermsOfServicePath() returns path to # those files, they are added to //ios/chrome/browser/ui:resources. "//components/resources/terms/terms_am.html", "//components/resources/terms/terms_ar.html", "//components/resources/terms/terms_bg.html", "//components/resources/terms/terms_bn.html", "//components/resources/terms/terms_ca.html", "//components/resources/terms/terms_cs.html", "//components/resources/terms/terms_da.html", "//components/resources/terms/terms_de.html", "//components/resources/terms/terms_el.html", "//components/resources/terms/terms_en-GB.html", "//components/resources/terms/terms_en.html", "//components/resources/terms/terms_es-419.html", "//components/resources/terms/terms_es.html", "//components/resources/terms/terms_et.html", "//components/resources/terms/terms_fa.html", "//components/resources/terms/terms_fi.html", "//components/resources/terms/terms_fil.html", "//components/resources/terms/terms_fr.html", "//components/resources/terms/terms_gu.html", "//components/resources/terms/terms_he.html", "//components/resources/terms/terms_hi.html", "//components/resources/terms/terms_hr.html", "//components/resources/terms/terms_hu.html", "//components/resources/terms/terms_id.html", "//components/resources/terms/terms_it.html", "//components/resources/terms/terms_ja.html", "//components/resources/terms/terms_kn.html", "//components/resources/terms/terms_ko.html", "//components/resources/terms/terms_lt.html", "//components/resources/terms/terms_lv.html", "//components/resources/terms/terms_ml.html", "//components/resources/terms/terms_mr.html", "//components/resources/terms/terms_nb.html", "//components/resources/terms/terms_nl.html", "//components/resources/terms/terms_pl.html", "//components/resources/terms/terms_pt-BR.html", "//components/resources/terms/terms_pt-PT.html", "//components/resources/terms/terms_ro.html", "//components/resources/terms/terms_ru.html", "//components/resources/terms/terms_sk.html", "//components/resources/terms/terms_sl.html", "//components/resources/terms/terms_sr.html", "//components/resources/terms/terms_sv.html", "//components/resources/terms/terms_sw.html", "//components/resources/terms/terms_ta.html", "//components/resources/terms/terms_te.html", "//components/resources/terms/terms_th.html", "//components/resources/terms/terms_tr.html", "//components/resources/terms/terms_uk.html", "//components/resources/terms/terms_vi.html", "//components/resources/terms/terms_zh-CN.html", "//components/resources/terms/terms_zh-TW.html", ] outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}", ] } source_set("external_files") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "external_file_controller.h", "external_file_controller.mm", "external_file_remover.h", "external_file_remover_factory.h", "external_file_remover_factory.mm", "external_file_remover_impl.h", "external_file_remover_impl.mm", ] deps = [ ":ui", "//base", "//components/bookmarks/browser", "//components/keyed_service/core", "//components/keyed_service/ios", "//components/sessions", "//ios/chrome/browser", "//ios/chrome/browser/bookmarks", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/sessions", "//ios/chrome/browser/tabs", ] } source_set("ui_internal") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "browser_view_controller.h", "browser_view_controller.mm", "browser_view_controller_dependency_factory.h", "browser_view_controller_dependency_factory.mm", "browser_view_controller_helper.h", "browser_view_controller_helper.mm", "chrome_web_view_factory.h", "chrome_web_view_factory.mm", "fade_truncated_label.h", "fade_truncated_label.mm", "key_commands_provider.h", "key_commands_provider.mm", "open_in_controller.h", "open_in_controller.mm", "open_in_controller_testing.h", "open_in_toolbar.h", "open_in_toolbar.mm", "page_not_available_controller.h", "page_not_available_controller.mm", ] deps = [ ":notifications", ":resources", ":ui", "resources:custom_row_voice", "resources:custom_row_voice_pressed", "resources:keyboard_bg_portrait_tablet", "resources:keyboard_button", "//base", "//base:i18n", "//components/bookmarks/browser", "//components/favicon/ios", "//components/feature_engagement", "//components/image_fetcher/ios", "//components/infobars/core", "//components/language/ios/browser", "//components/payments/core", "//components/prefs", "//components/reading_list/core", "//components/search_engines", "//components/sessions", "//components/signin/core/browser", "//components/signin/ios/browser", "//components/signin/ios/browser:active_state_manager", "//components/strings", "//components/toolbar", "//components/url_formatter", "//ios/chrome/app:tests_hook", "//ios/chrome/app/strings", "//ios/chrome/browser", "//ios/chrome/browser/app_launcher", "//ios/chrome/browser/autofill:autofill_internal", "//ios/chrome/browser/bookmarks", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/download", "//ios/chrome/browser/favicon", "//ios/chrome/browser/feature_engagement", "//ios/chrome/browser/find_in_page", "//ios/chrome/browser/first_run", "//ios/chrome/browser/geolocation:geolocation_internal", "//ios/chrome/browser/infobars", "//ios/chrome/browser/language", "//ios/chrome/browser/metrics:metrics_internal", "//ios/chrome/browser/net", "//ios/chrome/browser/passwords", "//ios/chrome/browser/prefs", "//ios/chrome/browser/prerender", "//ios/chrome/browser/reading_list", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/sessions", "//ios/chrome/browser/sessions:serialisation", "//ios/chrome/browser/signin", "//ios/chrome/browser/snapshots", "//ios/chrome/browser/ssl", "//ios/chrome/browser/store_kit", "//ios/chrome/browser/tabs", "//ios/chrome/browser/translate", "//ios/chrome/browser/ui:feature_flags", "//ios/chrome/browser/ui/activity_services:coordinator", "//ios/chrome/browser/ui/activity_services/requirements", "//ios/chrome/browser/ui/alert_coordinator", "//ios/chrome/browser/ui/app_launcher", "//ios/chrome/browser/ui/authentication", "//ios/chrome/browser/ui/authentication/consent_bump", "//ios/chrome/browser/ui/autofill:autofill", "//ios/chrome/browser/ui/bookmarks", "//ios/chrome/browser/ui/browser_container", "//ios/chrome/browser/ui/browser_container:ui", "//ios/chrome/browser/ui/bubble", "//ios/chrome/browser/ui/colors", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/content_suggestions", "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant", "//ios/chrome/browser/ui/context_menu", "//ios/chrome/browser/ui/dialogs:dialogs_internal", "//ios/chrome/browser/ui/download", "//ios/chrome/browser/ui/elements:elements_internal", "//ios/chrome/browser/ui/external_search", "//ios/chrome/browser/ui/find_bar", "//ios/chrome/browser/ui/first_run", "//ios/chrome/browser/ui/fullscreen", "//ios/chrome/browser/ui/fullscreen:feature_flags", "//ios/chrome/browser/ui/fullscreen:ui", "//ios/chrome/browser/ui/history", "//ios/chrome/browser/ui/history_popup:coordinator", "//ios/chrome/browser/ui/history_popup/requirements", "//ios/chrome/browser/ui/image_util", "//ios/chrome/browser/ui/keyboard", "//ios/chrome/browser/ui/main:feature_flags", "//ios/chrome/browser/ui/main_content:main_content_ui", "//ios/chrome/browser/ui/main_content:main_content_ui_broadcasting_util", "//ios/chrome/browser/ui/ntp", "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/chrome/browser/ui/ntp/recent_tabs", "//ios/chrome/browser/ui/omnibox:omnibox_internal", "//ios/chrome/browser/ui/overscroll_actions", "//ios/chrome/browser/ui/page_info:coordinator", "//ios/chrome/browser/ui/page_info/requirements", "//ios/chrome/browser/ui/payments", "//ios/chrome/browser/ui/popup_menu", "//ios/chrome/browser/ui/presenters", "//ios/chrome/browser/ui/print", "//ios/chrome/browser/ui/qr_scanner:coordinator", "//ios/chrome/browser/ui/qr_scanner/requirements", "//ios/chrome/browser/ui/reading_list", "//ios/chrome/browser/ui/recent_tabs", "//ios/chrome/browser/ui/sad_tab:coordinator", "//ios/chrome/browser/ui/settings/sync_utils", "//ios/chrome/browser/ui/signin_interaction/public", "//ios/chrome/browser/ui/snackbar", "//ios/chrome/browser/ui/stack_view", "//ios/chrome/browser/ui/static_content", "//ios/chrome/browser/ui/tab_switcher", "//ios/chrome/browser/ui/tabs", "//ios/chrome/browser/ui/tabs:coordinator", "//ios/chrome/browser/ui/tabs/requirements", "//ios/chrome/browser/ui/toolbar:toolbar_ui", "//ios/chrome/browser/ui/toolbar:toolbar_ui_broadcasting_util", "//ios/chrome/browser/ui/toolbar/adaptive", "//ios/chrome/browser/ui/toolbar/adaptive:adaptive_ui", "//ios/chrome/browser/ui/toolbar/buttons", "//ios/chrome/browser/ui/toolbar/clean:toolbar", "//ios/chrome/browser/ui/toolbar/clean:toolbar_ui", "//ios/chrome/browser/ui/toolbar/legacy", "//ios/chrome/browser/ui/toolbar/public", "//ios/chrome/browser/ui/toolbar/public:feature_flags", "//ios/chrome/browser/ui/tools_menu", "//ios/chrome/browser/ui/tools_menu:configuration", "//ios/chrome/browser/ui/tools_menu/public", "//ios/chrome/browser/ui/translate", "//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/voice", "//ios/chrome/browser/upgrade", "//ios/chrome/browser/voice:voice", "//ios/chrome/browser/web", "//ios/chrome/browser/web:tab_helper_delegates", "//ios/chrome/browser/web:web_internal", "//ios/chrome/browser/web_state_list", "//ios/chrome/browser/webui", "//ios/chrome/common", "//ios/net", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/ui", "//ios/public/provider/chrome/browser/voice", "//ios/third_party/material_components_ios", "//ios/web", "//ios/web/public", "//net", "//third_party/google_toolbox_for_mac", "//ui/base", "//ui/gfx", "//url", # Fake dependencies to break cycles "//ios/chrome/browser/ui/settings", ] public_deps = [ ":external_files", "//ios/chrome/browser/ui/side_swipe", "//ios/chrome/browser/ui/toolbar", ] allow_circular_includes_from = [ "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/chrome/browser/ui/overscroll_actions", "//ios/chrome/browser/ui/settings", "//ios/chrome/browser/ui/stack_view", "//ios/chrome/browser/ui/tab_switcher", "//ios/chrome/browser/ui/tabs:coordinator", "//ios/chrome/browser/ui/toolbar", "//ios/chrome/browser/web:web_internal", ] libs = [ "AssetsLibrary.framework", "MessageUI.framework", "MobileCoreServices.framework", "Photos.framework", "QuartzCore.framework", "StoreKit.framework", "UIKit.framework", "WebKit.framework", ] } # TODO(crbug.com/778008): Remove this target. source_set("notifications") { sources = [ "location_bar_notification_names.h", "location_bar_notification_names.mm", ] configs += [ "//build/config/compiler:enable_arc" ] } bundle_data("resources_unit_tests") { visibility = [ ":unit_tests" ] testonly = true sources = [ "//ios/chrome/test/data/testbadpass.pkpass", "//ios/chrome/test/data/testpass.pkpass", ] outputs = [ "{{bundle_resources_dir}}/ios/chrome/test/data/{{source_file_part}}", ] } source_set("eg_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "browser_view_controller_egtest.mm", "keyboard_commands_egtest.mm", ] deps = [ ":ui", ":ui_internal", "//base", "//base/test:test_support", "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser/ui/bookmarks:bookmarks_ui", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/popup_menu:constants", "//ios/chrome/browser/ui/table_view", "//ios/chrome/browser/ui/tools_menu/public", "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/earl_grey:earl_grey+link", "//ios/web:earl_grey_test_support", "//ios/web/public/test", "//ios/web/public/test/http_server", "//ui/base", "//url", ] libs = [ "UIKit.framework", "WebKit.framework", "XCTest.framework", ] } source_set("perf_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "omnibox_perftest.mm", ] deps = [ "//base", "//base/test:test_support", "//components/toolbar:test_support", "//ios/chrome/browser/autocomplete", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/store_kit", "//ios/chrome/browser/tabs", "//ios/chrome/browser/tabs:tabs_internal", "//ios/chrome/browser/ui/omnibox:omnibox_internal", "//ios/chrome/browser/ui/toolbar", "//ios/chrome/browser/ui/toolbar/clean:toolbar", "//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", ] libs = [ "UIKit.framework" ] }