# 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", "image_util.h", "image_util.mm", "native_content_controller.h", "native_content_controller.mm", "network_activity_indicator_manager.h", "network_activity_indicator_manager.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 = [ ":ui_util", "//ios/chrome/browser/ui/captive_portal", "//ios/chrome/browser/ui/util:constraints_ui", ] deps = [ "//base", "//base:i18n", "//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("ui_util") { sources = [ "rtl_geometry.h", "rtl_geometry.mm", "ui_util.h", "ui_util.mm", "uikit_ui_util.h", "uikit_ui_util.mm", ] deps = [ "//base", "//base:i18n", "//ios/chrome/browser", "//ios/chrome/browser/ui/toolbar:toolbar_base_feature", "//ios/web", "//ui/base", "//ui/gfx", ] libs = [ "Accelerate.framework", "CoreGraphics.framework", "QuartzCore.framework", ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "browser_container_view_unittest.mm", "browser_view_controller_unittest.mm", "chrome_web_view_factory_unittest.mm", "file_locations_unittest.mm", "fullscreen_controller_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", ":test_support", ":ui", ":ui_internal", "//base", "//base/test:test_support", "//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/bookmarks:features", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/find_in_page", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/sessions", "//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:test_support", "//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/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("ui_internal") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "browser_container_view.h", "browser_container_view.mm", "browser_view_controller.h", "browser_view_controller.mm", "browser_view_controller_dependency_factory.h", "browser_view_controller_dependency_factory.mm", "chrome_web_view_factory.h", "chrome_web_view_factory.mm", "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", "fade_truncated_label.h", "fade_truncated_label.mm", "fullscreen_controller.h", "fullscreen_controller.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", "prerender_delegate.h", ] deps = [ ":resources", ":ui", "resources:custom_row_voice", "resources:custom_row_voice_pressed", "resources:default_favicon", "resources:default_favicon_incognito", "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/keyed_service/ios", "//components/payments/core", "//components/prefs", "//components/reading_list/core", "//components/search_engines", "//components/sessions", "//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/bookmarks", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/content_suggestions", "//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/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/snapshots", "//ios/chrome/browser/snapshots:snapshots_internal", "//ios/chrome/browser/ssl", "//ios/chrome/browser/store_kit", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui/activity_services:coordinator", "//ios/chrome/browser/ui/activity_services/requirements", "//ios/chrome/browser/ui/alert_coordinator", "//ios/chrome/browser/ui/authentication", "//ios/chrome/browser/ui/bookmarks", "//ios/chrome/browser/ui/bubble", "//ios/chrome/browser/ui/colors", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant", "//ios/chrome/browser/ui/context_menu", "//ios/chrome/browser/ui/contextual_search", "//ios/chrome/browser/ui/dialogs:dialogs_internal", "//ios/chrome/browser/ui/elements:elements_internal", "//ios/chrome/browser/ui/find_bar", "//ios/chrome/browser/ui/first_run", "//ios/chrome/browser/ui/history", "//ios/chrome/browser/ui/history_popup:coordinator", "//ios/chrome/browser/ui/history_popup/requirements", "//ios/chrome/browser/ui/keyboard", "//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/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/sad_tab:coordinator", "//ios/chrome/browser/ui/settings/sync_utils", "//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:coordinator", "//ios/chrome/browser/ui/tabs/requirements", "//ios/chrome/browser/ui/toolbar:toolbar_base_feature", "//ios/chrome/browser/ui/tools_menu", "//ios/chrome/browser/ui/tools_menu:configuration", "//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/voice", "//ios/chrome/browser/upgrade", "//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:user_agent", "//net", "//third_party/google_toolbox_for_mac", "//ui/base", "//ui/gfx", "//url", ] public_deps = [ "//ios/chrome/browser/ui/side_swipe", "//ios/chrome/browser/ui/toolbar", ] allow_circular_includes_from = [ "//ios/chrome/browser/snapshots:snapshots_internal", "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/chrome/browser/ui/overscroll_actions", "//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", "PassKit.framework", "Photos.framework", "QuartzCore.framework", "StoreKit.framework", "UIKit.framework", "WebKit.framework", ] } source_set("test_support") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "browser_view_controller_testing.h", "browser_view_controller_testing.mm", ] deps = [ ":ui_internal", "//ios/chrome/browser/ui/toolbar", "//ios/chrome/browser/ui/toolbar:test_support", ] } 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}}", ] } # These tests use external URLs and hit network. They will fail if the network # is unavailable. Reference to crbug.com/694662. source_set("external_url_eg_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "external_url_error_page_egtest.mm", ] deps = [ "//components/strings", "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/web:earl_grey_test_support", "//ios/web/public/test", "//ios/web/public/test/http_server", "//ui/base", ] libs = [ "XCTest.framework" ] } source_set("eg_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "browser_view_controller_egtest.mm", "fullscreen_egtest.mm", "keyboard_commands_egtest.mm", ] deps = [ ":ui", ":ui_internal", "//base", "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser/bookmarks:features", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/tools_menu", "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/testing:ios_test_support", "//ios/third_party/earl_grey", "//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/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" ] }