| # 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/buildflag_header.gni") |
| import("//ios/build/chrome_build.gni") |
| |
| buildflag_header("ios_multi_window_buildflags") { |
| header = "multi_window_buildflags.h" |
| header_dir = "ios/chrome/browser/ui/util" |
| flags = [ |
| "IOS_MULTIWINDOW_ENABLED=$ios_enable_multi_window", |
| "IOS_SCENE_STARTUP_ENABLED=$ios_enable_scene_startup", |
| ] |
| } |
| |
| source_set("multiwindow_util") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| |
| sources = [ |
| "multi_window_support.h", |
| "multi_window_support.mm", |
| ] |
| |
| deps = [ |
| ":ios_multi_window_buildflags", |
| "//base", |
| ] |
| } |
| |
| source_set("util") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| sources = [ |
| "CRUILabel+AttributeUtils.h", |
| "CRUILabel+AttributeUtils.mm", |
| "accessibility_close_menu_button.h", |
| "accessibility_close_menu_button.mm", |
| "animation_util.h", |
| "animation_util.mm", |
| "core_text_util.h", |
| "core_text_util.mm", |
| "dynamic_type_util.h", |
| "dynamic_type_util.mm", |
| "force_touch_long_press_gesture_recognizer.h", |
| "force_touch_long_press_gesture_recognizer.mm", |
| "i18n_string.h", |
| "i18n_string.mm", |
| "keyboard_observer_helper.h", |
| "keyboard_observer_helper.mm", |
| "label_link_controller.h", |
| "label_link_controller.mm", |
| "label_observer.h", |
| "label_observer.mm", |
| "layout_guide_names.h", |
| "layout_guide_names.mm", |
| "manual_text_framer.h", |
| "manual_text_framer.mm", |
| "named_guide.h", |
| "named_guide.mm", |
| "named_guide_util.h", |
| "named_guide_util.mm", |
| "optional_property_animator.h", |
| "optional_property_animator.mm", |
| "page_animation_util.h", |
| "page_animation_util.mm", |
| "pasteboard_util.h", |
| "pasteboard_util.mm", |
| "property_animator_group.h", |
| "property_animator_group.mm", |
| "reversed_animation.h", |
| "reversed_animation.mm", |
| "rtl_geometry.h", |
| "rtl_geometry.mm", |
| "text_frame.h", |
| "text_frame.mm", |
| "text_region_mapper.h", |
| "text_region_mapper.mm", |
| "top_view_controller.h", |
| "top_view_controller.mm", |
| "transparent_link_button.h", |
| "transparent_link_button.mm", |
| "ui_util.h", |
| "ui_util.mm", |
| "uikit_ui_util.h", |
| "uikit_ui_util.mm", |
| "unicode_util.h", |
| "unicode_util.mm", |
| ] |
| deps = [ |
| "//base", |
| "//base:i18n", |
| "//ios/chrome/app:tests_hook", |
| "//ios/chrome/app/strings:ios_strings_grit", |
| "//ios/chrome/browser:utils", |
| "//ios/chrome/browser/ui:feature_flags", |
| "//ios/chrome/browser/ui/toolbar/public:feature_flags", |
| "//ios/chrome/common:timing", |
| "//ios/chrome/common/ui/util", |
| "//ios/chrome/common/ui/util:dynamic_type_util", |
| "//ios/web:threads", |
| "//ios/web/public/thread:thread", |
| "//ios/web/thread", |
| "//net", |
| "//ui/base", |
| "//ui/gfx", |
| "//url", |
| ] |
| libs = [ |
| "Accelerate.framework", |
| "CoreGraphics.framework", |
| "QuartzCore.framework", |
| ] |
| } |
| |
| source_set("terms_util") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| sources = [ |
| "terms_util.h", |
| "terms_util.mm", |
| ] |
| deps = [ |
| ":terms_resources", |
| "//base", |
| "//ios/chrome/browser", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| testonly = true |
| sources = [ |
| "CRUILabel+AttributeUtils_unittest.mm", |
| "core_text_util_unittest.mm", |
| "force_touch_long_press_gesture_recognizer_unittest.mm", |
| "label_link_controller_unittest.mm", |
| "label_observer_unittest.mm", |
| "manual_text_framer_unittest.mm", |
| "named_guide_unittest.mm", |
| "optional_property_animator_unittest.mm", |
| "terms_util_unittest.mm", |
| "text_region_mapper_unittest.mm", |
| "ui_util_unittest.mm", |
| "uikit_ui_util_unittest.mm", |
| ] |
| deps = [ |
| ":terms_util", |
| ":util", |
| "//base", |
| "//ios/third_party/material_components_ios", |
| "//testing/gtest", |
| "//third_party/ocmock", |
| "//url", |
| ] |
| } |
| |
| bundle_data("terms_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/util:terms_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("test_support") { |
| defines = [ "CHROME_EARL_GREY_1" ] |
| configs += [ "//build/config/compiler:enable_arc" ] |
| testonly = true |
| sources = [ |
| "keyboard_observer_helper_app_interface.h", |
| "keyboard_observer_helper_app_interface.mm", |
| ] |
| deps = [ |
| ":util", |
| "//base", |
| "//base/test:test_support", |
| "//ios/chrome/test/app:test_support", |
| "//ios/testing/earl_grey:earl_grey_support", |
| ] |
| } |
| |
| source_set("eg_app_support+eg2") { |
| defines = [ "CHROME_EARL_GREY_2" ] |
| configs += [ |
| "//build/config/compiler:enable_arc", |
| "//build/config/ios:xctest_config", |
| ] |
| testonly = true |
| sources = [ |
| "keyboard_observer_helper_app_interface.h", |
| "keyboard_observer_helper_app_interface.mm", |
| ] |
| deps = [ |
| ":util", |
| "//base", |
| "//base/test:test_support", |
| "//ios/chrome/test/app:test_support", |
| ] |
| } |
| |
| source_set("eg_test_support+eg2") { |
| defines = [ "CHROME_EARL_GREY_2" ] |
| configs += [ |
| "//build/config/compiler:enable_arc", |
| "//build/config/ios:xctest_config", |
| ] |
| testonly = true |
| sources = [ "keyboard_observer_helper_app_interface.h" ] |
| deps = [ |
| ":util", |
| "//ios/testing/earl_grey:eg_test_support+eg2", |
| "//ios/third_party/earl_grey2:test_lib", |
| ] |
| } |