diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-09-18 14:34:04 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-10-04 11:15:27 +0000 |
commit | e6430e577f105ad8813c92e75c54660c4985026e (patch) | |
tree | 88115e5d1fb471fea807111924dcccbeadbf9e4f /chromium/ios | |
parent | 53d399fe6415a96ea6986ec0d402a9c07da72453 (diff) | |
download | qtwebengine-chromium-e6430e577f105ad8813c92e75c54660c4985026e.tar.gz |
BASELINE: Update Chromium to 61.0.3163.99
Change-Id: I8452f34574d88ca2b27af9bd56fc9ff3f16b1367
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/ios')
192 files changed, 4626 insertions, 1769 deletions
diff --git a/chromium/ios/BUILD.gn b/chromium/ios/BUILD.gn index 2ab6c24459e..43b032d442d 100644 --- a/chromium/ios/BUILD.gn +++ b/chromium/ios/BUILD.gn @@ -15,6 +15,7 @@ declare_args() { v8_experimental_extra_library_files = [] v8_enable_gdbjit = false v8_imminent_deprecation_warnings = false + v8_check_microtasks_scopes_consistency = false } # Prevent warnings for unused build args above. @@ -22,6 +23,7 @@ assert(v8_extra_library_files != 0) assert(v8_experimental_extra_library_files != 0) assert(!v8_enable_gdbjit) assert(!v8_imminent_deprecation_warnings) +assert(!v8_check_microtasks_scopes_consistency) # This list all targets that needs to be build as part of "gn_all" on iOS. # This list should generally only include executables, but since some code @@ -32,13 +34,12 @@ group("all") { if (is_cronet_build) { deps = [ "//components/cronet/ios:cronet_package", - "//ios/crnet:crnet_framework", - "//ios/crnet/test:crnet_test", ] } else { deps = [ - # List all the targets that need to be build on iOS by default. + # List all the targets that need to be built on iOS by default. "//ios/chrome/app:chrome", + "//ios/chrome/content_widget_extension", "//ios/chrome/search_widget_extension", "//ios/chrome/share_extension", "//ios/chrome/today_extension", @@ -47,10 +48,11 @@ group("all") { "//ios/web/shell:ios_web_shell", "//ios/web_view/shell:ios_web_view_shell", - # List all the test targets that need to be build on iOS by default. + # List all the test targets that need to be built on iOS by default. "//ios/chrome/test:all_tests", "//ios/chrome/test/earl_grey:all_tests", "//ios/clean/chrome/test:all_tests", + "//ios/components:all_tests", "//ios/net:all_tests", "//ios/showcase:all_tests", "//ios/testing:all_tests", diff --git a/chromium/ios/build/chrome_build.gni b/chromium/ios/build/chrome_build.gni index d4a6e6b326a..9b2004ff5ee 100644 --- a/chromium/ios/build/chrome_build.gni +++ b/chromium/ios/build/chrome_build.gni @@ -10,6 +10,7 @@ declare_args() { # Enable today extension. ios_enable_today_extension = true ios_enable_search_widget_extension = true + ios_enable_content_widget_extension = true # Enable share extension. ios_enable_share_extension = true diff --git a/chromium/ios/chrome/app/BUILD.gn b/chromium/ios/chrome/app/BUILD.gn index dada6e635f4..4d493793608 100644 --- a/chromium/ios/chrome/app/BUILD.gn +++ b/chromium/ios/chrome/app/BUILD.gn @@ -29,6 +29,7 @@ source_set("app") { } source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "chrome_app_startup_parameters_unittest.mm", @@ -113,6 +114,7 @@ compile_plist("entitlements") { } source_set("app_internal") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "application_mode.h", "chrome_app_startup_parameters.h", @@ -143,12 +145,14 @@ source_set("app_internal") { "//components/crash/core/common", "//components/favicon/core", "//components/favicon_base", + "//components/feature_engagement_tracker", "//components/handoff", "//components/history/core/browser", "//components/infobars/core", "//components/keyed_service/core", "//components/keyed_service/ios", "//components/metrics", + "//components/ntp_snippets", "//components/prefs", "//components/proxy_config", "//components/signin/core/browser", @@ -174,6 +178,7 @@ source_set("app_internal") { "//ios/chrome/browser/crash_report", "//ios/chrome/browser/crash_report:crash_report_internal", "//ios/chrome/browser/favicon", + "//ios/chrome/browser/feature_engagement_tracker", "//ios/chrome/browser/first_run", "//ios/chrome/browser/geolocation", "//ios/chrome/browser/geolocation:geolocation_internal", @@ -181,8 +186,8 @@ source_set("app_internal") { "//ios/chrome/browser/memory", "//ios/chrome/browser/metrics", "//ios/chrome/browser/metrics:metrics_internal", - "//ios/chrome/browser/native_app_launcher:native_app_launcher_internal", "//ios/chrome/browser/net", + "//ios/chrome/browser/ntp_snippets", "//ios/chrome/browser/omaha", "//ios/chrome/browser/prefs", "//ios/chrome/browser/reading_list", @@ -219,7 +224,6 @@ source_set("app_internal") { "//ios/net", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/distribution", - "//ios/public/provider/chrome/browser/native_app_launcher", "//ios/public/provider/chrome/browser/signin", "//ios/public/provider/chrome/browser/user_feedback", "//ios/third_party/material_roboto_font_loader_ios", @@ -244,6 +248,7 @@ source_set("app_internal") { } source_set("main") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "chrome_exe_main.mm", ] @@ -280,6 +285,9 @@ ios_app_bundle("chrome") { if (ios_enable_search_widget_extension) { deps += [ ":search_widget_extension_bundle" ] } + if (ios_enable_content_widget_extension) { + deps += [ ":content_widget_extension_bundle" ] + } if (ios_enable_share_extension) { deps += [ ":share_extension_bundle" ] } @@ -317,6 +325,20 @@ if (current_toolchain == default_toolchain) { } } + if (ios_enable_content_widget_extension) { + bundle_data("content_widget_extension_bundle") { + public_deps = [ + "//ios/chrome/content_widget_extension", + ] + sources = [ + "$root_out_dir/content_widget_extension.appex", + ] + outputs = [ + "{{bundle_plugins_dir}}/{{source_file_part}}", + ] + } + } + if (ios_enable_search_widget_extension) { bundle_data("search_widget_extension_bundle") { public_deps = [ diff --git a/chromium/ios/chrome/app/application_delegate/BUILD.gn b/chromium/ios/chrome/app/application_delegate/BUILD.gn index e823432d281..3644c118a86 100644 --- a/chromium/ios/chrome/app/application_delegate/BUILD.gn +++ b/chromium/ios/chrome/app/application_delegate/BUILD.gn @@ -60,7 +60,7 @@ source_set("unit_tests") { "//ios/public/provider/chrome/browser/user_feedback:test_support", "//ios/testing:ocmock_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//net:test_support", "//testing/gtest", "//third_party/ocmock", @@ -96,16 +96,19 @@ source_set("application_delegate_internal") { ":application_delegate", "//base", "//components/crash/core/common", + "//components/feature_engagement_tracker", "//components/handoff", "//components/metrics", "//components/prefs", "//ios/chrome/app", "//ios/chrome/app/safe_mode", "//ios/chrome/app/spotlight", + "//ios/chrome/app/startup", "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/crash_report", "//ios/chrome/browser/device_sharing", + "//ios/chrome/browser/feature_engagement_tracker", "//ios/chrome/browser/geolocation", "//ios/chrome/browser/metrics", "//ios/chrome/browser/metrics:metrics_internal", @@ -115,6 +118,7 @@ source_set("application_delegate_internal") { "//ios/chrome/browser/ui", "//ios/chrome/browser/ui:ui_internal", "//ios/chrome/browser/ui/authentication", + "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/main", "//ios/chrome/common/app_group:main_app", "//ios/net", diff --git a/chromium/ios/chrome/app/resources/BUILD.gn b/chromium/ios/chrome/app/resources/BUILD.gn index 1a2f4d5716c..0834a77b64a 100644 --- a/chromium/ios/chrome/app/resources/BUILD.gn +++ b/chromium/ios/chrome/app/resources/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. import("//build/config/chrome_build.gni") +import("//build/config/ios/imageset.gni") import("//build/config/ios/rules.gni") import("//build/config/locales.gni") import("//ios/chrome/app/resources/ios_chrome_repack.gni") @@ -90,32 +91,28 @@ bundle_data("chromium_icons") { ] } -bundle_data("quick_action_icons") { +imageset("launchscreen_app_logo") { sources = [ - "quick_action_new_incognito_tab@2x.png", - "quick_action_new_incognito_tab@3x.png", - "quick_action_new_tab@2x.png", - "quick_action_new_tab@3x.png", - "quick_action_qr_scanner@2x.png", - "quick_action_qr_scanner@3x.png", - "quick_action_voice_search@2x.png", - "quick_action_voice_search@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", + "launchscreen_images.xcassets/launchscreen_app_logo.imageset/Contents.json", + "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo.png", + "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo@2x.png", + "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo@3x.png", ] } -bundle_data("launchscreen_assets") { +imageset("launchscreen_brand_name") { sources = [ - "launchscreen_images.xcassets/Contents.json", - "launchscreen_images.xcassets/launchscreen_app_logo.imageset/Contents.json", - "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo.png", "launchscreen_images.xcassets/launchscreen_brand_name.imageset/Contents.json", "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name.png", + "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name@2x.png", + "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name@3x.png", ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", +} + +group("launchscreen_assets") { + public_deps = [ + ":launchscreen_app_logo", + ":launchscreen_brand_name", ] } @@ -138,3 +135,44 @@ generate_localizable_strings("system_strings") { ios_packed_resources_target, ] } + +imageset("quick_action_new_incognito_tab") { + sources = [ + "quick_action_new_incognito_tab.imageset/Contents.json", + "quick_action_new_incognito_tab.imageset/quick_action_new_incognito_tab@2x.png", + "quick_action_new_incognito_tab.imageset/quick_action_new_incognito_tab@3x.png", + ] +} + +imageset("quick_action_new_tab") { + sources = [ + "quick_action_new_tab.imageset/Contents.json", + "quick_action_new_tab.imageset/quick_action_new_tab@2x.png", + "quick_action_new_tab.imageset/quick_action_new_tab@3x.png", + ] +} + +imageset("quick_action_qr_scanner") { + sources = [ + "quick_action_qr_scanner.imageset/Contents.json", + "quick_action_qr_scanner.imageset/quick_action_qr_scanner@2x.png", + "quick_action_qr_scanner.imageset/quick_action_qr_scanner@3x.png", + ] +} + +imageset("quick_action_voice_search") { + sources = [ + "quick_action_voice_search.imageset/Contents.json", + "quick_action_voice_search.imageset/quick_action_voice_search@2x.png", + "quick_action_voice_search.imageset/quick_action_voice_search@3x.png", + ] +} + +group("quick_action_icons") { + public_deps = [ + ":quick_action_new_incognito_tab", + ":quick_action_new_tab", + ":quick_action_qr_scanner", + ":quick_action_voice_search", + ] +} diff --git a/chromium/ios/chrome/app/safe_mode/BUILD.gn b/chromium/ios/chrome/app/safe_mode/BUILD.gn index e8cd3318c89..fa95210df50 100644 --- a/chromium/ios/chrome/app/safe_mode/BUILD.gn +++ b/chromium/ios/chrome/app/safe_mode/BUILD.gn @@ -2,18 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/fatal_error.png", - "resources/fatal_error@2x.png", - "resources/fatal_error@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("safe_mode") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "safe_mode_coordinator.h", "safe_mode_coordinator.mm", @@ -22,7 +12,7 @@ source_set("safe_mode") { ] deps = [ - ":resources", + "resources:fatal_error", "//base", "//ios/chrome/app", "//ios/chrome/app/strings", diff --git a/chromium/ios/chrome/app/safe_mode/resources/BUILD.gn b/chromium/ios/chrome/app/safe_mode/resources/BUILD.gn new file mode 100644 index 00000000000..53abdd258bc --- /dev/null +++ b/chromium/ios/chrome/app/safe_mode/resources/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright 2017 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/imageset.gni") + +imageset("fatal_error") { + sources = [ + "fatal_error.imageset/Contents.json", + "fatal_error.imageset/fatal_error.png", + "fatal_error.imageset/fatal_error@2x.png", + "fatal_error.imageset/fatal_error@3x.png", + ] +} diff --git a/chromium/ios/chrome/app/startup/BUILD.gn b/chromium/ios/chrome/app/startup/BUILD.gn index 6a6c4855aa8..8e236b6e54c 100644 --- a/chromium/ios/chrome/app/startup/BUILD.gn +++ b/chromium/ios/chrome/app/startup/BUILD.gn @@ -24,6 +24,7 @@ source_set("startup_basic") { deps = [ "//base", "//components/crash/core/common", + "//components/task_scheduler_util/browser", "//ios/chrome/browser:chrome_paths", "//ios/web/public/app", "//skia", @@ -38,6 +39,8 @@ source_set("startup") { "background_upload_alert.mm", "client_registration.h", "client_registration.mm", + "content_suggestions_scheduler_notifications.h", + "content_suggestions_scheduler_notifications.mm", "network_stack_setup.h", "network_stack_setup.mm", "provider_registration.h", @@ -49,8 +52,11 @@ source_set("startup") { deps = [ ":startup_basic", "//base", + "//components/ntp_snippets", "//ios/chrome/browser", "//ios/chrome/browser:browser_internal", + "//ios/chrome/browser/browser_state", + "//ios/chrome/browser/ntp_snippets", "//ios/chrome/browser/web", "//ios/chrome/browser/web:web_internal", "//ios/net", diff --git a/chromium/ios/chrome/browser/BUILD.gn b/chromium/ios/chrome/browser/BUILD.gn index a881c45e664..c797a72dea4 100644 --- a/chromium/ios/chrome/browser/BUILD.gn +++ b/chromium/ios/chrome/browser/BUILD.gn @@ -35,6 +35,8 @@ source_set("browser") { "arch_util.h", "browser_about_rewriter.cc", "browser_about_rewriter.h", + "chrome_browser_provider_observer_bridge.h", + "chrome_browser_provider_observer_bridge.mm", "chrome_constants.cc", "chrome_constants.h", "chrome_coordinator.h", @@ -74,8 +76,6 @@ source_set("browser") { "tab_parenting_global_observer.h", "web_data_service_factory.cc", "web_data_service_factory.h", - "xcallback_parameters.h", - "xcallback_parameters.mm", ] deps = [ @@ -92,14 +92,16 @@ source_set("browser") { "//components/metrics", "//components/metrics_services_manager", "//components/net_log", - "//components/network_session_configurator", "//components/ntp_tiles", + "//components/password_manager/core/common:common", + "//components/payments/core", "//components/pref_registry", "//components/prefs", "//components/proxy_config", "//components/proxy_config/ios", "//components/reading_list/ios", "//components/search_engines", + "//components/security_state/core", "//components/signin/core/browser", "//components/ssl_config", "//components/strings", @@ -115,6 +117,8 @@ source_set("browser") { "//ios/chrome/browser/browser_state", "//ios/chrome/browser/sync/glue", "//ios/chrome/common", + "//ios/components/captive_portal", + "//ios/components/io_thread", "//ios/net", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/voice", @@ -211,6 +215,7 @@ source_set("unit_tests") { testonly = true sources = [ "callback_counter_unittest.mm", + "chrome_browser_provider_observer_bridge_unittest.mm", "chrome_url_util_unittest.mm", "crash_loop_detection_util_unittest.mm", "install_time_util_unittest.mm", @@ -228,7 +233,9 @@ source_set("unit_tests") { "//components/proxy_config", "//components/ssl_config", "//components/variations", - "//ios/web:test_support", + "//ios/public/provider/chrome/browser", + "//ios/public/provider/chrome/browser/signin", + "//ios/web/public/test", "//net", "//net:test_support", "//testing/gtest", diff --git a/chromium/ios/chrome/browser/autofill/BUILD.gn b/chromium/ios/chrome/browser/autofill/BUILD.gn index 148f1abaf77..a253eecbd62 100644 --- a/chromium/ios/chrome/browser/autofill/BUILD.gn +++ b/chromium/ios/chrome/browser/autofill/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("autofill") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "form_input_accessory_view.h", "form_input_accessory_view.mm", @@ -23,6 +24,30 @@ source_set("autofill") { "validation_rules_storage_factory.h", ] deps = [ + "resources:autofill_card_american_express", + "resources:autofill_card_diners", + "resources:autofill_card_discover", + "resources:autofill_card_generic", + "resources:autofill_card_jcb", + "resources:autofill_card_mastercard", + "resources:autofill_card_unionpay", + "resources:autofill_card_visa", + "resources:autofill_close", + "resources:autofill_close_pressed", + "resources:autofill_keyboard_background", + "resources:autofill_keyboard_background_left", + "resources:autofill_keyboard_background_right", + "resources:autofill_left_sep", + "resources:autofill_left_sep_RTL", + "resources:autofill_middle_sep", + "resources:autofill_next", + "resources:autofill_next_inactive", + "resources:autofill_next_pressed", + "resources:autofill_prev", + "resources:autofill_prev_inactive", + "resources:autofill_prev_pressed", + "resources:autofill_right_sep", + "resources:autofill_right_sep_RTL", "//base", "//base:i18n", "//components/autofill/core/browser", @@ -106,7 +131,7 @@ source_set("unit_tests") { "//ios/chrome/browser/web:test_support", "//ios/chrome/test/base", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", "//ui/base:test_support", @@ -131,6 +156,6 @@ source_set("eg_tests") { "//ios/testing/earl_grey:earl_grey_support", "//ios/third_party/earl_grey", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test/http_server", ] } diff --git a/chromium/ios/chrome/browser/autofill/resources/BUILD.gn b/chromium/ios/chrome/browser/autofill/resources/BUILD.gn new file mode 100644 index 00000000000..ace0eff9444 --- /dev/null +++ b/chromium/ios/chrome/browser/autofill/resources/BUILD.gn @@ -0,0 +1,235 @@ +# Copyright 2017 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/imageset.gni") + +imageset("autofill_card_american_express") { + sources = [ + "autofill_card_american_express.imageset/Contents.json", + "autofill_card_american_express.imageset/autofill_card_american_express.png", + "autofill_card_american_express.imageset/autofill_card_american_express@2x.png", + "autofill_card_american_express.imageset/autofill_card_american_express@2x~ipad.png", + "autofill_card_american_express.imageset/autofill_card_american_express@3x.png", + "autofill_card_american_express.imageset/autofill_card_american_express~ipad.png", + ] +} + +imageset("autofill_card_diners") { + sources = [ + "autofill_card_diners.imageset/Contents.json", + "autofill_card_diners.imageset/autofill_card_diners.png", + "autofill_card_diners.imageset/autofill_card_diners@2x.png", + "autofill_card_diners.imageset/autofill_card_diners@2x~ipad.png", + "autofill_card_diners.imageset/autofill_card_diners@3x.png", + "autofill_card_diners.imageset/autofill_card_diners~ipad.png", + ] +} + +imageset("autofill_card_discover") { + sources = [ + "autofill_card_discover.imageset/Contents.json", + "autofill_card_discover.imageset/autofill_card_discover.png", + "autofill_card_discover.imageset/autofill_card_discover@2x.png", + "autofill_card_discover.imageset/autofill_card_discover@2x~ipad.png", + "autofill_card_discover.imageset/autofill_card_discover@3x.png", + "autofill_card_discover.imageset/autofill_card_discover~ipad.png", + ] +} + +imageset("autofill_card_generic") { + sources = [ + "autofill_card_generic.imageset/Contents.json", + "autofill_card_generic.imageset/autofill_card_generic.png", + "autofill_card_generic.imageset/autofill_card_generic@2x.png", + "autofill_card_generic.imageset/autofill_card_generic@2x~ipad.png", + "autofill_card_generic.imageset/autofill_card_generic@3x.png", + "autofill_card_generic.imageset/autofill_card_generic~ipad.png", + ] +} + +imageset("autofill_card_jcb") { + sources = [ + "autofill_card_jcb.imageset/Contents.json", + "autofill_card_jcb.imageset/autofill_card_jcb.png", + "autofill_card_jcb.imageset/autofill_card_jcb@2x.png", + "autofill_card_jcb.imageset/autofill_card_jcb@2x~ipad.png", + "autofill_card_jcb.imageset/autofill_card_jcb@3x.png", + "autofill_card_jcb.imageset/autofill_card_jcb~ipad.png", + ] +} + +imageset("autofill_card_mastercard") { + sources = [ + "autofill_card_mastercard.imageset/Contents.json", + "autofill_card_mastercard.imageset/autofill_card_mastercard.png", + "autofill_card_mastercard.imageset/autofill_card_mastercard@2x.png", + "autofill_card_mastercard.imageset/autofill_card_mastercard@2x~ipad.png", + "autofill_card_mastercard.imageset/autofill_card_mastercard@3x.png", + "autofill_card_mastercard.imageset/autofill_card_mastercard~ipad.png", + ] +} + +imageset("autofill_card_unionpay") { + sources = [ + "autofill_card_unionpay.imageset/Contents.json", + "autofill_card_unionpay.imageset/autofill_card_unionpay.png", + "autofill_card_unionpay.imageset/autofill_card_unionpay@2x.png", + "autofill_card_unionpay.imageset/autofill_card_unionpay@2x~ipad.png", + "autofill_card_unionpay.imageset/autofill_card_unionpay@3x.png", + "autofill_card_unionpay.imageset/autofill_card_unionpay~ipad.png", + ] +} + +imageset("autofill_card_visa") { + sources = [ + "autofill_card_visa.imageset/Contents.json", + "autofill_card_visa.imageset/autofill_card_visa.png", + "autofill_card_visa.imageset/autofill_card_visa@2x.png", + "autofill_card_visa.imageset/autofill_card_visa@2x~ipad.png", + "autofill_card_visa.imageset/autofill_card_visa@3x.png", + "autofill_card_visa.imageset/autofill_card_visa~ipad.png", + ] +} + +imageset("autofill_close") { + sources = [ + "autofill_close.imageset/Contents.json", + "autofill_close.imageset/autofill_close.png", + "autofill_close.imageset/autofill_close@2x.png", + "autofill_close.imageset/autofill_close@3x.png", + ] +} + +imageset("autofill_close_pressed") { + sources = [ + "autofill_close_pressed.imageset/Contents.json", + "autofill_close_pressed.imageset/autofill_close_pressed.png", + "autofill_close_pressed.imageset/autofill_close_pressed@2x.png", + "autofill_close_pressed.imageset/autofill_close_pressed@3x.png", + ] +} + +imageset("autofill_keyboard_background") { + sources = [ + "autofill_keyboard_background.imageset/Contents.json", + "autofill_keyboard_background.imageset/autofill_keyboard_background.png", + "autofill_keyboard_background.imageset/autofill_keyboard_background@2x.png", + "autofill_keyboard_background.imageset/autofill_keyboard_background@3x.png", + ] +} + +imageset("autofill_keyboard_background_left") { + sources = [ + "autofill_keyboard_background_left.imageset/Contents.json", + "autofill_keyboard_background_left.imageset/autofill_keyboard_background_left.png", + "autofill_keyboard_background_left.imageset/autofill_keyboard_background_left@2x.png", + ] +} + +imageset("autofill_keyboard_background_right") { + sources = [ + "autofill_keyboard_background_right.imageset/Contents.json", + "autofill_keyboard_background_right.imageset/autofill_keyboard_background_right.png", + "autofill_keyboard_background_right.imageset/autofill_keyboard_background_right@2x.png", + ] +} + +imageset("autofill_left_sep") { + sources = [ + "autofill_left_sep.imageset/Contents.json", + "autofill_left_sep.imageset/autofill_left_sep.png", + "autofill_left_sep.imageset/autofill_left_sep@2x.png", + "autofill_left_sep.imageset/autofill_left_sep@3x.png", + ] +} + +imageset("autofill_left_sep_RTL") { + sources = [ + "autofill_left_sep_RTL.imageset/Contents.json", + "autofill_left_sep_RTL.imageset/autofill_left_sep_RTL.png", + "autofill_left_sep_RTL.imageset/autofill_left_sep_RTL@2x.png", + "autofill_left_sep_RTL.imageset/autofill_left_sep_RTL@3x.png", + ] +} + +imageset("autofill_middle_sep") { + sources = [ + "autofill_middle_sep.imageset/Contents.json", + "autofill_middle_sep.imageset/autofill_middle_sep.png", + "autofill_middle_sep.imageset/autofill_middle_sep@2x.png", + "autofill_middle_sep.imageset/autofill_middle_sep@3x.png", + ] +} + +imageset("autofill_next") { + sources = [ + "autofill_next.imageset/Contents.json", + "autofill_next.imageset/autofill_next.png", + "autofill_next.imageset/autofill_next@2x.png", + "autofill_next.imageset/autofill_next@3x.png", + ] +} + +imageset("autofill_next_inactive") { + sources = [ + "autofill_next_inactive.imageset/Contents.json", + "autofill_next_inactive.imageset/autofill_next_inactive.png", + "autofill_next_inactive.imageset/autofill_next_inactive@2x.png", + "autofill_next_inactive.imageset/autofill_next_inactive@3x.png", + ] +} + +imageset("autofill_next_pressed") { + sources = [ + "autofill_next_pressed.imageset/Contents.json", + "autofill_next_pressed.imageset/autofill_next_pressed.png", + "autofill_next_pressed.imageset/autofill_next_pressed@2x.png", + "autofill_next_pressed.imageset/autofill_next_pressed@3x.png", + ] +} + +imageset("autofill_prev") { + sources = [ + "autofill_prev.imageset/Contents.json", + "autofill_prev.imageset/autofill_prev.png", + "autofill_prev.imageset/autofill_prev@2x.png", + "autofill_prev.imageset/autofill_prev@3x.png", + ] +} + +imageset("autofill_prev_inactive") { + sources = [ + "autofill_prev_inactive.imageset/Contents.json", + "autofill_prev_inactive.imageset/autofill_prev_inactive.png", + "autofill_prev_inactive.imageset/autofill_prev_inactive@2x.png", + "autofill_prev_inactive.imageset/autofill_prev_inactive@3x.png", + ] +} + +imageset("autofill_prev_pressed") { + sources = [ + "autofill_prev_pressed.imageset/Contents.json", + "autofill_prev_pressed.imageset/autofill_prev_pressed.png", + "autofill_prev_pressed.imageset/autofill_prev_pressed@2x.png", + "autofill_prev_pressed.imageset/autofill_prev_pressed@3x.png", + ] +} + +imageset("autofill_right_sep") { + sources = [ + "autofill_right_sep.imageset/Contents.json", + "autofill_right_sep.imageset/autofill_right_sep.png", + "autofill_right_sep.imageset/autofill_right_sep@2x.png", + "autofill_right_sep.imageset/autofill_right_sep@3x.png", + ] +} + +imageset("autofill_right_sep_RTL") { + sources = [ + "autofill_right_sep_RTL.imageset/Contents.json", + "autofill_right_sep_RTL.imageset/autofill_right_sep_RTL.png", + "autofill_right_sep_RTL.imageset/autofill_right_sep_RTL@2x.png", + "autofill_right_sep_RTL.imageset/autofill_right_sep_RTL@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/browser_state/BUILD.gn b/chromium/ios/chrome/browser/browser_state/BUILD.gn index cfee3e03abc..109d33ec189 100644 --- a/chromium/ios/chrome/browser/browser_state/BUILD.gn +++ b/chromium/ios/chrome/browser/browser_state/BUILD.gn @@ -85,6 +85,7 @@ source_set("browser_state_impl") { "//ios/chrome/browser/desktop_promotion", "//ios/chrome/browser/dom_distiller", "//ios/chrome/browser/favicon", + "//ios/chrome/browser/feature_engagement_tracker", "//ios/chrome/browser/google", "//ios/chrome/browser/google:google_logo", "//ios/chrome/browser/history", @@ -99,6 +100,7 @@ source_set("browser_state_impl") { "//ios/chrome/browser/services/gcm", "//ios/chrome/browser/sessions", "//ios/chrome/browser/signin", + "//ios/chrome/browser/snapshots", "//ios/chrome/browser/suggestions", "//ios/chrome/browser/sync", "//ios/chrome/browser/sync/glue", diff --git a/chromium/ios/chrome/browser/browsing_data/BUILD.gn b/chromium/ios/chrome/browser/browsing_data/BUILD.gn index 7626afc941b..8e998f4bdc8 100644 --- a/chromium/ios/chrome/browser/browsing_data/BUILD.gn +++ b/chromium/ios/chrome/browser/browsing_data/BUILD.gn @@ -23,20 +23,24 @@ source_set("browsing_data") { "//components/browsing_data/core", "//components/history/core/browser", "//components/keyed_service/core", + "//components/language/core/browser", "//components/omnibox/browser", "//components/password_manager/core/browser", "//components/prefs", "//components/sessions", + "//components/translate/core/browser:browser", "//ios/chrome/browser", "//ios/chrome/browser/autofill", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/history", + "//ios/chrome/browser/language", "//ios/chrome/browser/passwords", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/sessions", "//ios/chrome/browser/sessions:serialisation", "//ios/chrome/browser/signin", "//ios/chrome/browser/sync", + "//ios/chrome/browser/translate:translate", "//ios/net", "//ios/public/provider/chrome/browser", "//ios/web", @@ -68,7 +72,8 @@ source_set("unit_tests") { "//components/prefs:test_support", "//ios/chrome/browser/browser_state:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//net", "//testing/gtest", "//third_party/ocmock", @@ -76,6 +81,7 @@ source_set("unit_tests") { } source_set("browsing_data_internal") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "browsing_data_removal_controller.h", "browsing_data_removal_controller.mm", @@ -88,13 +94,10 @@ source_set("browsing_data_internal") { "//components/signin/ios/browser", "//ios/chrome/browser:browser_internal", "//ios/chrome/browser/browser_state", - "//ios/chrome/browser/native_app_launcher:native_app_launcher_internal", "//ios/chrome/browser/sessions:serialisation", "//ios/chrome/browser/signin", "//ios/chrome/browser/snapshots", "//ios/chrome/browser/ui:ui_internal", - "//ios/public/provider/chrome/browser", - "//ios/public/provider/chrome/browser/native_app_launcher", "//ios/web", "//net", ] diff --git a/chromium/ios/chrome/browser/content_suggestions/BUILD.gn b/chromium/ios/chrome/browser/content_suggestions/BUILD.gn index ac6f7324009..d913df674ab 100644 --- a/chromium/ios/chrome/browser/content_suggestions/BUILD.gn +++ b/chromium/ios/chrome/browser/content_suggestions/BUILD.gn @@ -5,10 +5,19 @@ source_set("content_suggestions") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ + "content_suggestions_alert_commands.h", + "content_suggestions_alert_factory.h", + "content_suggestions_alert_factory.mm", "content_suggestions_category_wrapper.h", "content_suggestions_category_wrapper.mm", "content_suggestions_coordinator.h", "content_suggestions_coordinator.mm", + "content_suggestions_favicon_mediator.h", + "content_suggestions_favicon_mediator.mm", + "content_suggestions_header_provider.h", + "content_suggestions_header_view_controller.h", + "content_suggestions_header_view_controller.mm", + "content_suggestions_header_view_controller_delegate.h", "content_suggestions_mediator.h", "content_suggestions_mediator.mm", "content_suggestions_service_bridge_observer.h", @@ -23,21 +32,34 @@ source_set("content_suggestions") { "//components/ntp_tiles", "//components/rappor", "//components/reading_list/core", + "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser", + "//ios/chrome/browser/browser_state", "//ios/chrome/browser/favicon", + "//ios/chrome/browser/metrics:metrics_internal", "//ios/chrome/browser/ntp_snippets", "//ios/chrome/browser/ntp_tiles", "//ios/chrome/browser/reading_list", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/alert_coordinator", + "//ios/chrome/browser/ui/collection_view/cells", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/content_suggestions", + "//ios/chrome/browser/ui/content_suggestions:content_suggestions_util", "//ios/chrome/browser/ui/content_suggestions/cells", "//ios/chrome/browser/ui/content_suggestions/cells:cells_ui", "//ios/chrome/browser/ui/content_suggestions/identifier", "//ios/chrome/browser/ui/favicon", + "//ios/chrome/browser/ui/ntp", + "//ios/chrome/browser/ui/ntp:ntp_header", + "//ios/chrome/browser/ui/ntp:ntp_internal", + "//ios/chrome/browser/ui/overscroll_actions", "//ios/chrome/browser/ui/reading_list", + "//ios/chrome/browser/ui/toolbar", + "//ios/public/provider/chrome/browser", + "//ios/public/provider/chrome/browser/images", + "//ios/public/provider/chrome/browser/voice", "//ios/web", "//ui/base", "//ui/strings", @@ -56,3 +78,28 @@ source_set("unit_tests") { ] configs += [ "//build/config/compiler:enable_arc" ] } + +source_set("eg_tests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "content_suggestions_alert_egtest.mm", + ] + deps = [ + ":content_suggestions", + "//base", + "//base/test:test_support", + "//ios/chrome/app/strings", + "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/alert_coordinator", + "//ios/chrome/browser/ui/alert_coordinator", + "//ios/chrome/browser/ui/collection_view/cells", + "//ios/chrome/browser/ui/util", + "//ios/chrome/test/earl_grey:test_support", + "//ui/strings", + ] + libs = [ + "UIKit.framework", + "XCTest.framework", + ] +} diff --git a/chromium/ios/chrome/browser/context_menu/BUILD.gn b/chromium/ios/chrome/browser/context_menu/BUILD.gn index da003576280..4de5c2018f8 100644 --- a/chromium/ios/chrome/browser/context_menu/BUILD.gn +++ b/chromium/ios/chrome/browser/context_menu/BUILD.gn @@ -17,7 +17,7 @@ source_set("eg_tests") { "//ios/testing:ios_test_support", "//ios/third_party/earl_grey", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//url", ] libs = [ diff --git a/chromium/ios/chrome/browser/crash_report/BUILD.gn b/chromium/ios/chrome/browser/crash_report/BUILD.gn index e49f8f6d95b..e94ef6d20fc 100644 --- a/chromium/ios/chrome/browser/crash_report/BUILD.gn +++ b/chromium/ios/chrome/browser/crash_report/BUILD.gn @@ -31,6 +31,7 @@ source_set("crash_report") { } source_set("crash_report_internal") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "crash_report_helper.h", "crash_report_helper.mm", @@ -73,7 +74,7 @@ source_set("unit_tests") { "//ios/chrome/browser/sessions:serialisation", "//ios/chrome/test/base", "//ios/chrome/test/ocmock", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gmock", "//testing/gtest", "//third_party/ocmock", diff --git a/chromium/ios/chrome/browser/device_sharing/BUILD.gn b/chromium/ios/chrome/browser/device_sharing/BUILD.gn index a15e20b1732..cc9b463f28e 100644 --- a/chromium/ios/chrome/browser/device_sharing/BUILD.gn +++ b/chromium/ios/chrome/browser/device_sharing/BUILD.gn @@ -31,7 +31,7 @@ source_set("unit_tests") { "//components/handoff", "//components/sync_preferences:test_support", "//ios/chrome/browser/browser_state:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", "//url", @@ -51,7 +51,7 @@ source_set("eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//net", "//url", ] diff --git a/chromium/ios/chrome/browser/feature_engagement_tracker/BUILD.gn b/chromium/ios/chrome/browser/feature_engagement_tracker/BUILD.gn new file mode 100644 index 00000000000..480b628c1f9 --- /dev/null +++ b/chromium/ios/chrome/browser/feature_engagement_tracker/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright 2017 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. + +source_set("feature_engagement_tracker") { + sources = [ + "feature_engagement_tracker_factory.h", + "feature_engagement_tracker_factory.mm", + ] + + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + "//base", + "//components/feature_engagement_tracker", + "//components/keyed_service/ios", + "//ios/chrome/browser", + "//ios/chrome/browser/browser_state", + ] +} diff --git a/chromium/ios/chrome/browser/find_in_page/BUILD.gn b/chromium/ios/chrome/browser/find_in_page/BUILD.gn index 38653e9dc7a..88e20e3dc3a 100644 --- a/chromium/ios/chrome/browser/find_in_page/BUILD.gn +++ b/chromium/ios/chrome/browser/find_in_page/BUILD.gn @@ -37,24 +37,8 @@ source_set("unit_tests") { testonly = true configs += [ "//build/config/compiler:enable_arc" ] sources = [ - "find_tab_helper_unittest.mm", - ] - deps = [ - ":find_in_page", - ":unit_tests_nonarc", - "//base", - "//base/test:test_support", - "//ios/chrome/browser/web:test_support", - "//ios/web", - "//ios/web:test_support", - "//testing/gtest", - ] -} - -source_set("unit_tests_nonarc") { - testonly = true - sources = [ "find_in_page_js_unittest.mm", + "find_tab_helper_unittest.mm", "js_findinpage_manager_unittest.mm", ] deps = [ @@ -63,7 +47,8 @@ source_set("unit_tests_nonarc") { "//base/test:test_support", "//ios/chrome/browser/web:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//testing/gtest", ] } diff --git a/chromium/ios/chrome/browser/geolocation/BUILD.gn b/chromium/ios/chrome/browser/geolocation/BUILD.gn index b38a267f988..d124ca12bb1 100644 --- a/chromium/ios/chrome/browser/geolocation/BUILD.gn +++ b/chromium/ios/chrome/browser/geolocation/BUILD.gn @@ -67,6 +67,7 @@ source_set("unit_tests") { } source_set("geolocation_internal") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "omnibox_geolocation_controller+Testing.h", "omnibox_geolocation_controller.h", diff --git a/chromium/ios/chrome/browser/itunes_links/BUILD.gn b/chromium/ios/chrome/browser/itunes_links/BUILD.gn index 7552a6b60bb..ecedc5754e7 100644 --- a/chromium/ios/chrome/browser/itunes_links/BUILD.gn +++ b/chromium/ios/chrome/browser/itunes_links/BUILD.gn @@ -26,7 +26,7 @@ source_set("unit_tests") { ":itunes_links", "//base", "//ios/chrome/browser/store_kit", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", "//url", diff --git a/chromium/ios/chrome/browser/language/BUILD.gn b/chromium/ios/chrome/browser/language/BUILD.gn new file mode 100644 index 00000000000..9c11dcb1db1 --- /dev/null +++ b/chromium/ios/chrome/browser/language/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright 2017 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. + +source_set("language") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "url_language_histogram_factory.cc", + "url_language_histogram_factory.h", + ] + deps = [ + "//base", + "//components/keyed_service/core", + "//components/keyed_service/ios", + "//components/language/core/browser", + "//components/prefs", + "//ios/chrome/browser", + "//ios/chrome/browser/browser_state", + ] +} + +source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "url_language_histogram_factory_unittest.cc", + ] + deps = [ + ":language", + "//base", + "//base/test:test_support", + "//ios/chrome/browser", + "//ios/chrome/browser/browser_state:test_support", + "//ios/chrome/browser/web:test_support", + "//ios/public/provider/chrome/browser:test_support", + "//ios/web", + "//ios/web/public/test", + "//testing/gmock:gmock", + "//testing/gtest", + ] +} diff --git a/chromium/ios/chrome/browser/memory/BUILD.gn b/chromium/ios/chrome/browser/memory/BUILD.gn index dce979280a9..0673e33a099 100644 --- a/chromium/ios/chrome/browser/memory/BUILD.gn +++ b/chromium/ios/chrome/browser/memory/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("memory") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "memory_debugger.h", "memory_debugger.mm", diff --git a/chromium/ios/chrome/browser/metrics/BUILD.gn b/chromium/ios/chrome/browser/metrics/BUILD.gn index 91c6ea44aac..5b55c011325 100644 --- a/chromium/ios/chrome/browser/metrics/BUILD.gn +++ b/chromium/ios/chrome/browser/metrics/BUILD.gn @@ -78,6 +78,7 @@ source_set("unit_tests") { "//components/prefs:test_support", "//components/version_info", "//ios/chrome/test:test_support", + "//ios/web/public/test", "//testing/gtest", ] } @@ -92,8 +93,6 @@ source_set("metrics_internal") { "size_class_recorder.h", "size_class_recorder.mm", "size_class_recorder_private.h", - "tab_usage_recorder.h", - "tab_usage_recorder.mm", "tab_usage_recorder_delegate.h", ] deps = [ @@ -110,17 +109,41 @@ source_set("metrics_internal") { ] public_deps = [ ":metrics_internal_arc", + ":metrics_internal_noarc", + ] + allow_circular_includes_from = [ + ":metrics_internal_arc", + ":metrics_internal_noarc", ] - allow_circular_includes_from = [ ":metrics_internal_arc" ] libs = [ "UIKit.framework" ] } +source_set("metrics_internal_noarc") { + # TODO(crbug.com/731724) This target shouldn't be compiled with ARC until + # after it's converted to use WebStates instead of Tabs. + cflags_objc = [ "-fno-objc-arc" ] + + sources = [ + "tab_usage_recorder.h", + "tab_usage_recorder.mm", + ] + + deps = [ + ":metrics", + "//base", + "//ios/chrome/browser", + "//ios/chrome/browser/tabs", + "//ios/web", + ] +} + source_set("metrics_internal_arc") { sources = [ "tab_usage_recorder_web_state_list_observer.h", "tab_usage_recorder_web_state_list_observer.mm", ] deps = [ + ":metrics_internal_noarc", "//base", "//ios/chrome/browser/tabs", "//ios/chrome/browser/web_state_list", @@ -129,6 +152,7 @@ source_set("metrics_internal_arc") { } source_set("unit_tests_internal") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "first_user_action_recorder_unittest.cc", @@ -144,7 +168,8 @@ source_set("unit_tests_internal") { "//ios/chrome/browser/ui", "//ios/testing:ocmock_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", ] @@ -170,7 +195,8 @@ source_set("eg_tests") { "//ios/chrome/test/earl_grey:test_support", "//ios/testing:ios_test_support", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//ui/base", "//url", ] @@ -191,7 +217,7 @@ source_set("external_url_eg_tests") { ":test_support", "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", - "//ios/web:test_support", + "//ios/web/public/test/http_server", ] libs = [ "XCTest.framework" ] } diff --git a/chromium/ios/chrome/browser/native_app_launcher/BUILD.gn b/chromium/ios/chrome/browser/native_app_launcher/BUILD.gn deleted file mode 100644 index 76ecaa68908..00000000000 --- a/chromium/ios/chrome/browser/native_app_launcher/BUILD.gn +++ /dev/null @@ -1,112 +0,0 @@ -# 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. - -source_set("native_app_launcher") { - sources = [ - "ios_appstore_ids.h", - "ios_appstore_ids.mm", - "native_app_infobar_controller.h", - "native_app_infobar_controller.mm", - "native_app_infobar_delegate.h", - "native_app_infobar_delegate.mm", - "native_app_navigation_controller_protocol.h", - ] - deps = [ - "//base", - "//components/infobars/core", - "//ios/chrome/app/strings", - "//ios/chrome/browser/infobars", - "//ios/chrome/browser/ui/infobars", - "//ios/public/provider/chrome/browser/native_app_launcher", - "//ui/base", - "//url", - ] -} - -source_set("unit_tests") { - configs += [ "//build/config/compiler:enable_arc" ] - testonly = true - sources = [ - "native_app_infobar_controller_unittest.mm", - "native_app_infobar_delegate_unittest.mm", - ] - deps = [ - ":native_app_launcher", - "//base", - "//base/test:test_support", - "//components/infobars/core", - "//ios/chrome/browser", - "//ios/chrome/test:test_support", - "//ios/public/provider/chrome/browser", - "//ios/public/provider/chrome/browser:test_support", - "//ios/public/provider/chrome/browser/native_app_launcher", - "//ios/web", - "//ios/web:test_support", - "//net:test_support", - "//testing/gmock", - "//testing/gtest", - "//url", - ] -} - -source_set("native_app_launcher_internal") { - configs += [ "//build/config/compiler:enable_arc" ] - sources = [ - "native_app_navigation_controller.h", - "native_app_navigation_controller.mm", - "native_app_navigation_util.h", - "native_app_navigation_util.mm", - ] - deps = [ - ":native_app_launcher", - "//base", - "//components/image_fetcher/ios", - "//components/infobars/core", - "//ios/chrome/browser", - "//ios/chrome/browser/infobars", - "//ios/chrome/browser/net", - "//ios/chrome/browser/store_kit", - "//ios/chrome/browser/tabs", - "//ios/chrome/browser/web:web", - "//ios/public/provider/chrome/browser", - "//ios/public/provider/chrome/browser/native_app_launcher", - "//ios/public/provider/chrome/browser/signin", - "//ios/public/provider/chrome/browser/ui", - "//ios/web", - "//net", - "//ui/base", - "//url", - ] - libs = [ "StoreKit.framework" ] -} - -source_set("unit_tests_internal") { - testonly = true - sources = [ - "native_app_navigation_controller_unittest.mm", - "native_app_navigation_util_unittest.mm", - ] - deps = [ - ":native_app_launcher", - ":native_app_launcher_internal", - "//base", - "//base/test:test_support", - "//components/infobars/core", - "//ios/chrome/browser", - "//ios/chrome/browser/infobars:infobars", - "//ios/chrome/browser/web:test_support", - "//ios/chrome/test:test_support", - "//ios/public/provider/chrome/browser", - "//ios/public/provider/chrome/browser:test_support", - "//ios/public/provider/chrome/browser/native_app_launcher:test_support", - "//ios/public/provider/chrome/browser/signin:test_support", - "//ios/web", - "//ios/web:test_support", - "//net:test_support", - "//testing/gmock", - "//testing/gtest", - "//ui/base", - "//url", - ] -} diff --git a/chromium/ios/chrome/browser/net/BUILD.gn b/chromium/ios/chrome/browser/net/BUILD.gn index 94b7fe08a00..8e24ebbdcbb 100644 --- a/chromium/ios/chrome/browser/net/BUILD.gn +++ b/chromium/ios/chrome/browser/net/BUILD.gn @@ -68,7 +68,7 @@ source_set("unit_tests") { ":net", "//base", "//base/test:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//net", "//net:test_support", "//testing/gtest", @@ -86,7 +86,8 @@ source_set("eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//url", ] libs = [ "XCTest.framework" ] diff --git a/chromium/ios/chrome/browser/ntp_tiles/BUILD.gn b/chromium/ios/chrome/browser/ntp_tiles/BUILD.gn index 25b7dd900c2..5e2036d1ca2 100644 --- a/chromium/ios/chrome/browser/ntp_tiles/BUILD.gn +++ b/chromium/ios/chrome/browser/ntp_tiles/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("ntp_tiles") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "ios_most_visited_sites_factory.cc", "ios_most_visited_sites_factory.h", @@ -28,3 +29,19 @@ source_set("ntp_tiles") { "//ios/web", ] } + +source_set("eg_tests") { + testonly = true + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "ntp_tiles_egtest.mm", + ] + deps = [ + ":ntp_tiles", + "//components/ntp_tiles:ntp_tiles", + "//ios/chrome/test/app:test_support", + "//ios/chrome/test/earl_grey:test_support", + "//ios/testing:ios_test_support", + "//ios/web/public/test/http_server:http_server", + ] +} diff --git a/chromium/ios/chrome/browser/omaha/BUILD.gn b/chromium/ios/chrome/browser/omaha/BUILD.gn index aa08abdf958..956c5f0bd65 100644 --- a/chromium/ios/chrome/browser/omaha/BUILD.gn +++ b/chromium/ios/chrome/browser/omaha/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("omaha") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "omaha_service.h", "omaha_service.mm", @@ -48,7 +49,7 @@ source_set("unit_tests") { "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/omaha", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//net:test_support", "//testing/gtest", ] diff --git a/chromium/ios/chrome/browser/passwords/BUILD.gn b/chromium/ios/chrome/browser/passwords/BUILD.gn index 94c811f044d..c421d069fad 100644 --- a/chromium/ios/chrome/browser/passwords/BUILD.gn +++ b/chromium/ios/chrome/browser/passwords/BUILD.gn @@ -5,6 +5,7 @@ import("//ios/web/js_compile.gni") source_set("passwords") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "ios_chrome_password_manager_client.h", "ios_chrome_password_manager_client.mm", @@ -12,8 +13,6 @@ source_set("passwords") { "ios_chrome_password_manager_driver.mm", "ios_chrome_password_manager_infobar_delegate.h", "ios_chrome_password_manager_infobar_delegate.mm", - "ios_chrome_password_manager_setting_migrator_service_factory.cc", - "ios_chrome_password_manager_setting_migrator_service_factory.h", "ios_chrome_password_store_factory.cc", "ios_chrome_password_store_factory.h", "ios_chrome_save_password_infobar_delegate.h", @@ -53,6 +52,7 @@ source_set("passwords") { "//components/signin/core/browser", "//components/strings", "//components/sync", + "//components/ukm", "//google_apis", "//ios/chrome/app/strings", "//ios/chrome/app/theme", @@ -118,7 +118,8 @@ source_set("unit_tests") { "//ios/chrome/browser/ui/commands", "//ios/testing:ocmock_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", "//url", @@ -135,6 +136,7 @@ js_compile_unchecked("injected_js") { } source_set("passwords_internal") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "password_generation_prompt_view.h", "password_generation_prompt_view.mm", diff --git a/chromium/ios/chrome/browser/payments/BUILD.gn b/chromium/ios/chrome/browser/payments/BUILD.gn index b0521bc205e..3c3ebc8d9ff 100644 --- a/chromium/ios/chrome/browser/payments/BUILD.gn +++ b/chromium/ios/chrome/browser/payments/BUILD.gn @@ -7,20 +7,35 @@ import("//ios/web/js_compile.gni") source_set("payments") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ + "ios_can_make_payment_query_factory.cc", + "ios_can_make_payment_query_factory.h", + "ios_payment_request_cache_factory.h", + "ios_payment_request_cache_factory.mm", + "itunes_json_request.cc", + "itunes_json_request.h", "payment_request.h", "payment_request.mm", + "payment_request_cache.h", + "payment_request_cache.mm", "payment_request_util.h", "payment_request_util.mm", ] deps = [ "//base", "//components/autofill/core/browser", + "//components/keyed_service/ios", "//components/payments/core", + "//components/prefs", + "//components/signin/core/browser", "//components/strings:components_strings_grit", "//ios/chrome/browser", "//ios/chrome/browser/autofill", + "//ios/chrome/browser/browser_state", + "//ios/chrome/browser/signin", "//ios/web", + "//net", "//ui/base", + "//url", ] libs = [ "UIKit.framework" ] } @@ -35,11 +50,15 @@ source_set("unit_tests") { ":payments", ":test_support", "//base", + "//base/test:test_support", "//components/autofill/core/browser", "//components/autofill/core/browser:test_support", "//components/payments/core", "//ios/chrome/browser", + "//ios/chrome/browser/browser_state:test_support", "//ios/web", + "//ios/web/public/test/fakes", + "//testing/gmock", "//testing/gtest", ] } @@ -57,7 +76,9 @@ source_set("test_support") { ":payments", "//base", "//components/autofill/core/browser", + "//components/autofill/core/browser:test_support", "//components/payments/core", + "//components/prefs", "//ios/web", ] } diff --git a/chromium/ios/chrome/browser/physical_web/BUILD.gn b/chromium/ios/chrome/browser/physical_web/BUILD.gn index 832f11376f7..3257f057f10 100644 --- a/chromium/ios/chrome/browser/physical_web/BUILD.gn +++ b/chromium/ios/chrome/browser/physical_web/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("physical_web") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "create_physical_web_data_source.h", "create_physical_web_data_source.mm", diff --git a/chromium/ios/chrome/browser/prefs/BUILD.gn b/chromium/ios/chrome/browser/prefs/BUILD.gn index 908170567ae..3b108944726 100644 --- a/chromium/ios/chrome/browser/prefs/BUILD.gn +++ b/chromium/ios/chrome/browser/prefs/BUILD.gn @@ -24,6 +24,7 @@ source_set("prefs") { } source_set("browser_prefs") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "browser_prefs.h", "browser_prefs.mm", @@ -36,12 +37,14 @@ source_set("browser_prefs") { "//components/flags_ui", "//components/gcm_driver", "//components/handoff", + "//components/language/core/browser", "//components/metrics", "//components/network_time", "//components/ntp_snippets", "//components/ntp_tiles", "//components/omnibox/browser", "//components/password_manager/core/browser", + "//components/payments/core", "//components/pref_registry", "//components/prefs", "//components/proxy_config", diff --git a/chromium/ios/chrome/browser/reading_list/BUILD.gn b/chromium/ios/chrome/browser/reading_list/BUILD.gn index ede1a4c8b17..fe219ecd5df 100644 --- a/chromium/ios/chrome/browser/reading_list/BUILD.gn +++ b/chromium/ios/chrome/browser/reading_list/BUILD.gn @@ -97,7 +97,8 @@ source_set("unit_tests") { "//ios/testing:ios_test_support", "//ios/web", "//ios/web:reload_type", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//net", "//testing/gtest", "//url", diff --git a/chromium/ios/chrome/browser/sessions/BUILD.gn b/chromium/ios/chrome/browser/sessions/BUILD.gn index c778963f07a..5a6195cb7c2 100644 --- a/chromium/ios/chrome/browser/sessions/BUILD.gn +++ b/chromium/ios/chrome/browser/sessions/BUILD.gn @@ -83,7 +83,6 @@ source_set("unit_tests") { "//ios/chrome/browser", "//ios/chrome/browser/browser_state:test_support", "//ios/web", - "//ios/web:test_support", "//testing/gtest", "//third_party/ocmock", ] diff --git a/chromium/ios/chrome/browser/share_extension/BUILD.gn b/chromium/ios/chrome/browser/share_extension/BUILD.gn index 9f28aa9af38..6d00e668523 100644 --- a/chromium/ios/chrome/browser/share_extension/BUILD.gn +++ b/chromium/ios/chrome/browser/share_extension/BUILD.gn @@ -3,14 +3,13 @@ # found in the LICENSE file. source_set("share_extension") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ "share_extension_item_receiver.h", "share_extension_item_receiver.mm", "share_extension_service.h", "share_extension_service.mm", - "share_extension_service_factory.cc", "share_extension_service_factory.h", + "share_extension_service_factory.mm", ] deps = [ "//base", @@ -27,4 +26,5 @@ source_set("share_extension") { "//net", "//url", ] + configs += [ "//build/config/compiler:enable_arc" ] } diff --git a/chromium/ios/chrome/browser/signin/BUILD.gn b/chromium/ios/chrome/browser/signin/BUILD.gn index 87452e68ed1..613405951e4 100644 --- a/chromium/ios/chrome/browser/signin/BUILD.gn +++ b/chromium/ios/chrome/browser/signin/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("signin") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "about_signin_internals_factory.cc", "about_signin_internals_factory.h", @@ -77,6 +78,7 @@ source_set("signin") { } source_set("test_support") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "authentication_service_fake.h", @@ -99,6 +101,7 @@ source_set("test_support") { } source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "authentication_service_unittest.mm", @@ -128,7 +131,8 @@ source_set("unit_tests") { "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/signin", "//ios/public/provider/chrome/browser/signin:test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//net:test_support", "//testing/gmock", "//testing/gtest", diff --git a/chromium/ios/chrome/browser/snapshots/BUILD.gn b/chromium/ios/chrome/browser/snapshots/BUILD.gn index a1db577d2bb..8b4aecc6f3a 100644 --- a/chromium/ios/chrome/browser/snapshots/BUILD.gn +++ b/chromium/ios/chrome/browser/snapshots/BUILD.gn @@ -8,7 +8,13 @@ source_set("snapshots") { "lru_cache.mm", "snapshot_cache.h", "snapshot_cache.mm", + "snapshot_cache_factory.h", + "snapshot_cache_factory.mm", "snapshot_cache_internal.h", + "snapshot_cache_web_state_list_observer.h", + "snapshot_cache_web_state_list_observer.mm", + "snapshot_constants.h", + "snapshot_constants.mm", "snapshot_manager.h", "snapshot_manager.mm", "snapshot_overlay.h", @@ -18,31 +24,21 @@ source_set("snapshots") { ] deps = [ "//base", + "//components/keyed_service/core", + "//components/keyed_service/ios", "//ios/chrome/browser", + "//ios/chrome/browser/browser_state", + "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", + "//ios/chrome/browser/web_state_list", "//ios/web", ] - public_deps = [ - ":snapshots_arc", - ] - allow_circular_includes_from = [ ":snapshots_arc" ] libs = [ "QuartzCore.framework" ] -} - -source_set("snapshots_arc") { - sources = [ - "snapshot_cache_web_state_list_observer.h", - "snapshot_cache_web_state_list_observer.mm", - ] - deps = [ - "//base", - "//ios/chrome/browser/tabs", - "//ios/chrome/browser/web_state_list", - ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "lru_cache_unittest.mm", @@ -54,12 +50,13 @@ source_set("unit_tests") { "//base", "//ios/chrome/browser/ui", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", ] } source_set("snapshots_internal") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "snapshot_overlay_provider.h", "web_controller_snapshot_helper.h", diff --git a/chromium/ios/chrome/browser/ssl/BUILD.gn b/chromium/ios/chrome/browser/ssl/BUILD.gn index 29e125e345a..cd12309f8f3 100644 --- a/chromium/ios/chrome/browser/ssl/BUILD.gn +++ b/chromium/ios/chrome/browser/ssl/BUILD.gn @@ -41,7 +41,7 @@ source_set("unit_tests") { ":ssl", "//ios/chrome/browser/browser_state:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//net", "//net:test_support", ] diff --git a/chromium/ios/chrome/browser/store_kit/BUILD.gn b/chromium/ios/chrome/browser/store_kit/BUILD.gn index 02e9d0682cd..234adb435a2 100644 --- a/chromium/ios/chrome/browser/store_kit/BUILD.gn +++ b/chromium/ios/chrome/browser/store_kit/BUILD.gn @@ -25,7 +25,7 @@ source_set("unit_tests") { ":store_kit", "//base", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock:ocmock", ] diff --git a/chromium/ios/chrome/browser/sync/BUILD.gn b/chromium/ios/chrome/browser/sync/BUILD.gn index cd24a76546e..6891c204e5c 100644 --- a/chromium/ios/chrome/browser/sync/BUILD.gn +++ b/chromium/ios/chrome/browser/sync/BUILD.gn @@ -11,6 +11,8 @@ source_set("sync") { "ios_chrome_sync_client.mm", "ios_chrome_synced_tab_delegate.h", "ios_chrome_synced_tab_delegate.mm", + "ios_user_event_service_factory.cc", + "ios_user_event_service_factory.h", "sync_observer_bridge.h", "sync_observer_bridge.mm", "sync_setup_service.cc", @@ -76,8 +78,6 @@ source_set("sync") { source_set("test_support") { testonly = true sources = [ - "fake_sync_service_factory.cc", - "fake_sync_service_factory.h", "ios_chrome_profile_sync_test_util.cc", "ios_chrome_profile_sync_test_util.h", "sync_setup_service_mock.cc", @@ -114,7 +114,7 @@ source_set("unit_tests") { "//components/browser_sync", "//components/sync", "//ios/chrome/browser/browser_state:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", ] } diff --git a/chromium/ios/chrome/browser/tabs/BUILD.gn b/chromium/ios/chrome/browser/tabs/BUILD.gn index c73b2c3251b..bfbe6c97a7e 100644 --- a/chromium/ios/chrome/browser/tabs/BUILD.gn +++ b/chromium/ios/chrome/browser/tabs/BUILD.gn @@ -92,7 +92,6 @@ source_set("tabs_internal") { "//ios/chrome/browser/infobars", "//ios/chrome/browser/metrics", "//ios/chrome/browser/metrics:metrics_internal", - "//ios/chrome/browser/native_app_launcher:native_app_launcher_internal", "//ios/chrome/browser/passwords", "//ios/chrome/browser/passwords:passwords_internal", "//ios/chrome/browser/reading_list", @@ -124,7 +123,6 @@ source_set("tabs_internal") { "//ios/chrome/browser/web_state_list", "//ios/net", "//ios/public/provider/chrome/browser", - "//ios/public/provider/chrome/browser/native_app_launcher", "//ios/web", "//ios/web:user_agent", "//net", @@ -161,16 +159,17 @@ source_set("unit_tests") { "//ios/chrome/browser/sessions", "//ios/chrome/browser/sessions:serialisation", "//ios/chrome/browser/sessions:test_support", + "//ios/chrome/browser/snapshots", "//ios/chrome/browser/ui:ui_internal", + "//ios/chrome/browser/web", "//ios/chrome/browser/web:web_internal", "//ios/chrome/browser/web_state_list", "//ios/chrome/test:test_support", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser:test_support", - "//ios/public/provider/chrome/browser/native_app_launcher:test_support", "//ios/testing:ocmock_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//net", "//testing/gtest", "//third_party/ocmock", diff --git a/chromium/ios/chrome/browser/test/BUILD.gn b/chromium/ios/chrome/browser/test/BUILD.gn index 72ce1899d24..992af1ff3c9 100644 --- a/chromium/ios/chrome/browser/test/BUILD.gn +++ b/chromium/ios/chrome/browser/test/BUILD.gn @@ -26,7 +26,7 @@ source_set("perf_test_support") { "//ios/chrome/test:test_support", "//ios/chrome/test/base:perf_test_support", "//ios/public/provider/chrome/browser", - "//ios/web:test_support", + "//ios/web/public/test", # Perf tests can run with any provider, but the resulting numbers will only # be meaningful if ChromeBrowserProviderImpl is used. diff --git a/chromium/ios/chrome/browser/translate/BUILD.gn b/chromium/ios/chrome/browser/translate/BUILD.gn index 91045afd2d7..f9c44148b0d 100644 --- a/chromium/ios/chrome/browser/translate/BUILD.gn +++ b/chromium/ios/chrome/browser/translate/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("translate") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "after_translate_infobar_controller.h", "after_translate_infobar_controller.mm", @@ -33,6 +34,7 @@ source_set("translate") { "//components/metrics/proto", "//components/prefs", "//components/strings", + "//components/sync", "//components/translate/core/browser", "//components/translate/core/common", "//components/translate/ios/browser", @@ -42,16 +44,20 @@ source_set("translate") { "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/infobars", + "//ios/chrome/browser/language", + "//ios/chrome/browser/sync", "//ios/chrome/browser/ui/infobars", "//ios/web", "//ui/base", "//ui/gfx", "//url", ] + allow_circular_includes_from = [ "//ios/chrome/browser/infobars" ] } source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "js_language_detection_manager_unittest.mm", @@ -63,11 +69,13 @@ source_set("unit_tests") { "//base/test:test_support", "//components/translate/ios/browser", "//ios/chrome/browser", + "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/web:test_support", "//ios/chrome/common", "//ios/public/provider/chrome/browser:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//testing/gmock:gmock", "//testing/gtest", "//url", ] @@ -96,7 +104,8 @@ source_set("external_url_eg_tests") { "//ios/chrome/test/earl_grey:test_support", "//ios/testing:ios_test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//net", "//ui/base", ] diff --git a/chromium/ios/chrome/browser/u2f/BUILD.gn b/chromium/ios/chrome/browser/u2f/BUILD.gn index b79d7ada07e..bfb6babbbd0 100644 --- a/chromium/ios/chrome/browser/u2f/BUILD.gn +++ b/chromium/ios/chrome/browser/u2f/BUILD.gn @@ -31,7 +31,7 @@ source_set("unit_tests") { "//base", "//ios/chrome/browser", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gmock", "//testing/gtest", "//url", diff --git a/chromium/ios/chrome/browser/ui/BUILD.gn b/chromium/ios/chrome/browser/ui/BUILD.gn index 419fce24a46..5db31d0a8ce 100644 --- a/chromium/ios/chrome/browser/ui/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/BUILD.gn @@ -59,6 +59,7 @@ source_set("ui") { } source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "browser_container_view_unittest.mm", @@ -102,7 +103,7 @@ source_set("unit_tests") { "//ios/chrome/browser/ui/activity_services", "//ios/chrome/browser/ui/alert_coordinator", "//ios/chrome/browser/ui/commands", - "//ios/chrome/browser/ui/ntp:ntp_internal", + "//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", @@ -111,7 +112,8 @@ source_set("unit_tests") { "//ios/chrome/test:test_support", "//ios/testing:ocmock_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//net", "//net:test_support", "//testing/gmock", @@ -131,29 +133,6 @@ bundle_data_ib_file("native_content_controller_test_xib") { bundle_data("resources") { sources = [ - "resources/custom_row_voice.png", - "resources/custom_row_voice@2x.png", - "resources/custom_row_voice@2x~ipad.png", - "resources/custom_row_voice@3x.png", - "resources/custom_row_voice_pressed.png", - "resources/custom_row_voice_pressed@2x.png", - "resources/custom_row_voice_pressed@2x~ipad.png", - "resources/custom_row_voice_pressed@3x.png", - "resources/custom_row_voice_pressed~ipad.png", - "resources/custom_row_voice~ipad.png", - "resources/default_favicon.png", - "resources/default_favicon@2x.png", - "resources/default_favicon@3x.png", - "resources/default_favicon_incognito.png", - "resources/default_favicon_incognito@2x.png", - "resources/default_favicon_incognito@3x.png", - "resources/keyboard_bg_portrait_tablet.png", - "resources/keyboard_button.png", - "resources/keyboard_button@2x.png", - "resources/keyboard_button@2x~ipad.png", - "resources/keyboard_button@3x.png", - "resources/keyboard_button~ipad.png", - # 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. @@ -232,6 +211,12 @@ source_set("ui_internal_arc") { 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", @@ -256,7 +241,6 @@ source_set("ui_internal_arc") { "//ios/chrome/browser/geolocation:geolocation_internal", "//ios/chrome/browser/infobars", "//ios/chrome/browser/metrics:metrics_internal", - "//ios/chrome/browser/native_app_launcher:native_app_launcher_internal", "//ios/chrome/browser/net", "//ios/chrome/browser/passwords", "//ios/chrome/browser/prefs", @@ -274,7 +258,6 @@ source_set("ui_internal_arc") { "//ios/chrome/browser/ui/colors", "//ios/chrome/browser/ui/commands", "//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", @@ -282,7 +265,6 @@ source_set("ui_internal_arc") { "//ios/chrome/browser/ui/history", "//ios/chrome/browser/ui/keyboard", "//ios/chrome/browser/ui/ntp", - "//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", @@ -327,7 +309,6 @@ source_set("ui_internal_arc") { "//ios/chrome/browser/ui/overscroll_actions", "//ios/chrome/browser/snapshots:snapshots_internal", "//ios/chrome/browser/web:web_internal", - "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/chrome/browser/ui/stack_view", ] libs = [ @@ -361,6 +342,7 @@ source_set("ui_internal") { "//components/bookmarks/browser", "//components/image_fetcher/ios", "//components/infobars/core", + "//components/payments/core", "//components/prefs", "//components/reading_list/core", "//components/search_engines", @@ -380,7 +362,6 @@ source_set("ui_internal") { "//ios/chrome/browser/geolocation:geolocation_internal", "//ios/chrome/browser/infobars", "//ios/chrome/browser/metrics:metrics_internal", - "//ios/chrome/browser/native_app_launcher:native_app_launcher_internal", "//ios/chrome/browser/net", "//ios/chrome/browser/passwords", "//ios/chrome/browser/prefs", @@ -395,6 +376,7 @@ source_set("ui_internal") { "//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/context_menu", @@ -406,6 +388,7 @@ source_set("ui_internal") { "//ios/chrome/browser/ui/history", "//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", @@ -510,7 +493,8 @@ source_set("external_url_eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//ui/base", ] libs = [ "XCTest.framework" ] @@ -531,7 +515,7 @@ source_set("eg_tests") { "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser/ui/commands", - "//ios/chrome/browser/ui/ntp:ntp_internal", + "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/toolbar", "//ios/chrome/browser/ui/tools_menu", "//ios/chrome/test/app:test_support", @@ -539,7 +523,8 @@ source_set("eg_tests") { "//ios/testing:ios_test_support", "//ios/third_party/earl_grey", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//ui/base", "//url", ] @@ -571,7 +556,7 @@ source_set("perf_tests") { "//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list:test_support", "//ios/chrome/test/base:perf_test_support", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", "//ui/base:test_support", diff --git a/chromium/ios/chrome/browser/ui/activity_services/BUILD.gn b/chromium/ios/chrome/browser/ui/activity_services/BUILD.gn index e2e750cdb5e..0786057e7b2 100644 --- a/chromium/ios/chrome/browser/ui/activity_services/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/activity_services/BUILD.gn @@ -2,31 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("assets") { - sources = [ - "resources/activity_services_print.xcassets/Contents.json", - "resources/activity_services_print.xcassets/activity_services_print.imageset/Contents.json", - "resources/activity_services_print.xcassets/activity_services_print.imageset/activity_services_print-60@2x.png", - "resources/activity_services_print.xcassets/activity_services_print.imageset/activity_services_print-60@3x.png", - "resources/activity_services_print.xcassets/activity_services_print.imageset/activity_services_print-76.png", - "resources/activity_services_print.xcassets/activity_services_print.imageset/activity_services_print-76@2x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - -bundle_data("resources") { - sources = [ - "resources/activity_services_reading_list.png", - "resources/activity_services_reading_list@2x.png", - "resources/activity_services_reading_list@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("activity_services") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ @@ -51,8 +26,8 @@ source_set("activity_services") { "share_to_data_builder.mm", ] deps = [ - ":assets", - ":resources", + "resources:activity_services_print", + "resources:activity_services_reading_list", "//base", "//ios/chrome/app/strings", "//ios/chrome/browser", @@ -85,7 +60,7 @@ source_set("unit_tests") { "//ios/chrome/app/strings", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/tabs", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", "//ui/base", @@ -109,7 +84,8 @@ source_set("eg_tests") { "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/material_components_ios", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//ui/base", ] libs = [ "XCTest.framework" ] diff --git a/chromium/ios/chrome/browser/ui/activity_services/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/activity_services/resources/BUILD.gn new file mode 100644 index 00000000000..171820f39c5 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/activity_services/resources/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright 2017 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/imageset.gni") + +imageset("activity_services_print") { + sources = [ + "activity_services_print.imageset/Contents.json", + "activity_services_print.imageset/activity_services_print-60@2x.png", + "activity_services_print.imageset/activity_services_print-60@3x.png", + "activity_services_print.imageset/activity_services_print-76.png", + "activity_services_print.imageset/activity_services_print-76@2x.png", + ] +} + +imageset("activity_services_reading_list") { + sources = [ + "activity_services_reading_list.imageset/Contents.json", + "activity_services_reading_list.imageset/activity_services_reading_list.png", + "activity_services_reading_list.imageset/activity_services_reading_list@2x.png", + "activity_services_reading_list.imageset/activity_services_reading_list@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/alert_coordinator/BUILD.gn b/chromium/ios/chrome/browser/ui/alert_coordinator/BUILD.gn index 091d86534c1..ada5adbfabd 100644 --- a/chromium/ios/chrome/browser/ui/alert_coordinator/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/alert_coordinator/BUILD.gn @@ -40,7 +40,7 @@ source_set("unit_tests") { "//components/strings", "//ios/chrome/browser/ui", "//ios/chrome/test:test_support", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", "//ui/base", diff --git a/chromium/ios/chrome/browser/ui/authentication/BUILD.gn b/chromium/ios/chrome/browser/ui/authentication/BUILD.gn index e9fe265a387..4753b1c8e21 100644 --- a/chromium/ios/chrome/browser/ui/authentication/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/authentication/BUILD.gn @@ -4,34 +4,8 @@ import("//build/config/chrome_build.gni") -bundle_data("resources") { - sources = [ - "resources/signin_confirmation_more.png", - "resources/signin_confirmation_more@2x.png", - "resources/signin_confirmation_more@3x.png", - "resources/signin_promo_close_gray.png", - "resources/signin_promo_close_gray@2x.png", - "resources/signin_promo_close_gray@3x.png", - ] - if (is_chrome_branded) { - sources += [ - "resources/signin_promo_logo_chrome_color.png", - "resources/signin_promo_logo_chrome_color@2x.png", - "resources/signin_promo_logo_chrome_color@3x.png", - ] - } else { - sources += [ - "resources/signin_promo_logo_chromium_color.png", - "resources/signin_promo_logo_chromium_color@2x.png", - "resources/signin_promo_logo_chromium_color@3x.png", - ] - } - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("authentication") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "authentication_flow.h", "authentication_flow.mm", @@ -56,7 +30,8 @@ source_set("authentication") { deps = [ ":authentication_arc", ":authentication_ui", - ":resources", + "resources:signin_confirmation_more", + "resources:signin_promo_close_gray", "//base", "//components/google/core/browser", "//components/infobars/core", @@ -86,12 +61,18 @@ source_set("authentication") { "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/images", "//ios/public/provider/chrome/browser/signin", + "//ios/shared/chrome/browser/ui/commands", "//ios/third_party/material_components_ios", "//ios/third_party/material_roboto_font_loader_ios", "//ui/base", "//ui/gfx", "//url", ] + if (is_chrome_branded) { + deps += [ "resources:signin_promo_logo_chrome_color" ] + } else { + deps += [ "resources:signin_promo_logo_chromium_color" ] + } libs = [ "CoreGraphics.framework", "QuartzCore.framework", @@ -110,7 +91,10 @@ source_set("authentication_arc") { deps = [ ":authentication_ui", "//base", + "//components/prefs", "//ios/chrome/app/strings", + "//ios/chrome/browser", + "//ios/chrome/browser/browser_state", "//ios/chrome/browser/signin", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/commands", @@ -183,7 +167,7 @@ source_set("unit_tests") { "//ios/chrome/test:test_support", "//ios/public/provider/chrome/browser/signin:test_support", "//ios/third_party/material_components_ios", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", "//ui/base", diff --git a/chromium/ios/chrome/browser/ui/authentication/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/authentication/resources/BUILD.gn new file mode 100644 index 00000000000..9ef1905bd3d --- /dev/null +++ b/chromium/ios/chrome/browser/ui/authentication/resources/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright 2017 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/imageset.gni") + +imageset("signin_confirmation_more") { + sources = [ + "signin_confirmation_more.imageset/Contents.json", + "signin_confirmation_more.imageset/signin_confirmation_more.png", + "signin_confirmation_more.imageset/signin_confirmation_more@2x.png", + "signin_confirmation_more.imageset/signin_confirmation_more@3x.png", + ] +} + +imageset("signin_promo_close_gray") { + sources = [ + "signin_promo_close_gray.imageset/Contents.json", + "signin_promo_close_gray.imageset/signin_promo_close_gray.png", + "signin_promo_close_gray.imageset/signin_promo_close_gray@2x.png", + "signin_promo_close_gray.imageset/signin_promo_close_gray@3x.png", + ] +} + +imageset("signin_promo_logo_chrome_color") { + sources = [ + "signin_promo_logo_chrome_color.imageset/Contents.json", + "signin_promo_logo_chrome_color.imageset/signin_promo_logo_chrome_color.png", + "signin_promo_logo_chrome_color.imageset/signin_promo_logo_chrome_color@2x.png", + "signin_promo_logo_chrome_color.imageset/signin_promo_logo_chrome_color@3x.png", + ] +} + +imageset("signin_promo_logo_chromium_color") { + sources = [ + "signin_promo_logo_chromium_color.imageset/Contents.json", + "signin_promo_logo_chromium_color.imageset/signin_promo_logo_chromium_color.png", + "signin_promo_logo_chromium_color.imageset/signin_promo_logo_chromium_color@2x.png", + "signin_promo_logo_chromium_color.imageset/signin_promo_logo_chromium_color@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/bookmarks/BUILD.gn b/chromium/ios/chrome/browser/ui/bookmarks/BUILD.gn index 8254035186c..f7938545e9d 100644 --- a/chromium/ios/chrome/browser/ui/bookmarks/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/bookmarks/BUILD.gn @@ -19,8 +19,6 @@ source_set("bookmarks") { "bookmark_elevated_toolbar.mm", "bookmark_extended_button.h", "bookmark_extended_button.mm", - "bookmark_folder_collection_view.h", - "bookmark_folder_collection_view.mm", "bookmark_folder_editor_view_controller.h", "bookmark_folder_editor_view_controller.mm", "bookmark_folder_table_view_cell.h", @@ -34,6 +32,7 @@ source_set("bookmarks") { "bookmark_home_tablet_ntp_controller.mm", "bookmark_home_view_controller.h", "bookmark_home_view_controller.mm", + "bookmark_home_view_controller_protected.h", "bookmark_home_waiting_view.h", "bookmark_home_waiting_view.mm", "bookmark_interaction_controller.h", @@ -66,7 +65,27 @@ source_set("bookmarks") { "undo_manager_wrapper.mm", ] deps = [ - ":resources", + "resources:bookmark_bar_innershadow", + "resources:bookmark_bar_shadow", + "resources:bookmark_black_delete", + "resources:bookmark_black_edit", + "resources:bookmark_black_move", + "resources:bookmark_black_select", + "resources:bookmark_blue_check", + "resources:bookmark_blue_folder", + "resources:bookmark_gray_back", + "resources:bookmark_gray_check", + "resources:bookmark_gray_close", + "resources:bookmark_gray_edit", + "resources:bookmark_gray_folder", + "resources:bookmark_gray_menu", + "resources:bookmark_gray_new_folder", + "resources:bookmark_gray_star_large", + "resources:bookmark_more", + "resources:bookmark_white_close", + "resources:bookmark_white_delete", + "resources:bookmark_white_edit", + "resources:bookmark_white_move", "//base", "//base:i18n", "//components/bookmarks/browser", @@ -130,6 +149,7 @@ source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ + "bookmark_home_handset_view_controller_unittest.mm", "bookmark_home_view_controller_unittest.mm", "bookmark_ios_unittest.h", "bookmark_ios_unittest.mm", @@ -144,7 +164,7 @@ source_set("unit_tests") { "//ios/chrome/browser", "//ios/chrome/browser/bookmarks", "//ios/chrome/browser/browser_state:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", ] } @@ -174,7 +194,7 @@ source_set("eg_tests") { "//ios/public/provider/chrome/browser/signin:test_support", "//ios/testing:ios_test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//ui/base", "//url", ] @@ -183,74 +203,3 @@ source_set("eg_tests") { "XCTest.framework", ] } - -bundle_data("resources") { - sources = [ - "resources/bookmark_bar_innershadow.png", - "resources/bookmark_bar_innershadow@2x.png", - "resources/bookmark_bar_innershadow@3x.png", - "resources/bookmark_bar_shadow.png", - "resources/bookmark_bar_shadow@2x.png", - "resources/bookmark_bar_shadow@3x.png", - "resources/bookmark_black_delete.png", - "resources/bookmark_black_delete@2x.png", - "resources/bookmark_black_delete@3x.png", - "resources/bookmark_black_edit.png", - "resources/bookmark_black_edit@2x.png", - "resources/bookmark_black_edit@3x.png", - "resources/bookmark_black_move.png", - "resources/bookmark_black_move@2x.png", - "resources/bookmark_black_move@3x.png", - "resources/bookmark_black_select.png", - "resources/bookmark_black_select@2x.png", - "resources/bookmark_black_select@3x.png", - "resources/bookmark_blue_check.png", - "resources/bookmark_blue_check@2x.png", - "resources/bookmark_blue_check@3x.png", - "resources/bookmark_blue_folder.png", - "resources/bookmark_blue_folder@2x.png", - "resources/bookmark_blue_folder@3x.png", - "resources/bookmark_gray_back.png", - "resources/bookmark_gray_back@2x.png", - "resources/bookmark_gray_back@3x.png", - "resources/bookmark_gray_check.png", - "resources/bookmark_gray_check@2x.png", - "resources/bookmark_gray_check@3x.png", - "resources/bookmark_gray_close.png", - "resources/bookmark_gray_close@2x.png", - "resources/bookmark_gray_close@3x.png", - "resources/bookmark_gray_edit.png", - "resources/bookmark_gray_edit@2x.png", - "resources/bookmark_gray_edit@3x.png", - "resources/bookmark_gray_folder.png", - "resources/bookmark_gray_folder@2x.png", - "resources/bookmark_gray_folder@3x.png", - "resources/bookmark_gray_menu.png", - "resources/bookmark_gray_menu@2x.png", - "resources/bookmark_gray_menu@3x.png", - "resources/bookmark_gray_new_folder.png", - "resources/bookmark_gray_new_folder@2x.png", - "resources/bookmark_gray_new_folder@3x.png", - "resources/bookmark_gray_star_large.png", - "resources/bookmark_gray_star_large@2x.png", - "resources/bookmark_gray_star_large@3x.png", - "resources/bookmark_more.png", - "resources/bookmark_more@2x.png", - "resources/bookmark_more@3x.png", - "resources/bookmark_white_close.png", - "resources/bookmark_white_close@2x.png", - "resources/bookmark_white_close@3x.png", - "resources/bookmark_white_delete.png", - "resources/bookmark_white_delete@2x.png", - "resources/bookmark_white_delete@3x.png", - "resources/bookmark_white_edit.png", - "resources/bookmark_white_edit@2x.png", - "resources/bookmark_white_edit@3x.png", - "resources/bookmark_white_move.png", - "resources/bookmark_white_move@2x.png", - "resources/bookmark_white_move@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} diff --git a/chromium/ios/chrome/browser/ui/bookmarks/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/bookmarks/resources/BUILD.gn new file mode 100644 index 00000000000..8b0fc503e25 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/bookmarks/resources/BUILD.gn @@ -0,0 +1,194 @@ +# Copyright 2017 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/imageset.gni") + +imageset("bookmark_bar_innershadow") { + sources = [ + "bookmark_bar_innershadow.imageset/Contents.json", + "bookmark_bar_innershadow.imageset/bookmark_bar_innershadow.png", + "bookmark_bar_innershadow.imageset/bookmark_bar_innershadow@2x.png", + "bookmark_bar_innershadow.imageset/bookmark_bar_innershadow@3x.png", + ] +} + +imageset("bookmark_bar_shadow") { + sources = [ + "bookmark_bar_shadow.imageset/Contents.json", + "bookmark_bar_shadow.imageset/bookmark_bar_shadow.png", + "bookmark_bar_shadow.imageset/bookmark_bar_shadow@2x.png", + "bookmark_bar_shadow.imageset/bookmark_bar_shadow@3x.png", + ] +} + +imageset("bookmark_black_delete") { + sources = [ + "bookmark_black_delete.imageset/Contents.json", + "bookmark_black_delete.imageset/bookmark_black_delete.png", + "bookmark_black_delete.imageset/bookmark_black_delete@2x.png", + "bookmark_black_delete.imageset/bookmark_black_delete@3x.png", + ] +} + +imageset("bookmark_black_edit") { + sources = [ + "bookmark_black_edit.imageset/Contents.json", + "bookmark_black_edit.imageset/bookmark_black_edit.png", + "bookmark_black_edit.imageset/bookmark_black_edit@2x.png", + "bookmark_black_edit.imageset/bookmark_black_edit@3x.png", + ] +} + +imageset("bookmark_black_move") { + sources = [ + "bookmark_black_move.imageset/Contents.json", + "bookmark_black_move.imageset/bookmark_black_move.png", + "bookmark_black_move.imageset/bookmark_black_move@2x.png", + "bookmark_black_move.imageset/bookmark_black_move@3x.png", + ] +} + +imageset("bookmark_black_select") { + sources = [ + "bookmark_black_select.imageset/Contents.json", + "bookmark_black_select.imageset/bookmark_black_select.png", + "bookmark_black_select.imageset/bookmark_black_select@2x.png", + "bookmark_black_select.imageset/bookmark_black_select@3x.png", + ] +} + +imageset("bookmark_blue_check") { + sources = [ + "bookmark_blue_check.imageset/Contents.json", + "bookmark_blue_check.imageset/bookmark_blue_check.png", + "bookmark_blue_check.imageset/bookmark_blue_check@2x.png", + "bookmark_blue_check.imageset/bookmark_blue_check@3x.png", + ] +} + +imageset("bookmark_blue_folder") { + sources = [ + "bookmark_blue_folder.imageset/Contents.json", + "bookmark_blue_folder.imageset/bookmark_blue_folder.png", + "bookmark_blue_folder.imageset/bookmark_blue_folder@2x.png", + "bookmark_blue_folder.imageset/bookmark_blue_folder@3x.png", + ] +} + +imageset("bookmark_gray_back") { + sources = [ + "bookmark_gray_back.imageset/Contents.json", + "bookmark_gray_back.imageset/bookmark_gray_back.png", + "bookmark_gray_back.imageset/bookmark_gray_back@2x.png", + "bookmark_gray_back.imageset/bookmark_gray_back@3x.png", + ] +} + +imageset("bookmark_gray_check") { + sources = [ + "bookmark_gray_check.imageset/Contents.json", + "bookmark_gray_check.imageset/bookmark_gray_check.png", + "bookmark_gray_check.imageset/bookmark_gray_check@2x.png", + "bookmark_gray_check.imageset/bookmark_gray_check@3x.png", + ] +} + +imageset("bookmark_gray_close") { + sources = [ + "bookmark_gray_close.imageset/Contents.json", + "bookmark_gray_close.imageset/bookmark_gray_close.png", + "bookmark_gray_close.imageset/bookmark_gray_close@2x.png", + "bookmark_gray_close.imageset/bookmark_gray_close@3x.png", + ] +} + +imageset("bookmark_gray_edit") { + sources = [ + "bookmark_gray_edit.imageset/Contents.json", + "bookmark_gray_edit.imageset/bookmark_gray_edit.png", + "bookmark_gray_edit.imageset/bookmark_gray_edit@2x.png", + "bookmark_gray_edit.imageset/bookmark_gray_edit@3x.png", + ] +} + +imageset("bookmark_gray_folder") { + sources = [ + "bookmark_gray_folder.imageset/Contents.json", + "bookmark_gray_folder.imageset/bookmark_gray_folder.png", + "bookmark_gray_folder.imageset/bookmark_gray_folder@2x.png", + "bookmark_gray_folder.imageset/bookmark_gray_folder@3x.png", + ] +} + +imageset("bookmark_gray_menu") { + sources = [ + "bookmark_gray_menu.imageset/Contents.json", + "bookmark_gray_menu.imageset/bookmark_gray_menu.png", + "bookmark_gray_menu.imageset/bookmark_gray_menu@2x.png", + "bookmark_gray_menu.imageset/bookmark_gray_menu@3x.png", + ] +} + +imageset("bookmark_gray_new_folder") { + sources = [ + "bookmark_gray_new_folder.imageset/Contents.json", + "bookmark_gray_new_folder.imageset/bookmark_gray_new_folder.png", + "bookmark_gray_new_folder.imageset/bookmark_gray_new_folder@2x.png", + "bookmark_gray_new_folder.imageset/bookmark_gray_new_folder@3x.png", + ] +} + +imageset("bookmark_gray_star_large") { + sources = [ + "bookmark_gray_star_large.imageset/Contents.json", + "bookmark_gray_star_large.imageset/bookmark_gray_star_large.png", + "bookmark_gray_star_large.imageset/bookmark_gray_star_large@2x.png", + "bookmark_gray_star_large.imageset/bookmark_gray_star_large@3x.png", + ] +} + +imageset("bookmark_more") { + sources = [ + "bookmark_more.imageset/Contents.json", + "bookmark_more.imageset/bookmark_more.png", + "bookmark_more.imageset/bookmark_more@2x.png", + "bookmark_more.imageset/bookmark_more@3x.png", + ] +} + +imageset("bookmark_white_close") { + sources = [ + "bookmark_white_close.imageset/Contents.json", + "bookmark_white_close.imageset/bookmark_white_close.png", + "bookmark_white_close.imageset/bookmark_white_close@2x.png", + "bookmark_white_close.imageset/bookmark_white_close@3x.png", + ] +} + +imageset("bookmark_white_delete") { + sources = [ + "bookmark_white_delete.imageset/Contents.json", + "bookmark_white_delete.imageset/bookmark_white_delete.png", + "bookmark_white_delete.imageset/bookmark_white_delete@2x.png", + "bookmark_white_delete.imageset/bookmark_white_delete@3x.png", + ] +} + +imageset("bookmark_white_edit") { + sources = [ + "bookmark_white_edit.imageset/Contents.json", + "bookmark_white_edit.imageset/bookmark_white_edit.png", + "bookmark_white_edit.imageset/bookmark_white_edit@2x.png", + "bookmark_white_edit.imageset/bookmark_white_edit@3x.png", + ] +} + +imageset("bookmark_white_move") { + sources = [ + "bookmark_white_move.imageset/Contents.json", + "bookmark_white_move.imageset/bookmark_white_move.png", + "bookmark_white_move.imageset/bookmark_white_move@2x.png", + "bookmark_white_move.imageset/bookmark_white_move@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/bubble/BUILD.gn b/chromium/ios/chrome/browser/ui/bubble/BUILD.gn new file mode 100644 index 00000000000..bf0aeeb659a --- /dev/null +++ b/chromium/ios/chrome/browser/ui/bubble/BUILD.gn @@ -0,0 +1,30 @@ +# Copyright 2017 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. + +source_set("bubble") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "bubble_view.h", + "bubble_view.mm", + "bubble_view_controller.h", + "bubble_view_controller.mm", + ] + deps = [ + "//base", + ] + libs = [ "UIKit.framework" ] +} + +source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "bubble_view_controller_unittest.mm", + ] + deps = [ + ":bubble", + "//base", + "//testing/gtest", + ] +} diff --git a/chromium/ios/chrome/browser/ui/commands/BUILD.gn b/chromium/ios/chrome/browser/ui/commands/BUILD.gn index ce2d0523b5c..1da2ed3f97f 100644 --- a/chromium/ios/chrome/browser/ui/commands/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/commands/BUILD.gn @@ -7,17 +7,19 @@ source_set("commands") { sources = [ "UIKit+ChromeExecuteCommand.h", "UIKit+ChromeExecuteCommand.mm", + "application_commands.h", + "browser_commands.h", "clear_browsing_data_command.h", "clear_browsing_data_command.mm", "generic_chrome_command.h", "generic_chrome_command.mm", "ios_command_ids.h", + "open_new_tab_command.h", + "open_new_tab_command.mm", "open_url_command.h", "open_url_command.mm", "reading_list_add_command.h", "reading_list_add_command.mm", - "set_up_for_testing_command.h", - "set_up_for_testing_command.mm", "show_mail_composer_command.h", "show_mail_composer_command.mm", "show_signin_command.h", @@ -27,22 +29,9 @@ source_set("commands") { "//base", "//components/browsing_data/core", "//components/signin/core/browser", + "//ios/shared/chrome/browser/ui/commands", "//ios/web", "//net", "//url", ] } - -source_set("unit_tests") { - configs += [ "//build/config/compiler:enable_arc" ] - testonly = true - sources = [ - "set_up_for_testing_command_unittest.mm", - ] - deps = [ - ":commands", - "//base", - "//testing/gtest", - "//url", - ] -} diff --git a/chromium/ios/chrome/browser/ui/content_suggestions/BUILD.gn b/chromium/ios/chrome/browser/ui/content_suggestions/BUILD.gn index 5c0e77269e0..247b51b8ffc 100644 --- a/chromium/ios/chrome/browser/ui/content_suggestions/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/content_suggestions/BUILD.gn @@ -4,30 +4,37 @@ source_set("content_suggestions") { sources = [ + "content_suggestions_collection_controlling.h", + "content_suggestions_collection_synchronizing.h", "content_suggestions_collection_updater.h", "content_suggestions_collection_updater.mm", - "content_suggestions_collection_utils.h", - "content_suggestions_collection_utils.mm", "content_suggestions_commands.h", "content_suggestions_data_sink.h", "content_suggestions_data_source.h", - "content_suggestions_image_fetcher.h", + "content_suggestions_header_controlling.h", + "content_suggestions_header_synchronizer.h", + "content_suggestions_header_synchronizer.mm", + "content_suggestions_header_synchronizing.h", + "content_suggestions_layout.h", + "content_suggestions_layout.mm", "content_suggestions_view_controller.h", "content_suggestions_view_controller.mm", + "content_suggestions_view_controller_audience.h", + "content_suggestions_view_controller_delegate.h", ] deps = [ - ":resources", + ":content_suggestions_util", + "resources:content_suggestions_no_image", + "resources:content_suggestions_offline", "//base", "//components/strings", - "//ios/chrome/app/strings", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/collection_view", - "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/content_suggestions/cells:cells_ui", "//ios/chrome/browser/ui/content_suggestions/identifier", "//ios/chrome/browser/ui/favicon:favicon_ui", - "//ios/chrome/browser/ui/toolbar", - "//mojo/common:common_custom_types", + "//ios/chrome/browser/ui/ntp:ntp_header", + "//ios/chrome/browser/ui/overscroll_actions", "//ui/base", ] public_deps = [ @@ -36,14 +43,36 @@ source_set("content_suggestions") { configs += [ "//build/config/compiler:enable_arc" ] } +source_set("content_suggestions_util") { + sources = [ + "content_suggestions_collection_utils.h", + "content_suggestions_collection_utils.mm", + ] + deps = [ + "//base", + "//components/strings", + "//ios/chrome/app/strings", + "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/commands", + "//ios/chrome/browser/ui/content_suggestions/cells:cells_ui", + "//ios/chrome/browser/ui/toolbar", + "//ios/third_party/material_components_ios", + "//mojo/common:common_custom_types", + "//ui/base", + ] + configs += [ "//build/config/compiler:enable_arc" ] +} + source_set("unit_tests") { testonly = true sources = [ "content_suggestions_collection_updater_unittest.mm", "content_suggestions_collection_utils_unittest.mm", + "content_suggestions_header_synchronizer_unittest.mm", ] deps = [ ":content_suggestions", + ":content_suggestions_util", "//base", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/collection_view", @@ -55,17 +84,3 @@ source_set("unit_tests") { ] configs += [ "//build/config/compiler:enable_arc" ] } - -bundle_data("resources") { - sources = [ - "resources/content_suggestions_no_image.png", - "resources/content_suggestions_no_image@2x.png", - "resources/content_suggestions_no_image@3x.png", - "resources/content_suggestions_offline.png", - "resources/content_suggestions_offline@2x.png", - "resources/content_suggestions_offline@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} diff --git a/chromium/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn b/chromium/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn index 024129d3fa4..5acdb95969a 100644 --- a/chromium/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/content_suggestions/cells/BUILD.gn @@ -12,9 +12,12 @@ source_set("cells") { deps = [ ":cells_ui", "//base", + "//components/ntp_tiles", + "//ios/chrome/app/strings", "//ios/chrome/browser/ui/collection_view", "//ios/chrome/browser/ui/content_suggestions/identifier", "//ios/chrome/browser/ui/favicon:favicon_ui", + "//ui/base", "//url", ] configs += [ "//build/config/compiler:enable_arc" ] @@ -26,10 +29,14 @@ source_set("cells_ui") { "content_suggestions_cell.mm", "content_suggestions_footer_item.h", "content_suggestions_footer_item.mm", + "content_suggestions_header_item.h", + "content_suggestions_header_item.mm", "content_suggestions_most_visited_cell.h", "content_suggestions_most_visited_cell.mm", "content_suggestions_text_item.h", "content_suggestions_text_item.mm", + "content_suggestions_whats_new_item.h", + "content_suggestions_whats_new_item.mm", "suggested_content.h", ] deps = [ @@ -40,6 +47,7 @@ source_set("cells_ui") { "//ios/chrome/browser/ui/content_suggestions/identifier", "//ios/chrome/browser/ui/favicon:favicon_ui", "//ios/chrome/browser/ui/util", + "//ios/chrome/common", "//ui/base", ] configs += [ "//build/config/compiler:enable_arc" ] @@ -49,18 +57,22 @@ source_set("unit_tests") { testonly = true sources = [ "content_suggestions_footer_item_unittest.mm", + "content_suggestions_header_item_unittest.mm", "content_suggestions_item_unittest.mm", "content_suggestions_most_visited_item_unittest.mm", + "content_suggestions_whats_new_item_unittest.mm", ] deps = [ ":cells", ":cells_ui", "//base", + "//ios/chrome/app/strings", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/collection_view", "//ios/chrome/browser/ui/favicon:favicon_ui", "//testing/gtest", "//third_party/ocmock", + "//ui/base", "//url", ] configs += [ "//build/config/compiler:enable_arc" ] diff --git a/chromium/ios/chrome/browser/ui/content_suggestions/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/content_suggestions/resources/BUILD.gn new file mode 100644 index 00000000000..efddf80293c --- /dev/null +++ b/chromium/ios/chrome/browser/ui/content_suggestions/resources/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright 2017 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/imageset.gni") + +imageset("content_suggestions_no_image") { + sources = [ + "content_suggestions_no_image.imageset/Contents.json", + "content_suggestions_no_image.imageset/content_suggestions_no_image.png", + "content_suggestions_no_image.imageset/content_suggestions_no_image@2x.png", + "content_suggestions_no_image.imageset/content_suggestions_no_image@3x.png", + ] +} + +imageset("content_suggestions_offline") { + sources = [ + "content_suggestions_offline.imageset/Contents.json", + "content_suggestions_offline.imageset/content_suggestions_offline.png", + "content_suggestions_offline.imageset/content_suggestions_offline@2x.png", + "content_suggestions_offline.imageset/content_suggestions_offline@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/contextual_search/BUILD.gn b/chromium/ios/chrome/browser/ui/contextual_search/BUILD.gn index 1ad528c1a06..08b8cdaf448 100644 --- a/chromium/ios/chrome/browser/ui/contextual_search/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/contextual_search/BUILD.gn @@ -4,17 +4,6 @@ import("//ios/web/js_compile.gni") -bundle_data("resources") { - sources = [ - "resources/expand_less.png", - "resources/expand_less@2x.png", - "resources/expand_less@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - js_compile_unchecked("injected_js") { sources = [ "resources/contextualsearch.js", @@ -57,6 +46,8 @@ source_set("contextual_search") { "contextual_search_results_view.mm", "contextual_search_web_state_observer.h", "contextual_search_web_state_observer.mm", + "contextual_search_wrangler.h", + "contextual_search_wrangler.mm", "js_contextual_search_manager.h", "js_contextual_search_manager.mm", "panel_configuration.h", @@ -68,7 +59,7 @@ source_set("contextual_search") { ] deps = [ ":injected_js", - ":resources", + "resources:expand_less", "//base", "//components/google/core/browser", "//components/prefs", @@ -138,7 +129,7 @@ source_set("unit_tests") { "//ios/chrome/browser/sync:test_support", "//ios/chrome/browser/web:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//net", "//testing/gtest", "//third_party/ocmock", diff --git a/chromium/ios/chrome/browser/ui/contextual_search/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/contextual_search/resources/BUILD.gn new file mode 100644 index 00000000000..30af686d874 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/contextual_search/resources/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright 2017 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/imageset.gni") + +imageset("expand_less") { + sources = [ + "expand_less.imageset/Contents.json", + "expand_less.imageset/expand_less.png", + "expand_less.imageset/expand_less@2x.png", + "expand_less.imageset/expand_less@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/contextual_search/settings/BUILD.gn b/chromium/ios/chrome/browser/ui/contextual_search/settings/BUILD.gn new file mode 100644 index 00000000000..95727a19c9a --- /dev/null +++ b/chromium/ios/chrome/browser/ui/contextual_search/settings/BUILD.gn @@ -0,0 +1,48 @@ +# 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. + +source_set("settings") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "contextual_search_collection_view_controller.h", + "contextual_search_collection_view_controller.mm", + ] + deps = [ + "//base", + "//components/google/core/browser", + "//components/prefs", + "//components/strings:components_strings_grit", + "//ios/chrome/app/strings:ios_strings_grit", + "//ios/chrome/browser", + "//ios/chrome/browser/browser_state", + "//ios/chrome/browser/ui/collection_view", + "//ios/chrome/browser/ui/contextual_search", + "//ios/chrome/browser/ui/settings", + "//ios/third_party/material_components_ios", + "//ui/base:base", + ] + libs = [ "UIKit.framework" ] +} + +source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "contextual_search_collection_view_controller_unittest.mm", + ] + deps = [ + ":settings", + "//base", + "//base/test:test_support", + "//components/strings:components_strings_grit", + "//ios/chrome/app/strings:ios_strings_grit", + "//ios/chrome/browser/browser_state:test_support", + "//ios/chrome/browser/ui/collection_view:test_support", + "//ios/chrome/browser/ui/contextual_search", + "//ios/third_party/material_components_ios", + "//ios/web/public/test", + "//testing/gtest", + "//ui/base:base", + ] +} diff --git a/chromium/ios/chrome/browser/ui/dialogs/BUILD.gn b/chromium/ios/chrome/browser/ui/dialogs/BUILD.gn index d28a3a563cf..4a505f1a127 100644 --- a/chromium/ios/chrome/browser/ui/dialogs/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/dialogs/BUILD.gn @@ -26,7 +26,7 @@ source_set("unit_tests") { deps = [ ":dialogs", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", ] @@ -40,8 +40,6 @@ source_set("dialogs_internal") { "dialog_presenter.mm", "java_script_dialog_presenter_impl.h", "java_script_dialog_presenter_impl.mm", - "nsurl_protection_space_util.h", - "nsurl_protection_space_util.mm", ] deps = [ ":dialogs", @@ -51,6 +49,7 @@ source_set("dialogs_internal") { "//ios/chrome/app/strings", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/alert_coordinator", + "//ios/shared/chrome/browser/ui/dialogs", "//ios/web", "//ui/base", "//url", @@ -63,7 +62,6 @@ source_set("unit_tests_internal") { testonly = true sources = [ "dialog_presenter_unittest.mm", - "nsurl_protection_space_util_unittest.mm", ] deps = [ ":dialogs_internal", @@ -71,8 +69,9 @@ source_set("unit_tests_internal") { "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser/ui/alert_coordinator", + "//ios/shared/chrome/browser/ui/dialogs:unit_tests", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", "//ui/base", "//url", @@ -98,7 +97,9 @@ source_set("eg_tests") { "//ios/testing/earl_grey:earl_grey_support", "//ios/third_party/earl_grey", "//ios/web", - "//ios/web:test_support", + "//ios/web:earl_grey_test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//ui/base", "//url", ] diff --git a/chromium/ios/chrome/browser/ui/downloads/BUILD.gn b/chromium/ios/chrome/browser/ui/downloads/BUILD.gn index c8bafe42bcb..64861f261b9 100644 --- a/chromium/ios/chrome/browser/ui/downloads/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/downloads/BUILD.gn @@ -2,37 +2,9 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/ios/imageset.gni") import("//build/config/ios/rules.gni") -bundle_data("assets") { - sources = [ - "resources/download_manager_assets.xcassets/Contents.json", - "resources/download_manager_assets.xcassets/error_icon.imageset/Contents.json", - "resources/download_manager_assets.xcassets/error_icon.imageset/error_icon.png", - "resources/download_manager_assets.xcassets/error_icon.imageset/error_icon@2x.png", - "resources/download_manager_assets.xcassets/error_icon.imageset/error_icon@3x.png", - "resources/download_manager_assets.xcassets/file_icon_body.imageset/Contents.json", - "resources/download_manager_assets.xcassets/file_icon_body.imageset/file_icon_body.png", - "resources/download_manager_assets.xcassets/file_icon_body.imageset/file_icon_body@2x.png", - "resources/download_manager_assets.xcassets/file_icon_body.imageset/file_icon_body@3x.png", - "resources/download_manager_assets.xcassets/file_icon_fold.imageset/Contents.json", - "resources/download_manager_assets.xcassets/file_icon_fold.imageset/file_icon_fold.png", - "resources/download_manager_assets.xcassets/file_icon_fold.imageset/file_icon_fold@2x.png", - "resources/download_manager_assets.xcassets/file_icon_fold.imageset/file_icon_fold@3x.png", - "resources/download_manager_assets.xcassets/file_icon_fold_complete.imageset/Contents.json", - "resources/download_manager_assets.xcassets/file_icon_fold_complete.imageset/file_icon_fold_complete.png", - "resources/download_manager_assets.xcassets/file_icon_fold_complete.imageset/file_icon_fold_complete@2x.png", - "resources/download_manager_assets.xcassets/file_icon_fold_complete.imageset/file_icon_fold_complete@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - -bundle_data_ib_file("download_manager_controller_xib") { - source = "resources/DownloadManagerController.xib" -} - source_set("downloads") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ @@ -40,21 +12,20 @@ source_set("downloads") { "download_manager_controller.mm", ] deps = [ - ":assets", ":download_manager_controller_xib", + ":error_icon", + ":file_icon_body", + ":file_icon_fold", + ":file_icon_fold_complete", "//base", "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser", - "//ios/chrome/browser/native_app_launcher", - "//ios/chrome/browser/native_app_launcher:native_app_launcher_internal", "//ios/chrome/browser/store_kit", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/alert_coordinator", "//ios/chrome/browser/ui/colors", "//ios/chrome/browser/web:web_internal", - "//ios/public/provider/chrome/browser", - "//ios/public/provider/chrome/browser/native_app_launcher", "//ios/third_party/material_components_ios", "//ios/third_party/material_roboto_font_loader_ios", "//ios/web", @@ -78,9 +49,49 @@ source_set("unit_tests") { "//ios/chrome/browser", "//ios/chrome/browser/store_kit", "//ios/chrome/browser/web:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//net:test_support", "//testing/gtest", "//third_party/ocmock:ocmock", ] } + +bundle_data_ib_file("download_manager_controller_xib") { + source = "resources/DownloadManagerController.xib" +} + +imageset("error_icon") { + sources = [ + "resources/download_manager_assets.xcassets/error_icon.imageset/Contents.json", + "resources/download_manager_assets.xcassets/error_icon.imageset/error_icon.png", + "resources/download_manager_assets.xcassets/error_icon.imageset/error_icon@2x.png", + "resources/download_manager_assets.xcassets/error_icon.imageset/error_icon@3x.png", + ] +} + +imageset("file_icon_body") { + sources = [ + "resources/download_manager_assets.xcassets/file_icon_body.imageset/Contents.json", + "resources/download_manager_assets.xcassets/file_icon_body.imageset/file_icon_body.png", + "resources/download_manager_assets.xcassets/file_icon_body.imageset/file_icon_body@2x.png", + "resources/download_manager_assets.xcassets/file_icon_body.imageset/file_icon_body@3x.png", + ] +} + +imageset("file_icon_fold") { + sources = [ + "resources/download_manager_assets.xcassets/file_icon_fold.imageset/Contents.json", + "resources/download_manager_assets.xcassets/file_icon_fold.imageset/file_icon_fold.png", + "resources/download_manager_assets.xcassets/file_icon_fold.imageset/file_icon_fold@2x.png", + "resources/download_manager_assets.xcassets/file_icon_fold.imageset/file_icon_fold@3x.png", + ] +} + +imageset("file_icon_fold_complete") { + sources = [ + "resources/download_manager_assets.xcassets/file_icon_fold_complete.imageset/Contents.json", + "resources/download_manager_assets.xcassets/file_icon_fold_complete.imageset/file_icon_fold_complete.png", + "resources/download_manager_assets.xcassets/file_icon_fold_complete.imageset/file_icon_fold_complete@2x.png", + "resources/download_manager_assets.xcassets/file_icon_fold_complete.imageset/file_icon_fold_complete@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/elements/BUILD.gn b/chromium/ios/chrome/browser/ui/elements/BUILD.gn index e7c79a3f17f..b5028dff5b7 100644 --- a/chromium/ios/chrome/browser/ui/elements/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/elements/BUILD.gn @@ -38,6 +38,7 @@ source_set("unit_tests") { } source_set("elements_internal") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "activity_overlay_coordinator.h", "activity_overlay_coordinator.mm", diff --git a/chromium/ios/chrome/browser/ui/fancy_ui/BUILD.gn b/chromium/ios/chrome/browser/ui/fancy_ui/BUILD.gn index b120f710de2..80139bed153 100644 --- a/chromium/ios/chrome/browser/ui/fancy_ui/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/fancy_ui/BUILD.gn @@ -7,10 +7,10 @@ source_set("fancy_ui") { sources = [ "bidi_container_view.h", "bidi_container_view.mm", + "colored_button.h", + "colored_button.mm", "primary_action_button.h", "primary_action_button.mm", - "tinted_button.h", - "tinted_button.mm", ] deps = [ "//base", diff --git a/chromium/ios/chrome/browser/ui/favicon/BUILD.gn b/chromium/ios/chrome/browser/ui/favicon/BUILD.gn index 792c9486390..d31f2c23c00 100644 --- a/chromium/ios/chrome/browser/ui/favicon/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/favicon/BUILD.gn @@ -12,6 +12,7 @@ source_set("favicon") { "//base", "//components/favicon/core", "//components/favicon_base", + "//ios/chrome/browser/favicon", "//url", ] configs += [ "//build/config/compiler:enable_arc" ] diff --git a/chromium/ios/chrome/browser/ui/find_bar/BUILD.gn b/chromium/ios/chrome/browser/ui/find_bar/BUILD.gn index fa5f4960e4e..9ca15b22028 100644 --- a/chromium/ios/chrome/browser/ui/find_bar/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/find_bar/BUILD.gn @@ -2,61 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/find_bg@2x~ipad.png", - "resources/find_bg~ipad.png", - "resources/find_close.png", - "resources/find_close@2x.png", - "resources/find_close@3x.png", - "resources/find_close_incognito.png", - "resources/find_close_incognito@2x.png", - "resources/find_close_incognito@3x.png", - "resources/find_close_pressed.png", - "resources/find_close_pressed@2x.png", - "resources/find_close_pressed@3x.png", - "resources/find_next.png", - "resources/find_next@2x.png", - "resources/find_next@3x.png", - "resources/find_next_disabled.png", - "resources/find_next_disabled@2x.png", - "resources/find_next_disabled@3x.png", - "resources/find_next_disabled_incognito.png", - "resources/find_next_disabled_incognito@2x.png", - "resources/find_next_disabled_incognito@3x.png", - "resources/find_next_incognito.png", - "resources/find_next_incognito@2x.png", - "resources/find_next_incognito@3x.png", - "resources/find_next_pressed.png", - "resources/find_next_pressed@2x.png", - "resources/find_next_pressed@3x.png", - "resources/find_next_pressed_incognito.png", - "resources/find_next_pressed_incognito@2x.png", - "resources/find_next_pressed_incognito@3x.png", - "resources/find_prev.png", - "resources/find_prev@2x.png", - "resources/find_prev@3x.png", - "resources/find_prev_disabled.png", - "resources/find_prev_disabled@2x.png", - "resources/find_prev_disabled@3x.png", - "resources/find_prev_disabled_incognito.png", - "resources/find_prev_disabled_incognito@2x.png", - "resources/find_prev_disabled_incognito@3x.png", - "resources/find_prev_incognito.png", - "resources/find_prev_incognito@2x.png", - "resources/find_prev_incognito@3x.png", - "resources/find_prev_pressed.png", - "resources/find_prev_pressed@2x.png", - "resources/find_prev_pressed@3x.png", - "resources/find_prev_pressed_incognito.png", - "resources/find_prev_pressed_incognito@2x.png", - "resources/find_prev_pressed_incognito@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("find_bar") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ @@ -68,7 +13,22 @@ source_set("find_bar") { "find_bar_view.mm", ] deps = [ - ":resources", + "resources:find_bg", + "resources:find_close", + "resources:find_close_incognito", + "resources:find_close_pressed", + "resources:find_next", + "resources:find_next_disabled", + "resources:find_next_disabled_incognito", + "resources:find_next_incognito", + "resources:find_next_pressed", + "resources:find_next_pressed_incognito", + "resources:find_prev", + "resources:find_prev_disabled", + "resources:find_prev_disabled_incognito", + "resources:find_prev_incognito", + "resources:find_prev_pressed", + "resources:find_prev_pressed_incognito", "//base", "//base:i18n", "//components/strings", @@ -99,7 +59,7 @@ source_set("eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/testing:ios_test_support", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//ui/base", ] libs = [ "XCTest.framework" ] diff --git a/chromium/ios/chrome/browser/ui/find_bar/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/find_bar/resources/BUILD.gn new file mode 100644 index 00000000000..424a5683ff3 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/find_bar/resources/BUILD.gn @@ -0,0 +1,148 @@ +# Copyright 2017 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/imageset.gni") + +imageset("find_prev_disabled_incognito") { + sources = [ + "find_prev_disabled_incognito.imageset/Contents.json", + "find_prev_disabled_incognito.imageset/find_prev_disabled_incognito.png", + "find_prev_disabled_incognito.imageset/find_prev_disabled_incognito@2x.png", + "find_prev_disabled_incognito.imageset/find_prev_disabled_incognito@3x.png", + ] +} + +imageset("find_bg") { + sources = [ + "find_bg.imageset/Contents.json", + "find_bg.imageset/find_bg@2x~ipad.png", + "find_bg.imageset/find_bg~ipad.png", + ] +} + +imageset("find_next_incognito") { + sources = [ + "find_next_incognito.imageset/Contents.json", + "find_next_incognito.imageset/find_next_incognito.png", + "find_next_incognito.imageset/find_next_incognito@2x.png", + "find_next_incognito.imageset/find_next_incognito@3x.png", + ] +} + +imageset("find_prev_pressed_incognito") { + sources = [ + "find_prev_pressed_incognito.imageset/Contents.json", + "find_prev_pressed_incognito.imageset/find_prev_pressed_incognito.png", + "find_prev_pressed_incognito.imageset/find_prev_pressed_incognito@2x.png", + "find_prev_pressed_incognito.imageset/find_prev_pressed_incognito@3x.png", + ] +} + +imageset("find_prev_disabled") { + sources = [ + "find_prev_disabled.imageset/Contents.json", + "find_prev_disabled.imageset/find_prev_disabled.png", + "find_prev_disabled.imageset/find_prev_disabled@2x.png", + "find_prev_disabled.imageset/find_prev_disabled@3x.png", + ] +} + +imageset("find_prev") { + sources = [ + "find_prev.imageset/Contents.json", + "find_prev.imageset/find_prev.png", + "find_prev.imageset/find_prev@2x.png", + "find_prev.imageset/find_prev@3x.png", + ] +} + +imageset("find_prev_incognito") { + sources = [ + "find_prev_incognito.imageset/Contents.json", + "find_prev_incognito.imageset/find_prev_incognito.png", + "find_prev_incognito.imageset/find_prev_incognito@2x.png", + "find_prev_incognito.imageset/find_prev_incognito@3x.png", + ] +} + +imageset("find_close") { + sources = [ + "find_close.imageset/Contents.json", + "find_close.imageset/find_close.png", + "find_close.imageset/find_close@2x.png", + "find_close.imageset/find_close@3x.png", + ] +} + +imageset("find_close_incognito") { + sources = [ + "find_close_incognito.imageset/Contents.json", + "find_close_incognito.imageset/find_close_incognito.png", + "find_close_incognito.imageset/find_close_incognito@2x.png", + "find_close_incognito.imageset/find_close_incognito@3x.png", + ] +} + +imageset("find_prev_pressed") { + sources = [ + "find_prev_pressed.imageset/Contents.json", + "find_prev_pressed.imageset/find_prev_pressed.png", + "find_prev_pressed.imageset/find_prev_pressed@2x.png", + "find_prev_pressed.imageset/find_prev_pressed@3x.png", + ] +} + +imageset("find_close_pressed") { + sources = [ + "find_close_pressed.imageset/Contents.json", + "find_close_pressed.imageset/find_close_pressed.png", + "find_close_pressed.imageset/find_close_pressed@2x.png", + "find_close_pressed.imageset/find_close_pressed@3x.png", + ] +} + +imageset("find_next_disabled") { + sources = [ + "find_next_disabled.imageset/Contents.json", + "find_next_disabled.imageset/find_next_disabled.png", + "find_next_disabled.imageset/find_next_disabled@2x.png", + "find_next_disabled.imageset/find_next_disabled@3x.png", + ] +} + +imageset("find_next_disabled_incognito") { + sources = [ + "find_next_disabled_incognito.imageset/Contents.json", + "find_next_disabled_incognito.imageset/find_next_disabled_incognito.png", + "find_next_disabled_incognito.imageset/find_next_disabled_incognito@2x.png", + "find_next_disabled_incognito.imageset/find_next_disabled_incognito@3x.png", + ] +} + +imageset("find_next_pressed_incognito") { + sources = [ + "find_next_pressed_incognito.imageset/Contents.json", + "find_next_pressed_incognito.imageset/find_next_pressed_incognito.png", + "find_next_pressed_incognito.imageset/find_next_pressed_incognito@2x.png", + "find_next_pressed_incognito.imageset/find_next_pressed_incognito@3x.png", + ] +} + +imageset("find_next") { + sources = [ + "find_next.imageset/Contents.json", + "find_next.imageset/find_next.png", + "find_next.imageset/find_next@2x.png", + "find_next.imageset/find_next@3x.png", + ] +} + +imageset("find_next_pressed") { + sources = [ + "find_next_pressed.imageset/Contents.json", + "find_next_pressed.imageset/find_next_pressed.png", + "find_next_pressed.imageset/find_next_pressed@2x.png", + "find_next_pressed.imageset/find_next_pressed@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/first_run/BUILD.gn b/chromium/ios/chrome/browser/ui/first_run/BUILD.gn index 7ed8dec664a..e80e8160094 100644 --- a/chromium/ios/chrome/browser/ui/first_run/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/first_run/BUILD.gn @@ -2,25 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("assets") { - sources = [ - "resources/FirstRun.xcassets/checkbox.imageset/Contents.json", - "resources/FirstRun.xcassets/checkbox.imageset/checkbox.png", - "resources/FirstRun.xcassets/checkbox.imageset/checkbox@2x.png", - "resources/FirstRun.xcassets/checkbox.imageset/checkbox@2x~ipad.png", - "resources/FirstRun.xcassets/checkbox.imageset/checkbox@3x.png", - "resources/FirstRun.xcassets/checkbox.imageset/checkbox~ipad.png", - "resources/FirstRun.xcassets/checkbox_checked.imageset/Contents.json", - "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked.png", - "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked@2x.png", - "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked@2x~ipad.png", - "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked@3x.png", - "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked~ipad.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} +import("//build/config/ios/imageset.gni") source_set("first_run") { configs += [ "//build/config/compiler:enable_arc" ] @@ -38,7 +20,8 @@ source_set("first_run") { "welcome_to_chrome_view_controller.mm", ] deps = [ - ":assets", + ":checkbox", + ":checkbox_checked", "//base", "//base:i18n", "//components/metrics", @@ -92,7 +75,7 @@ source_set("unit_tests") { "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/fancy_ui", "//ios/chrome/test:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", ] @@ -107,6 +90,7 @@ source_set("eg_tests") { deps = [ ":first_run", "//base", + "//base/test:test_support", "//components/metrics", "//components/prefs", "//components/signin/core/browser", @@ -120,8 +104,31 @@ source_set("eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/public/provider/chrome/browser/signin:test_support", + "//ios/testing:ios_test_support", "//ios/third_party/earl_grey", "//ui/base", ] libs = [ "XCTest.framework" ] } + +imageset("checkbox") { + sources = [ + "resources/FirstRun.xcassets/checkbox.imageset/Contents.json", + "resources/FirstRun.xcassets/checkbox.imageset/checkbox.png", + "resources/FirstRun.xcassets/checkbox.imageset/checkbox@2x.png", + "resources/FirstRun.xcassets/checkbox.imageset/checkbox@2x~ipad.png", + "resources/FirstRun.xcassets/checkbox.imageset/checkbox@3x.png", + "resources/FirstRun.xcassets/checkbox.imageset/checkbox~ipad.png", + ] +} + +imageset("checkbox_checked") { + sources = [ + "resources/FirstRun.xcassets/checkbox_checked.imageset/Contents.json", + "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked.png", + "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked@2x.png", + "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked@2x~ipad.png", + "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked@3x.png", + "resources/FirstRun.xcassets/checkbox_checked.imageset/checkbox_checked~ipad.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/history/BUILD.gn b/chromium/ios/chrome/browser/ui/history/BUILD.gn index 373847d6819..8a68a81c354 100644 --- a/chromium/ios/chrome/browser/ui/history/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/history/BUILD.gn @@ -91,6 +91,7 @@ source_set("history") { } source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "favicon_view_provider_unittest.mm", @@ -125,7 +126,7 @@ source_set("unit_tests") { "//ios/chrome/common", "//ios/chrome/test:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//skia", "//testing/gmock", "//testing/gtest", @@ -174,7 +175,7 @@ source_set("unit_tests_arc") { "//ios/chrome/common", "//ios/chrome/test:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//skia", "//testing/gmock", "//testing/gtest", @@ -227,7 +228,8 @@ source_set("eg_tests") { "//ios/public/provider/chrome/browser/signin:test_support", "//ios/testing:ios_test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//net", "//ui/base", ] diff --git a/chromium/ios/chrome/browser/ui/icons/BUILD.gn b/chromium/ios/chrome/browser/ui/icons/BUILD.gn index 59e0dcf1810..af58f4c2d2f 100644 --- a/chromium/ios/chrome/browser/ui/icons/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/icons/BUILD.gn @@ -9,9 +9,13 @@ source_set("icons") { "chrome_icon.mm", ] deps = [ - ":assets", "//base", "//ios/chrome/app/strings", + "//third_party/material_design_icons:ic_arrow_back", + "//third_party/material_design_icons:ic_chevron_right", + "//third_party/material_design_icons:ic_close", + "//third_party/material_design_icons:ic_info", + "//third_party/material_design_icons:ic_search", "//ui/base", ] libs = [ @@ -35,30 +39,14 @@ source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] } -bundle_data("assets") { - sources = [ - "resources/Icons.xcassets/ic_arrow_back.imageset/Contents.json", - "resources/Icons.xcassets/ic_arrow_back.imageset/ic_arrow_back.png", - "resources/Icons.xcassets/ic_arrow_back.imageset/ic_arrow_back_2x.png", - "resources/Icons.xcassets/ic_arrow_back.imageset/ic_arrow_back_3x.png", - "resources/Icons.xcassets/ic_chevron_right.imageset/Contents.json", - "resources/Icons.xcassets/ic_chevron_right.imageset/ic_chevron_right.png", - "resources/Icons.xcassets/ic_chevron_right.imageset/ic_chevron_right_2x.png", - "resources/Icons.xcassets/ic_chevron_right.imageset/ic_chevron_right_3x.png", - "resources/Icons.xcassets/ic_close.imageset/Contents.json", - "resources/Icons.xcassets/ic_close.imageset/ic_close.png", - "resources/Icons.xcassets/ic_close.imageset/ic_close_2x.png", - "resources/Icons.xcassets/ic_close.imageset/ic_close_3x.png", - "resources/Icons.xcassets/ic_info.imageset/Contents.json", - "resources/Icons.xcassets/ic_info.imageset/ic_info.png", - "resources/Icons.xcassets/ic_info.imageset/ic_info_2x.png", - "resources/Icons.xcassets/ic_info.imageset/ic_info_3x.png", - "resources/Icons.xcassets/ic_search.imageset/Contents.json", - "resources/Icons.xcassets/ic_search.imageset/ic_search.png", - "resources/Icons.xcassets/ic_search.imageset/ic_search_2x.png", - "resources/Icons.xcassets/ic_search.imageset/ic_search_3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", +# TODO(crbug.com/734054): remove this target when the downstream repository +# has been fixed to directly depends on the individual targets. +group("assets") { + deps = [ + "//third_party/material_design_icons:ic_arrow_back", + "//third_party/material_design_icons:ic_chevron_right", + "//third_party/material_design_icons:ic_close", + "//third_party/material_design_icons:ic_info", + "//third_party/material_design_icons:ic_search", ] } diff --git a/chromium/ios/chrome/browser/ui/infobars/BUILD.gn b/chromium/ios/chrome/browser/ui/infobars/BUILD.gn index 405fd2697b6..d5568ec2c31 100644 --- a/chromium/ios/chrome/browser/ui/infobars/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/infobars/BUILD.gn @@ -10,7 +10,11 @@ source_set("infobars") { "infobar_view_delegate.h", ] deps = [ - ":resources", + "resources:infobar_close", + "resources:infobar_downloading", + "resources:infobar_popup_blocker", + "resources:infobar_shadow", + "resources:infobar_warning", "//base", "//base:i18n", "//components/strings", @@ -57,33 +61,8 @@ source_set("eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//url", ] libs = [ "XCTest.framework" ] } - -bundle_data("resources") { - sources = [ - "resources/infobar_close.png", - "resources/infobar_close@2x.png", - "resources/infobar_close@3x.png", - "resources/infobar_downloading.png", - "resources/infobar_downloading@2x.png", - "resources/infobar_downloading@3x.png", - "resources/infobar_popup_blocker.png", - "resources/infobar_popup_blocker@2x.png", - "resources/infobar_popup_blocker@3x.png", - "resources/infobar_shadow.png", - "resources/infobar_shadow@2x.png", - "resources/infobar_update.png", - "resources/infobar_update@2x.png", - "resources/infobar_update@3x.png", - "resources/infobar_warning.png", - "resources/infobar_warning@2x.png", - "resources/infobar_warning@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} diff --git a/chromium/ios/chrome/browser/ui/infobars/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/infobars/resources/BUILD.gn new file mode 100644 index 00000000000..37afb860915 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/infobars/resources/BUILD.gn @@ -0,0 +1,49 @@ +# Copyright 2017 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/imageset.gni") + +imageset("infobar_warning") { + sources = [ + "infobar_warning.imageset/Contents.json", + "infobar_warning.imageset/infobar_warning.png", + "infobar_warning.imageset/infobar_warning@2x.png", + "infobar_warning.imageset/infobar_warning@3x.png", + ] +} + +imageset("infobar_downloading") { + sources = [ + "infobar_downloading.imageset/Contents.json", + "infobar_downloading.imageset/infobar_downloading.png", + "infobar_downloading.imageset/infobar_downloading@2x.png", + "infobar_downloading.imageset/infobar_downloading@3x.png", + ] +} + +imageset("infobar_shadow") { + sources = [ + "infobar_shadow.imageset/Contents.json", + "infobar_shadow.imageset/infobar_shadow.png", + "infobar_shadow.imageset/infobar_shadow@2x.png", + ] +} + +imageset("infobar_close") { + sources = [ + "infobar_close.imageset/Contents.json", + "infobar_close.imageset/infobar_close.png", + "infobar_close.imageset/infobar_close@2x.png", + "infobar_close.imageset/infobar_close@3x.png", + ] +} + +imageset("infobar_popup_blocker") { + sources = [ + "infobar_popup_blocker.imageset/Contents.json", + "infobar_popup_blocker.imageset/infobar_popup_blocker.png", + "infobar_popup_blocker.imageset/infobar_popup_blocker@2x.png", + "infobar_popup_blocker.imageset/infobar_popup_blocker@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/keyboard/BUILD.gn b/chromium/ios/chrome/browser/ui/keyboard/BUILD.gn index 0a188fcee28..eec343de948 100644 --- a/chromium/ios/chrome/browser/ui/keyboard/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/keyboard/BUILD.gn @@ -7,8 +7,6 @@ source_set("keyboard") { sources = [ "UIKeyCommand+Chrome.h", "UIKeyCommand+Chrome.mm", - "hardware_keyboard_watcher.h", - "hardware_keyboard_watcher.mm", ] deps = [ "//base", @@ -21,14 +19,11 @@ source_set("unit_tests") { testonly = true sources = [ "UIKeyCommand+ChromeTest.mm", - "hardware_keyboard_watcher_unittest.mm", ] deps = [ ":keyboard", "//base", - "//base/test:test_support", "//ios/chrome/browser/ui/commands", "//testing/gtest", - "//third_party/ocmock", ] } diff --git a/chromium/ios/chrome/browser/ui/main/BUILD.gn b/chromium/ios/chrome/browser/ui/main/BUILD.gn index 4f3bbc84b60..33426997e33 100644 --- a/chromium/ios/chrome/browser/ui/main/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/main/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("main") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "browser_view_information.h", "browser_view_wrangler.h", @@ -49,7 +50,7 @@ source_set("unit_tests") { "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui:ui_internal", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", ] } diff --git a/chromium/ios/chrome/browser/ui/material_components/BUILD.gn b/chromium/ios/chrome/browser/ui/material_components/BUILD.gn index 63e674f4287..905795b6694 100644 --- a/chromium/ios/chrome/browser/ui/material_components/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/material_components/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("material_components") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "activity_indicator.h", "activity_indicator.mm", diff --git a/chromium/ios/chrome/browser/ui/ntp/BUILD.gn b/chromium/ios/chrome/browser/ui/ntp/BUILD.gn index 221f8e594df..10dc6694243 100644 --- a/chromium/ios/chrome/browser/ui/ntp/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/ntp/BUILD.gn @@ -2,107 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/bookmarks_bar_bg.png", - "resources/bookmarks_bar_bg@2x.png", - "resources/bookmarks_bar_bg@2x~ipad.png", - "resources/bookmarks_bar_bg_pressed@2x~ipad.png", - "resources/bookmarks_bar_bg_pressed~ipad.png", - "resources/bookmarks_bar_bg~ipad.png", - "resources/bookmarks_bar_breadcrumb.png", - "resources/bookmarks_bar_breadcrumb@2x.png", - "resources/bookmarks_bar_breadcrumb@2x~ipad.png", - "resources/bookmarks_bar_breadcrumb~ipad.png", - "resources/bookmarks_bar_edit.png", - "resources/bookmarks_bar_edit@2x.png", - "resources/bookmarks_bar_edit@2x~ipad.png", - "resources/bookmarks_bar_edit_moreshadow.png", - "resources/bookmarks_bar_edit_moreshadow@2x.png", - "resources/bookmarks_bar_edit_pressed.png", - "resources/bookmarks_bar_edit_pressed@2x.png", - "resources/bookmarks_bar_edit_pressed@2x~ipad.png", - "resources/bookmarks_bar_edit_pressed_moreshadow.png", - "resources/bookmarks_bar_edit_pressed_moreshadow@2x.png", - "resources/bookmarks_bar_edit_pressed~ipad.png", - "resources/bookmarks_bar_edit~ipad.png", - "resources/bookmarks_bar_left@2x~ipad.png", - "resources/bookmarks_bar_left~ipad.png", - "resources/bookmarks_button_bg.png", - "resources/bookmarks_button_bg@2x.png", - "resources/bookmarks_button_border.png", - "resources/bookmarks_button_border@2x.png", - "resources/disclosure_open.png", - "resources/disclosure_open@2x.png", - "resources/incognito_icon.png", - "resources/incognito_icon@2x.png", - "resources/incognito_icon@3x.png", - "resources/ntp_bookmarks.png", - "resources/ntp_bookmarks@2x.png", - "resources/ntp_bookmarks@3x.png", - "resources/ntp_bottom_bar_shadow.png", - "resources/ntp_bottom_bar_shadow@2x.png", - "resources/ntp_delete_button.png", - "resources/ntp_delete_button@2x.png", - "resources/ntp_google_search_box.png", - "resources/ntp_google_search_box@2x.png", - "resources/ntp_google_search_box@3x.png", - "resources/ntp_incognito.png", - "resources/ntp_incognito@2x.png", - "resources/ntp_mv_placeholder_bg.png", - "resources/ntp_mv_placeholder_bg@2x.png", - "resources/ntp_mv_placeholder_bg@3x.png", - "resources/ntp_mv_recentbar@2x~ipad.png", - "resources/ntp_mv_recentbar~ipad.png", - "resources/ntp_mv_recentpress@2x~ipad.png", - "resources/ntp_mv_recentpress~ipad.png", - "resources/ntp_mv_search.png", - "resources/ntp_mv_search@2x.png", - "resources/ntp_mv_thumbnail_container.png", - "resources/ntp_mv_thumbnail_container@2x.png", - "resources/ntp_mv_thumbnail_container@3x.png", - "resources/ntp_mv_thumbnail_empty.png", - "resources/ntp_mv_thumbnail_empty@2x.png", - "resources/ntp_mv_thumbnail_empty@2x~ipad.png", - "resources/ntp_mv_thumbnail_empty~ipad.png", - "resources/ntp_mv_welcome_favicon.png", - "resources/ntp_mv_welcome_favicon@2x.png", - "resources/ntp_opentabs@2x.png", - "resources/ntp_opentabs@3x.png", - "resources/ntp_opentabs_clock.png", - "resources/ntp_opentabs_clock@2x.png", - "resources/ntp_opentabs_clock@3x.png", - "resources/ntp_opentabs_header@2x~ipad.png", - "resources/ntp_opentabs_header~ipad.png", - "resources/ntp_opentabs_laptop.png", - "resources/ntp_opentabs_laptop@2x.png", - "resources/ntp_opentabs_laptop@3x.png", - "resources/ntp_opentabs_last_row@2x~ipad.png", - "resources/ntp_opentabs_last_row_h@2x~ipad.png", - "resources/ntp_opentabs_last_row_h~ipad.png", - "resources/ntp_opentabs_last_row~ipad.png", - "resources/ntp_opentabs_list_item@2x~ipad.png", - "resources/ntp_opentabs_list_item_h@2x~ipad.png", - "resources/ntp_opentabs_list_item_h~ipad.png", - "resources/ntp_opentabs_list_item~ipad.png", - "resources/ntp_opentabs_phone.png", - "resources/ntp_opentabs_phone@2x.png", - "resources/ntp_opentabs_phone@3x.png", - "resources/ntp_opentabs_recent_arrow.png", - "resources/ntp_opentabs_recent_arrow@2x.png", - "resources/ntp_opentabs_recent_arrow@3x.png", - "resources/ntp_opentabs_tablet.png", - "resources/ntp_opentabs_tablet@2x.png", - "resources/ntp_opentabs_tablet@3x.png", - "resources/ntp_recently_closed.png", - "resources/ntp_recently_closed@2x.png", - "resources/ntp_recently_closed@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("ntp") { sources = [ "new_tab_page_panel_protocol.h", @@ -110,6 +9,7 @@ source_set("ntp") { } source_set("ntp_header") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "google_landing_data_source.h", "new_tab_page_header_constants.h", @@ -128,6 +28,7 @@ source_set("ntp_header") { "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/commands", + "//ios/chrome/browser/ui/content_suggestions:content_suggestions_util", "//ios/chrome/browser/ui/toolbar", "//ios/chrome/browser/ui/toolbar:resource_macros", "//ios/chrome/common", @@ -135,7 +36,39 @@ source_set("ntp_header") { ] } +source_set("ntp_controller") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "new_tab_page_controller.h", + "new_tab_page_controller.mm", + ] + deps = [ + ":ntp", + ":ntp_internal", + "//base", + "//components/prefs", + "//components/search_engines", + "//components/strings", + "//components/sync_sessions", + "//ios/chrome/app/strings", + "//ios/chrome/browser", + "//ios/chrome/browser/browser_state", + "//ios/chrome/browser/content_suggestions", + "//ios/chrome/browser/search_engines", + "//ios/chrome/browser/sync", + "//ios/chrome/browser/tabs", + "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/bookmarks", + "//ios/chrome/browser/ui/commands", + "//ios/chrome/browser/ui/ntp/recent_tabs", + "//ios/chrome/browser/ui/toolbar", + "//ios/public/provider/chrome/browser/voice", + "//ui/base", + ] +} + source_set("ntp_internal") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "centering_scrollview.h", "centering_scrollview.mm", @@ -156,8 +89,6 @@ source_set("ntp_internal") { "new_tab_page_bar_button.mm", "new_tab_page_bar_item.h", "new_tab_page_bar_item.mm", - "new_tab_page_controller.h", - "new_tab_page_controller.mm", "new_tab_page_panel_protocol.mm", "new_tab_page_view.h", "new_tab_page_view.mm", @@ -171,7 +102,42 @@ source_set("ntp_internal") { ] deps = [ ":ntp", - ":resources", + "resources:bookmarks_bar_bg", + "resources:bookmarks_bar_bg_pressed", + "resources:bookmarks_bar_breadcrumb", + "resources:bookmarks_bar_edit", + "resources:bookmarks_bar_edit_moreshadow", + "resources:bookmarks_bar_edit_pressed", + "resources:bookmarks_bar_edit_pressed_moreshadow", + "resources:bookmarks_bar_left", + "resources:bookmarks_button_bg", + "resources:bookmarks_button_border", + "resources:disclosure_open", + "resources:incognito_icon", + "resources:ntp_bookmarks", + "resources:ntp_bottom_bar_shadow", + "resources:ntp_delete_button", + "resources:ntp_google_search_box", + "resources:ntp_incognito", + "resources:ntp_mv_placeholder_bg", + "resources:ntp_mv_recentbar", + "resources:ntp_mv_recentpress", + "resources:ntp_mv_search", + "resources:ntp_mv_thumbnail_container", + "resources:ntp_mv_thumbnail_empty", + "resources:ntp_mv_welcome_favicon", + "resources:ntp_opentabs", + "resources:ntp_opentabs_clock", + "resources:ntp_opentabs_header", + "resources:ntp_opentabs_laptop", + "resources:ntp_opentabs_last_row", + "resources:ntp_opentabs_last_row_h", + "resources:ntp_opentabs_list_item", + "resources:ntp_opentabs_list_item_h", + "resources:ntp_opentabs_phone", + "resources:ntp_opentabs_recent_arrow", + "resources:ntp_opentabs_tablet", + "resources:ntp_recently_closed", "//base", "//base:i18n", "//components/favicon/core", @@ -181,12 +147,10 @@ source_set("ntp_internal") { "//components/keyed_service/core", "//components/metrics", "//components/ntp_tiles", - "//components/prefs", "//components/rappor", "//components/search_engines", "//components/strings", "//components/suggestions", - "//components/sync_sessions", "//ios/chrome/app/strings", "//ios/chrome/browser", "//ios/chrome/browser/browser_state", @@ -197,15 +161,14 @@ source_set("ntp_internal") { "//ios/chrome/browser/reading_list", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/suggestions", - "//ios/chrome/browser/sync", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/bookmarks", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/content_suggestions", + "//ios/chrome/browser/ui/content_suggestions:content_suggestions_util", "//ios/chrome/browser/ui/content_suggestions/cells", "//ios/chrome/browser/ui/context_menu", - "//ios/chrome/browser/ui/ntp/recent_tabs", "//ios/chrome/browser/ui/overscroll_actions", "//ios/chrome/browser/ui/toolbar", "//ios/chrome/browser/web_state_list", @@ -244,6 +207,7 @@ source_set("unit_tests") { ] deps = [ ":ntp", + ":ntp_controller", ":ntp_internal", "//base", "//base/test:test_support", @@ -267,7 +231,7 @@ source_set("unit_tests") { "//ios/chrome/browser/web_state_list:web_state_list", "//ios/chrome/test:test_support", "//ios/public/provider/chrome/browser/images", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", "//ui/base", @@ -282,6 +246,7 @@ source_set("eg_tests") { "new_tab_page_egtest.mm", ] deps = [ + ":ntp_controller", ":ntp_internal", "//components/strings", "//ios/chrome/app/strings", @@ -309,5 +274,6 @@ source_set("perf_tests") { "//ios/chrome/browser/tabs", "//ios/chrome/browser/test:perf_test_support", "//ios/chrome/browser/ui:ui_internal", + "//ios/chrome/browser/ui/commands", ] } diff --git a/chromium/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn b/chromium/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn index 782cb8db263..b16dc7c51c6 100644 --- a/chromium/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/ntp/recent_tabs/BUILD.gn @@ -16,8 +16,6 @@ source_set("recent_tabs") { "sessions_sync_user_state.h", "synced_sessions.h", "synced_sessions.mm", - "synced_sessions_bridge.h", - "synced_sessions_bridge.mm", ] deps = [ "//base", @@ -40,6 +38,7 @@ source_set("recent_tabs") { "//ios/chrome/browser/ui/context_menu", "//ios/chrome/browser/ui/ntp", "//ios/chrome/browser/ui/ntp/recent_tabs/views", + "//ios/chrome/browser/ui/sync/", "//ios/web", "//ui/base", "//url", @@ -71,7 +70,7 @@ source_set("unit_tests") { "//ios/chrome/browser/sync:test_support", "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/chrome/test:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", ] @@ -91,7 +90,7 @@ source_set("eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test/http_server", ] libs = [ "XCTest.framework" ] } diff --git a/chromium/ios/chrome/browser/ui/ntp/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/ntp/resources/BUILD.gn new file mode 100644 index 00000000000..34e13c26b3e --- /dev/null +++ b/chromium/ios/chrome/browser/ui/ntp/resources/BUILD.gn @@ -0,0 +1,314 @@ +# Copyright 2017 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/imageset.gni") + +imageset("ntp_mv_thumbnail_container") { + sources = [ + "ntp_mv_thumbnail_container.imageset/Contents.json", + "ntp_mv_thumbnail_container.imageset/ntp_mv_thumbnail_container.png", + "ntp_mv_thumbnail_container.imageset/ntp_mv_thumbnail_container@2x.png", + "ntp_mv_thumbnail_container.imageset/ntp_mv_thumbnail_container@3x.png", + ] +} + +imageset("ntp_opentabs_last_row_h") { + sources = [ + "ntp_opentabs_last_row_h.imageset/Contents.json", + "ntp_opentabs_last_row_h.imageset/ntp_opentabs_last_row_h@2x~ipad.png", + "ntp_opentabs_last_row_h.imageset/ntp_opentabs_last_row_h~ipad.png", + ] +} + +imageset("ntp_opentabs_clock") { + sources = [ + "ntp_opentabs_clock.imageset/Contents.json", + "ntp_opentabs_clock.imageset/ntp_opentabs_clock.png", + "ntp_opentabs_clock.imageset/ntp_opentabs_clock@2x.png", + "ntp_opentabs_clock.imageset/ntp_opentabs_clock@3x.png", + ] +} + +imageset("ntp_opentabs_tablet") { + sources = [ + "ntp_opentabs_tablet.imageset/Contents.json", + "ntp_opentabs_tablet.imageset/ntp_opentabs_tablet.png", + "ntp_opentabs_tablet.imageset/ntp_opentabs_tablet@2x.png", + "ntp_opentabs_tablet.imageset/ntp_opentabs_tablet@3x.png", + ] +} + +imageset("ntp_opentabs_last_row") { + sources = [ + "ntp_opentabs_last_row.imageset/Contents.json", + "ntp_opentabs_last_row.imageset/ntp_opentabs_last_row@2x~ipad.png", + "ntp_opentabs_last_row.imageset/ntp_opentabs_last_row~ipad.png", + ] +} + +imageset("ntp_opentabs") { + sources = [ + "ntp_opentabs.imageset/Contents.json", + "ntp_opentabs.imageset/ntp_opentabs@2x.png", + "ntp_opentabs.imageset/ntp_opentabs@3x.png", + ] +} + +imageset("ntp_bookmarks") { + sources = [ + "ntp_bookmarks.imageset/Contents.json", + "ntp_bookmarks.imageset/ntp_bookmarks.png", + "ntp_bookmarks.imageset/ntp_bookmarks@2x.png", + "ntp_bookmarks.imageset/ntp_bookmarks@3x.png", + ] +} + +imageset("bookmarks_button_border") { + sources = [ + "bookmarks_button_border.imageset/Contents.json", + "bookmarks_button_border.imageset/bookmarks_button_border.png", + "bookmarks_button_border.imageset/bookmarks_button_border@2x.png", + ] +} + +imageset("bookmarks_bar_edit_pressed_moreshadow") { + sources = [ + "bookmarks_bar_edit_pressed_moreshadow.imageset/Contents.json", + "bookmarks_bar_edit_pressed_moreshadow.imageset/bookmarks_bar_edit_pressed_moreshadow.png", + "bookmarks_bar_edit_pressed_moreshadow.imageset/bookmarks_bar_edit_pressed_moreshadow@2x.png", + ] +} + +imageset("bookmarks_bar_edit_pressed") { + sources = [ + "bookmarks_bar_edit_pressed.imageset/Contents.json", + "bookmarks_bar_edit_pressed.imageset/bookmarks_bar_edit_pressed.png", + "bookmarks_bar_edit_pressed.imageset/bookmarks_bar_edit_pressed@2x.png", + "bookmarks_bar_edit_pressed.imageset/bookmarks_bar_edit_pressed@2x~ipad.png", + "bookmarks_bar_edit_pressed.imageset/bookmarks_bar_edit_pressed~ipad.png", + ] +} + +imageset("bookmarks_bar_breadcrumb") { + sources = [ + "bookmarks_bar_breadcrumb.imageset/Contents.json", + "bookmarks_bar_breadcrumb.imageset/bookmarks_bar_breadcrumb.png", + "bookmarks_bar_breadcrumb.imageset/bookmarks_bar_breadcrumb@2x.png", + "bookmarks_bar_breadcrumb.imageset/bookmarks_bar_breadcrumb@2x~ipad.png", + "bookmarks_bar_breadcrumb.imageset/bookmarks_bar_breadcrumb~ipad.png", + ] +} + +imageset("ntp_opentabs_header") { + sources = [ + "ntp_opentabs_header.imageset/Contents.json", + "ntp_opentabs_header.imageset/ntp_opentabs_header@2x~ipad.png", + "ntp_opentabs_header.imageset/ntp_opentabs_header~ipad.png", + ] +} + +imageset("bookmarks_bar_edit_moreshadow") { + sources = [ + "bookmarks_bar_edit_moreshadow.imageset/Contents.json", + "bookmarks_bar_edit_moreshadow.imageset/bookmarks_bar_edit_moreshadow.png", + "bookmarks_bar_edit_moreshadow.imageset/bookmarks_bar_edit_moreshadow@2x.png", + ] +} + +imageset("ntp_delete_button") { + sources = [ + "ntp_delete_button.imageset/Contents.json", + "ntp_delete_button.imageset/ntp_delete_button.png", + "ntp_delete_button.imageset/ntp_delete_button@2x.png", + ] +} + +imageset("ntp_opentabs_phone") { + sources = [ + "ntp_opentabs_phone.imageset/Contents.json", + "ntp_opentabs_phone.imageset/ntp_opentabs_phone.png", + "ntp_opentabs_phone.imageset/ntp_opentabs_phone@2x.png", + "ntp_opentabs_phone.imageset/ntp_opentabs_phone@3x.png", + ] +} + +imageset("ntp_mv_recentpress") { + sources = [ + "ntp_mv_recentpress.imageset/Contents.json", + "ntp_mv_recentpress.imageset/ntp_mv_recentpress@2x~ipad.png", + "ntp_mv_recentpress.imageset/ntp_mv_recentpress~ipad.png", + ] +} + +imageset("bookmarks_bar_left") { + sources = [ + "bookmarks_bar_left.imageset/Contents.json", + "bookmarks_bar_left.imageset/bookmarks_bar_left@2x~ipad.png", + "bookmarks_bar_left.imageset/bookmarks_bar_left~ipad.png", + ] +} + +imageset("ntp_opentabs_list_item_h") { + sources = [ + "ntp_opentabs_list_item_h.imageset/Contents.json", + "ntp_opentabs_list_item_h.imageset/ntp_opentabs_list_item_h@2x~ipad.png", + "ntp_opentabs_list_item_h.imageset/ntp_opentabs_list_item_h~ipad.png", + ] +} + +imageset("ntp_opentabs_list_item") { + sources = [ + "ntp_opentabs_list_item.imageset/Contents.json", + "ntp_opentabs_list_item.imageset/ntp_opentabs_list_item@2x~ipad.png", + "ntp_opentabs_list_item.imageset/ntp_opentabs_list_item~ipad.png", + ] +} + +imageset("disclosure_open") { + sources = [ + "disclosure_open.imageset/Contents.json", + "disclosure_open.imageset/disclosure_open.png", + "disclosure_open.imageset/disclosure_open@2x.png", + ] +} + +imageset("bookmarks_bar_edit") { + sources = [ + "bookmarks_bar_edit.imageset/Contents.json", + "bookmarks_bar_edit.imageset/bookmarks_bar_edit.png", + "bookmarks_bar_edit.imageset/bookmarks_bar_edit@2x.png", + "bookmarks_bar_edit.imageset/bookmarks_bar_edit@2x~ipad.png", + "bookmarks_bar_edit.imageset/bookmarks_bar_edit~ipad.png", + ] +} + +imageset("incognito_icon") { + sources = [ + "incognito_icon.imageset/Contents.json", + "incognito_icon.imageset/incognito_icon.png", + "incognito_icon.imageset/incognito_icon@2x.png", + "incognito_icon.imageset/incognito_icon@3x.png", + ] +} + +imageset("ntp_opentabs_recent_arrow") { + sources = [ + "ntp_opentabs_recent_arrow.imageset/Contents.json", + "ntp_opentabs_recent_arrow.imageset/ntp_opentabs_recent_arrow.png", + "ntp_opentabs_recent_arrow.imageset/ntp_opentabs_recent_arrow@2x.png", + "ntp_opentabs_recent_arrow.imageset/ntp_opentabs_recent_arrow@3x.png", + ] +} + +imageset("bookmarks_bar_bg") { + sources = [ + "bookmarks_bar_bg.imageset/Contents.json", + "bookmarks_bar_bg.imageset/bookmarks_bar_bg.png", + "bookmarks_bar_bg.imageset/bookmarks_bar_bg@2x.png", + "bookmarks_bar_bg.imageset/bookmarks_bar_bg@2x~ipad.png", + "bookmarks_bar_bg.imageset/bookmarks_bar_bg~ipad.png", + ] +} + +imageset("ntp_google_search_box") { + sources = [ + "ntp_google_search_box.imageset/Contents.json", + "ntp_google_search_box.imageset/ntp_google_search_box.png", + "ntp_google_search_box.imageset/ntp_google_search_box@2x.png", + "ntp_google_search_box.imageset/ntp_google_search_box@3x.png", + ] +} + +imageset("ntp_bottom_bar_shadow") { + sources = [ + "ntp_bottom_bar_shadow.imageset/Contents.json", + "ntp_bottom_bar_shadow.imageset/ntp_bottom_bar_shadow.png", + "ntp_bottom_bar_shadow.imageset/ntp_bottom_bar_shadow@2x.png", + ] +} + +imageset("ntp_opentabs_laptop") { + sources = [ + "ntp_opentabs_laptop.imageset/Contents.json", + "ntp_opentabs_laptop.imageset/ntp_opentabs_laptop.png", + "ntp_opentabs_laptop.imageset/ntp_opentabs_laptop@2x.png", + "ntp_opentabs_laptop.imageset/ntp_opentabs_laptop@3x.png", + ] +} + +imageset("ntp_mv_recentbar") { + sources = [ + "ntp_mv_recentbar.imageset/Contents.json", + "ntp_mv_recentbar.imageset/ntp_mv_recentbar@2x~ipad.png", + "ntp_mv_recentbar.imageset/ntp_mv_recentbar~ipad.png", + ] +} + +imageset("bookmarks_button_bg") { + sources = [ + "bookmarks_button_bg.imageset/Contents.json", + "bookmarks_button_bg.imageset/bookmarks_button_bg.png", + "bookmarks_button_bg.imageset/bookmarks_button_bg@2x.png", + ] +} + +imageset("ntp_mv_search") { + sources = [ + "ntp_mv_search.imageset/Contents.json", + "ntp_mv_search.imageset/ntp_mv_search.png", + "ntp_mv_search.imageset/ntp_mv_search@2x.png", + ] +} + +imageset("ntp_mv_placeholder_bg") { + sources = [ + "ntp_mv_placeholder_bg.imageset/Contents.json", + "ntp_mv_placeholder_bg.imageset/ntp_mv_placeholder_bg.png", + "ntp_mv_placeholder_bg.imageset/ntp_mv_placeholder_bg@2x.png", + "ntp_mv_placeholder_bg.imageset/ntp_mv_placeholder_bg@3x.png", + ] +} + +imageset("ntp_recently_closed") { + sources = [ + "ntp_recently_closed.imageset/Contents.json", + "ntp_recently_closed.imageset/ntp_recently_closed.png", + "ntp_recently_closed.imageset/ntp_recently_closed@2x.png", + "ntp_recently_closed.imageset/ntp_recently_closed@3x.png", + ] +} + +imageset("ntp_mv_thumbnail_empty") { + sources = [ + "ntp_mv_thumbnail_empty.imageset/Contents.json", + "ntp_mv_thumbnail_empty.imageset/ntp_mv_thumbnail_empty.png", + "ntp_mv_thumbnail_empty.imageset/ntp_mv_thumbnail_empty@2x.png", + "ntp_mv_thumbnail_empty.imageset/ntp_mv_thumbnail_empty@2x~ipad.png", + "ntp_mv_thumbnail_empty.imageset/ntp_mv_thumbnail_empty~ipad.png", + ] +} + +imageset("ntp_incognito") { + sources = [ + "ntp_incognito.imageset/Contents.json", + "ntp_incognito.imageset/ntp_incognito.png", + "ntp_incognito.imageset/ntp_incognito@2x.png", + ] +} + +imageset("ntp_mv_welcome_favicon") { + sources = [ + "ntp_mv_welcome_favicon.imageset/Contents.json", + "ntp_mv_welcome_favicon.imageset/ntp_mv_welcome_favicon.png", + "ntp_mv_welcome_favicon.imageset/ntp_mv_welcome_favicon@2x.png", + ] +} + +imageset("bookmarks_bar_bg_pressed") { + sources = [ + "bookmarks_bar_bg_pressed.imageset/Contents.json", + "bookmarks_bar_bg_pressed.imageset/bookmarks_bar_bg_pressed@2x~ipad.png", + "bookmarks_bar_bg_pressed.imageset/bookmarks_bar_bg_pressed~ipad.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/omnibox/BUILD.gn b/chromium/ios/chrome/browser/ui/omnibox/BUILD.gn index a12dd7a88c1..8bb9c624fc9 100644 --- a/chromium/ios/chrome/browser/ui/omnibox/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/omnibox/BUILD.gn @@ -15,20 +15,6 @@ source_set("omnibox") { ] } -bundle_data("resources") { - sources = [ - "resources/omnibox_background.png", - "resources/omnibox_background@2x.png", - "resources/omnibox_background@3x.png", - "resources/omnibox_transparent_background.png", - "resources/omnibox_transparent_background@2x.png", - "resources/omnibox_transparent_background@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("omnibox_internal") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ @@ -43,6 +29,7 @@ source_set("omnibox_internal") { "omnibox_popup_positioner.h", "omnibox_popup_view_ios.h", "omnibox_popup_view_ios.mm", + "omnibox_text_field_delegate.h", "omnibox_text_field_ios.h", "omnibox_text_field_ios.mm", "omnibox_view_ios.h", @@ -58,7 +45,8 @@ source_set("omnibox_internal") { ] deps = [ ":omnibox", - ":resources", + "resources:omnibox_background", + "resources:omnibox_transparent_background", "//base", "//base:i18n", "//components/favicon/ios", diff --git a/chromium/ios/chrome/browser/ui/omnibox/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/omnibox/resources/BUILD.gn new file mode 100644 index 00000000000..d5c76869e3c --- /dev/null +++ b/chromium/ios/chrome/browser/ui/omnibox/resources/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright 2017 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/imageset.gni") + +imageset("omnibox_transparent_background") { + sources = [ + "omnibox_transparent_background.imageset/Contents.json", + "omnibox_transparent_background.imageset/omnibox_transparent_background.png", + "omnibox_transparent_background.imageset/omnibox_transparent_background@2x.png", + "omnibox_transparent_background.imageset/omnibox_transparent_background@3x.png", + ] +} + +imageset("omnibox_background") { + sources = [ + "omnibox_background.imageset/Contents.json", + "omnibox_background.imageset/omnibox_background.png", + "omnibox_background.imageset/omnibox_background@2x.png", + "omnibox_background.imageset/omnibox_background@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/overscroll_actions/BUILD.gn b/chromium/ios/chrome/browser/ui/overscroll_actions/BUILD.gn index 082cc1e540b..13b54b5cfd3 100644 --- a/chromium/ios/chrome/browser/ui/overscroll_actions/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/overscroll_actions/BUILD.gn @@ -2,33 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/ptr_close.png", - "resources/ptr_close@2x.png", - "resources/ptr_close@3x.png", - "resources/ptr_close_active.png", - "resources/ptr_close_active@2x.png", - "resources/ptr_close_active@3x.png", - "resources/ptr_new_tab.png", - "resources/ptr_new_tab@2x.png", - "resources/ptr_new_tab@3x.png", - "resources/ptr_new_tab_active.png", - "resources/ptr_new_tab_active@2x.png", - "resources/ptr_new_tab_active@3x.png", - "resources/ptr_reload.png", - "resources/ptr_reload@2x.png", - "resources/ptr_reload@3x.png", - "resources/ptr_reload_active.png", - "resources/ptr_reload_active@2x.png", - "resources/ptr_reload_active@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("overscroll_actions") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "overscroll_actions_controller.h", "overscroll_actions_controller.mm", @@ -38,7 +13,12 @@ source_set("overscroll_actions") { "overscroll_actions_view.mm", ] deps = [ - ":resources", + "resources:ptr_close", + "resources:ptr_close_active", + "resources:ptr_new_tab", + "resources:ptr_new_tab_active", + "resources:ptr_reload", + "resources:ptr_reload_active", "//base", "//ios/chrome/app/theme", "//ios/chrome/browser/ui", diff --git a/chromium/ios/chrome/browser/ui/overscroll_actions/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/overscroll_actions/resources/BUILD.gn new file mode 100644 index 00000000000..0f9e6b5001b --- /dev/null +++ b/chromium/ios/chrome/browser/ui/overscroll_actions/resources/BUILD.gn @@ -0,0 +1,59 @@ +# Copyright 2017 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/imageset.gni") + +imageset("ptr_reload_active") { + sources = [ + "ptr_reload_active.imageset/Contents.json", + "ptr_reload_active.imageset/ptr_reload_active.png", + "ptr_reload_active.imageset/ptr_reload_active@2x.png", + "ptr_reload_active.imageset/ptr_reload_active@3x.png", + ] +} + +imageset("ptr_close_active") { + sources = [ + "ptr_close_active.imageset/Contents.json", + "ptr_close_active.imageset/ptr_close_active.png", + "ptr_close_active.imageset/ptr_close_active@2x.png", + "ptr_close_active.imageset/ptr_close_active@3x.png", + ] +} + +imageset("ptr_close") { + sources = [ + "ptr_close.imageset/Contents.json", + "ptr_close.imageset/ptr_close.png", + "ptr_close.imageset/ptr_close@2x.png", + "ptr_close.imageset/ptr_close@3x.png", + ] +} + +imageset("ptr_new_tab") { + sources = [ + "ptr_new_tab.imageset/Contents.json", + "ptr_new_tab.imageset/ptr_new_tab.png", + "ptr_new_tab.imageset/ptr_new_tab@2x.png", + "ptr_new_tab.imageset/ptr_new_tab@3x.png", + ] +} + +imageset("ptr_reload") { + sources = [ + "ptr_reload.imageset/Contents.json", + "ptr_reload.imageset/ptr_reload.png", + "ptr_reload.imageset/ptr_reload@2x.png", + "ptr_reload.imageset/ptr_reload@3x.png", + ] +} + +imageset("ptr_new_tab_active") { + sources = [ + "ptr_new_tab_active.imageset/Contents.json", + "ptr_new_tab_active.imageset/ptr_new_tab_active.png", + "ptr_new_tab_active.imageset/ptr_new_tab_active@2x.png", + "ptr_new_tab_active.imageset/ptr_new_tab_active@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/payments/BUILD.gn b/chromium/ios/chrome/browser/ui/payments/BUILD.gn index c0c38e36330..011af52cb0b 100644 --- a/chromium/ios/chrome/browser/ui/payments/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/payments/BUILD.gn @@ -11,8 +11,18 @@ source_set("payments") { "address_edit_coordinator.mm", "address_edit_mediator.h", "address_edit_mediator.mm", - "address_edit_view_controller.h", - "address_edit_view_controller.mm", + "billing_address_selection_coordinator.h", + "billing_address_selection_coordinator.mm", + "billing_address_selection_mediator.h", + "billing_address_selection_mediator.mm", + "contact_info_edit_coordinator.h", + "contact_info_edit_coordinator.mm", + "contact_info_edit_mediator.h", + "contact_info_edit_mediator.mm", + "contact_info_selection_coordinator.h", + "contact_info_selection_coordinator.mm", + "contact_info_selection_mediator.h", + "contact_info_selection_mediator.mm", "country_selection_coordinator.h", "country_selection_coordinator.mm", "credit_card_edit_coordinator.h", @@ -39,9 +49,6 @@ source_set("payments") { "payment_request_manager.mm", "payment_request_mediator.h", "payment_request_mediator.mm", - "payment_request_view_controller.h", - "payment_request_view_controller.mm", - "payment_request_view_controller_actions.h", "region_data_loader.h", "region_data_loader.mm", "shipping_address_selection_coordinator.h", @@ -78,6 +85,7 @@ source_set("payments") { "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/icons", "//ios/chrome/browser/ui/payments/cells", + "//ios/chrome/browser/ui/toolbar", "//ios/third_party/material_components_ios", "//ios/third_party/material_roboto_font_loader_ios", "//ios/web", @@ -91,15 +99,11 @@ source_set("payments") { source_set("payments_ui") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ - "credit_card_edit_view_controller.h", - "credit_card_edit_view_controller.mm", - "credit_card_edit_view_controller_data_source.h", "payment_items_display_view_controller.h", "payment_items_display_view_controller.mm", "payment_items_display_view_controller_actions.h", "payment_items_display_view_controller_data_source.h", "payment_request_edit_consumer.h", - "payment_request_edit_view_controller+internal.h", "payment_request_edit_view_controller.h", "payment_request_edit_view_controller.mm", "payment_request_edit_view_controller_actions.h", @@ -117,6 +121,10 @@ source_set("payments_ui") { "payment_request_selector_view_controller.mm", "payment_request_selector_view_controller_actions.h", "payment_request_selector_view_controller_data_source.h", + "payment_request_view_controller.h", + "payment_request_view_controller.mm", + "payment_request_view_controller_actions.h", + "payment_request_view_controller_data_source.h", ] deps = [ "//base", @@ -141,9 +149,15 @@ source_set("unit_tests") { testonly = true sources = [ "address_edit_coordinator_unittest.mm", + "billing_address_selection_coordinator_unittest.mm", + "billing_address_selection_mediator_unittest.mm", + "contact_info_edit_coordinator_unittest.mm", + "contact_info_edit_mediator_unittest.mm", + "contact_info_selection_coordinator_unittest.mm", + "contact_info_selection_mediator_unittest.mm", "country_selection_coordinator_unittest.mm", "credit_card_edit_coordinator_unittest.mm", - "credit_card_edit_view_controller_unittest.mm", + "full_card_requester_unittest.mm", "payment_items_display_coordinator_unittest.mm", "payment_items_display_view_controller_unittest.mm", "payment_method_selection_coordinator_unittest.mm", @@ -151,7 +165,10 @@ source_set("unit_tests") { "payment_request_edit_view_controller_unittest.mm", "payment_request_error_coordinator_unittest.mm", "payment_request_error_view_controller_unittest.mm", + "payment_request_mediator_unittest.mm", "payment_request_selector_view_controller_unittest.mm", + "payment_request_unittest_base.h", + "payment_request_unittest_base.mm", "payment_request_view_controller_unittest.mm", "region_data_loader_unittest.mm", "shipping_address_selection_coordinator_unittest.mm", @@ -164,27 +181,69 @@ source_set("unit_tests") { "//base/test:test_support", "//components/autofill/core/browser", "//components/autofill/core/browser:test_support", + "//components/autofill/ios/browser", "//components/payments/core", + "//components/payments/core:test_support", "//components/prefs:prefs", + "//components/signin/core/browser", "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser", + "//ios/chrome/browser/autofill:autofill_internal", "//ios/chrome/browser/browser_state:test_support", + "//ios/chrome/browser/infobars", "//ios/chrome/browser/payments", "//ios/chrome/browser/payments:test_support", + "//ios/chrome/browser/signin", + "//ios/chrome/browser/signin:test_support", + "//ios/chrome/browser/ui/autofill", "//ios/chrome/browser/ui/autofill:autofill_ui", "//ios/chrome/browser/ui/autofill/cells", "//ios/chrome/browser/ui/collection_view:test_support", "//ios/chrome/browser/ui/collection_view/cells", "//ios/chrome/browser/ui/collection_view/cells:test_support", "//ios/chrome/browser/ui/payments/cells", + "//ios/chrome/browser/web:test_support", "//ios/chrome/test:test_support", "//ios/testing:ocmock_support", "//ios/third_party/material_components_ios", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//testing/gmock", "//testing/gtest", "//third_party/ocmock", + "//ui/base", + ] +} + +source_set("eg_tests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "payments_accessibility_egtest.mm", + ] + + deps = [ + ":payments_ui", + "//base", + "//components/autofill/core/browser", + "//components/autofill/core/browser:test_support", + "//components/payments/core", + "//components/strings", + "//ios/chrome/app:app_internal", + "//ios/chrome/browser/autofill", + "//ios/chrome/browser/payments", + "//ios/chrome/browser/ui/payments/cells", + "//ios/chrome/browser/ui/tools_menu", + "//ios/chrome/test/app:test_support", + "//ios/chrome/test/earl_grey:test_support", + "//ios/testing/earl_grey:earl_grey_support", + "//ios/third_party/material_components_ios", + "//ios/web/public/test/http_server", + ] + libs = [ + "UIKit.framework", + "XCTest.framework", ] } diff --git a/chromium/ios/chrome/browser/ui/payments/cells/BUILD.gn b/chromium/ios/chrome/browser/ui/payments/cells/BUILD.gn index 4e0069c7c70..46ab0e65a83 100644 --- a/chromium/ios/chrome/browser/ui/payments/cells/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/payments/cells/BUILD.gn @@ -12,7 +12,7 @@ source_set("cells") { "page_info_item.mm", "payment_method_item.h", "payment_method_item.mm", - "payments_has_accessory_type.h", + "payments_is_selectable.h", "payments_selector_edit_item.h", "payments_selector_edit_item.mm", "payments_text_item.h", @@ -22,12 +22,14 @@ source_set("cells") { ] deps = [ + "//ios/chrome/app/theme", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/autofill:autofill_ui", "//ios/chrome/browser/ui/collection_view/cells", "//ios/chrome/browser/ui/colors", "//ios/third_party/material_components_ios", "//ios/third_party/material_roboto_font_loader_ios", + "//url/", ] configs += [ "//build/config/compiler:enable_arc" ] diff --git a/chromium/ios/chrome/browser/ui/popup_menu/BUILD.gn b/chromium/ios/chrome/browser/ui/popup_menu/BUILD.gn index 1d0ae53265c..2d08db0c11c 100644 --- a/chromium/ios/chrome/browser/ui/popup_menu/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/popup_menu/BUILD.gn @@ -2,18 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/popup_background.png", - "resources/popup_background@2x.png", - "resources/popup_background@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("popup_menu") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "popup_menu_controller.h", "popup_menu_controller.mm", @@ -21,7 +11,7 @@ source_set("popup_menu") { "popup_menu_view.mm", ] deps = [ - ":resources", + "resources:popup_background", "//base", "//ios/chrome/app/strings", "//ios/chrome/browser/ui", diff --git a/chromium/ios/chrome/browser/ui/popup_menu/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/popup_menu/resources/BUILD.gn new file mode 100644 index 00000000000..e7591410150 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/popup_menu/resources/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright 2017 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/imageset.gni") + +imageset("popup_background") { + sources = [ + "popup_background.imageset/Contents.json", + "popup_background.imageset/popup_background.png", + "popup_background.imageset/popup_background@2x.png", + "popup_background.imageset/popup_background@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/print/BUILD.gn b/chromium/ios/chrome/browser/ui/print/BUILD.gn index 3215362e9f2..fabf5878c60 100644 --- a/chromium/ios/chrome/browser/ui/print/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/print/BUILD.gn @@ -33,7 +33,7 @@ source_set("eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//ui/base", "//url", ] diff --git a/chromium/ios/chrome/browser/ui/promos/BUILD.gn b/chromium/ios/chrome/browser/ui/promos/BUILD.gn index 2a8131f9ea2..7b12027a9bb 100644 --- a/chromium/ios/chrome/browser/ui/promos/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/promos/BUILD.gn @@ -5,7 +5,7 @@ source_set("promos") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ - "promo_view_controller.h", + # TODO(crbug.com/738881): Just move this into ui/signin "signin_promo_view_controller.h", "signin_promo_view_controller.mm", ] @@ -44,7 +44,7 @@ source_set("unit_tests") { "//ios/chrome/browser/signin:test_support", "//ios/chrome/test:test_support", "//ios/public/provider/chrome/browser/signin:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", ] diff --git a/chromium/ios/chrome/browser/ui/qr_scanner/BUILD.gn b/chromium/ios/chrome/browser/ui/qr_scanner/BUILD.gn index 1eb05b7b2da..eac91450fb5 100644 --- a/chromium/ios/chrome/browser/ui/qr_scanner/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/qr_scanner/BUILD.gn @@ -2,22 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("assets") { - sources = [ - "resources/QRScanner.xcassets/Contents.json", - "resources/QRScanner.xcassets/qr_scanner_torch_off.imageset/Contents.json", - "resources/QRScanner.xcassets/qr_scanner_torch_off.imageset/torch_off.png", - "resources/QRScanner.xcassets/qr_scanner_torch_off.imageset/torch_off@2x.png", - "resources/QRScanner.xcassets/qr_scanner_torch_off.imageset/torch_off@3x.png", - "resources/QRScanner.xcassets/qr_scanner_torch_on.imageset/Contents.json", - "resources/QRScanner.xcassets/qr_scanner_torch_on.imageset/torch_on.png", - "resources/QRScanner.xcassets/qr_scanner_torch_on.imageset/torch_on@2x.png", - "resources/QRScanner.xcassets/qr_scanner_torch_on.imageset/torch_on@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} +import("//build/config/ios/imageset.gni") source_set("qr_scanner") { configs += [ "//build/config/compiler:enable_arc" ] @@ -34,7 +19,8 @@ source_set("qr_scanner") { "qr_scanner_view_controller.mm", ] deps = [ - ":assets", + ":qr_scanner_torch_off", + ":qr_scanner_torch_on", "//base", "//components/version_info", "//ios/chrome/app/strings", @@ -52,6 +38,7 @@ source_set("qr_scanner") { } source_set("eg_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "qr_scanner_view_controller_egtest.mm", @@ -75,7 +62,7 @@ source_set("eg_tests") { "//ios/shared/chrome/browser/ui/omnibox", "//ios/testing/earl_grey:earl_grey_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//third_party/ocmock", "//ui/base", ] @@ -84,3 +71,21 @@ source_set("eg_tests") { "UIKit.framework", ] } + +imageset("qr_scanner_torch_off") { + sources = [ + "resources/QRScanner.xcassets/qr_scanner_torch_off.imageset/Contents.json", + "resources/QRScanner.xcassets/qr_scanner_torch_off.imageset/torch_off.png", + "resources/QRScanner.xcassets/qr_scanner_torch_off.imageset/torch_off@2x.png", + "resources/QRScanner.xcassets/qr_scanner_torch_off.imageset/torch_off@3x.png", + ] +} + +imageset("qr_scanner_torch_on") { + sources = [ + "resources/QRScanner.xcassets/qr_scanner_torch_on.imageset/Contents.json", + "resources/QRScanner.xcassets/qr_scanner_torch_on.imageset/torch_on.png", + "resources/QRScanner.xcassets/qr_scanner_torch_on.imageset/torch_on@2x.png", + "resources/QRScanner.xcassets/qr_scanner_torch_on.imageset/torch_on@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/reading_list/BUILD.gn b/chromium/ios/chrome/browser/ui/reading_list/BUILD.gn index 762560e2d4e..e39825e760b 100644 --- a/chromium/ios/chrome/browser/ui/reading_list/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/reading_list/BUILD.gn @@ -3,23 +3,13 @@ # found in the LICENSE file. source_set("reading_list") { - configs += [ "//build/config/compiler:enable_arc" ] sources = [ - "number_badge_view.h", - "number_badge_view.mm", "offline_page_native_content.h", "offline_page_native_content.mm", - "reading_list_collection_view_controller.h", - "reading_list_collection_view_controller.mm", "reading_list_collection_view_item.h", "reading_list_collection_view_item.mm", - "reading_list_collection_view_item_accessibility_delegate.h", "reading_list_coordinator.h", "reading_list_coordinator.mm", - "reading_list_data_sink.h", - "reading_list_data_source.h", - "reading_list_empty_collection_background.h", - "reading_list_empty_collection_background.mm", "reading_list_mediator.h", "reading_list_mediator.mm", "reading_list_menu_notification_delegate.h", @@ -27,78 +17,122 @@ source_set("reading_list") { "reading_list_menu_notifier.mm", "reading_list_side_swipe_provider.h", "reading_list_side_swipe_provider.mm", - "reading_list_toolbar.h", - "reading_list_toolbar.mm", "reading_list_utils.h", "reading_list_utils.mm", - "reading_list_view_controller.h", - "reading_list_view_controller.mm", ] deps = [ - ":resources", + ":reading_list_ui", "//base", - "//components/prefs", + "//components/favicon/core", + "//components/feature_engagement_tracker", "//components/reading_list/core", "//components/reading_list/ios", - "//components/strings", "//components/url_formatter", "//ios/chrome/app/strings", "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/favicon", + "//ios/chrome/browser/feature_engagement_tracker", "//ios/chrome/browser/reading_list", - "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/alert_coordinator", - "//ios/chrome/browser/ui/collection_view/cells", - "//ios/chrome/browser/ui/colors", "//ios/chrome/browser/ui/favicon", "//ios/chrome/browser/ui/favicon:favicon_ui", - "//ios/chrome/browser/ui/keyboard", - "//ios/chrome/browser/ui/material_components", "//ios/chrome/browser/ui/side_swipe", "//ios/chrome/browser/ui/static_content", "//ios/chrome/browser/ui/util", - "//ios/chrome/common", - "//ios/third_party/material_components_ios", - "//ios/third_party/material_roboto_font_loader_ios", "//ios/web", "//ios/web:reload_type", - "//net", "//ui/base", "//ui/strings", "//url", ] + allow_circular_includes_from = [ "//ios/chrome/browser/ui/side_swipe" ] + libs = [ "UIKit.framework" ] + configs += [ "//build/config/compiler:enable_arc" ] +} + +source_set("reading_list_ui") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ + "number_badge_view.h", + "number_badge_view.mm", + "reading_list_collection_view_cell.h", + "reading_list_collection_view_cell.mm", + "reading_list_collection_view_controller.h", + "reading_list_collection_view_controller.mm", + "reading_list_collection_view_item_accessibility_delegate.h", + "reading_list_data_sink.h", + "reading_list_data_source.h", + "reading_list_empty_collection_background.h", + "reading_list_empty_collection_background.mm", + "reading_list_toolbar.h", + "reading_list_toolbar.mm", + "reading_list_view_controller.h", + "reading_list_view_controller.mm", + "text_badge_view.h", + "text_badge_view.mm", + ] + deps = [ + "resources:distillation_fail", + "resources:distillation_success", + "resources:reading_list_empty_state", + "resources:reading_list_share_icon", + "resources:reading_list_side_swipe", + "resources:reading_list_toolbar_icon", + "//base", + "//components/strings", + "//components/url_formatter", + "//ios/chrome/app/strings", + "//ios/chrome/browser", + "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/alert_coordinator", + "//ios/chrome/browser/ui/collection_view/cells", + "//ios/chrome/browser/ui/colors", + "//ios/chrome/browser/ui/favicon:favicon_ui", + "//ios/chrome/browser/ui/keyboard", + "//ios/chrome/browser/ui/util", + "//ios/chrome/common", + "//ios/third_party/material_components_ios", + "//ios/third_party/material_roboto_font_loader_ios", + "//ui/base", + ] public_deps = [ "//ios/chrome/browser/ui/collection_view", ] - allow_circular_includes_from = [ "//ios/chrome/browser/ui/side_swipe" ] libs = [ "UIKit.framework" ] } source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "offline_page_native_content_unittest.mm", "reading_list_collection_view_controller_unittest.mm", "reading_list_coordinator_unittest.mm", + "reading_list_mediator_unittest.mm", + "text_badge_view_unittest.mm", ] deps = [ ":reading_list", + ":reading_list_ui", "//base", + "//base/test:test_support", "//components/favicon/core", "//components/favicon/core/test:test_support", + "//components/feature_engagement_tracker", "//components/prefs", "//components/reading_list/core", "//components/url_formatter", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/favicon", + "//ios/chrome/browser/feature_engagement_tracker", "//ios/chrome/browser/reading_list", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/static_content", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", "//ui/base", @@ -113,6 +147,7 @@ source_set("eg_tests") { ] deps = [ ":reading_list", + ":reading_list_ui", "//base", "//base/test:test_support", "//components/reading_list/core", @@ -129,7 +164,8 @@ source_set("eg_tests") { "//ios/third_party/material_components_ios", "//ios/web", "//ios/web:reload_type", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//net", ] libs = [ @@ -137,29 +173,3 @@ source_set("eg_tests") { "XCTest.framework", ] } - -bundle_data("resources") { - sources = [ - "resources/distillation_fail.png", - "resources/distillation_fail@2x.png", - "resources/distillation_fail@3x.png", - "resources/distillation_success.png", - "resources/distillation_success@2x.png", - "resources/distillation_success@3x.png", - "resources/reading_list_empty_state.png", - "resources/reading_list_empty_state@2x.png", - "resources/reading_list_empty_state@3x.png", - "resources/reading_list_share_icon.png", - "resources/reading_list_share_icon@2x.png", - "resources/reading_list_share_icon@3x.png", - "resources/reading_list_side_swipe.png", - "resources/reading_list_side_swipe@2x.png", - "resources/reading_list_side_swipe@3x.png", - "resources/reading_list_toolbar_icon.png", - "resources/reading_list_toolbar_icon@2x.png", - "resources/reading_list_toolbar_icon@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} diff --git a/chromium/ios/chrome/browser/ui/reading_list/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/reading_list/resources/BUILD.gn new file mode 100644 index 00000000000..b7b624372b6 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/reading_list/resources/BUILD.gn @@ -0,0 +1,59 @@ +# Copyright 2017 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/imageset.gni") + +imageset("reading_list_share_icon") { + sources = [ + "reading_list_share_icon.imageset/Contents.json", + "reading_list_share_icon.imageset/reading_list_share_icon.png", + "reading_list_share_icon.imageset/reading_list_share_icon@2x.png", + "reading_list_share_icon.imageset/reading_list_share_icon@3x.png", + ] +} + +imageset("reading_list_toolbar_icon") { + sources = [ + "reading_list_toolbar_icon.imageset/Contents.json", + "reading_list_toolbar_icon.imageset/reading_list_toolbar_icon.png", + "reading_list_toolbar_icon.imageset/reading_list_toolbar_icon@2x.png", + "reading_list_toolbar_icon.imageset/reading_list_toolbar_icon@3x.png", + ] +} + +imageset("distillation_fail") { + sources = [ + "distillation_fail.imageset/Contents.json", + "distillation_fail.imageset/distillation_fail.png", + "distillation_fail.imageset/distillation_fail@2x.png", + "distillation_fail.imageset/distillation_fail@3x.png", + ] +} + +imageset("reading_list_side_swipe") { + sources = [ + "reading_list_side_swipe.imageset/Contents.json", + "reading_list_side_swipe.imageset/reading_list_side_swipe.png", + "reading_list_side_swipe.imageset/reading_list_side_swipe@2x.png", + "reading_list_side_swipe.imageset/reading_list_side_swipe@3x.png", + ] +} + +imageset("reading_list_empty_state") { + sources = [ + "reading_list_empty_state.imageset/Contents.json", + "reading_list_empty_state.imageset/reading_list_empty_state.png", + "reading_list_empty_state.imageset/reading_list_empty_state@2x.png", + "reading_list_empty_state.imageset/reading_list_empty_state@3x.png", + ] +} + +imageset("distillation_success") { + sources = [ + "distillation_success.imageset/Contents.json", + "distillation_success.imageset/distillation_success.png", + "distillation_success.imageset/distillation_success@2x.png", + "distillation_success.imageset/distillation_success@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/resources/BUILD.gn new file mode 100644 index 00000000000..8a05c99d5e7 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/resources/BUILD.gn @@ -0,0 +1,63 @@ +# Copyright 2017 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/imageset.gni") + +imageset("custom_row_voice_pressed") { + sources = [ + "custom_row_voice_pressed.imageset/Contents.json", + "custom_row_voice_pressed.imageset/custom_row_voice_pressed.png", + "custom_row_voice_pressed.imageset/custom_row_voice_pressed@2x.png", + "custom_row_voice_pressed.imageset/custom_row_voice_pressed@2x~ipad.png", + "custom_row_voice_pressed.imageset/custom_row_voice_pressed@3x.png", + "custom_row_voice_pressed.imageset/custom_row_voice_pressed~ipad.png", + ] +} + +imageset("keyboard_bg_portrait_tablet") { + sources = [ + "keyboard_bg_portrait_tablet.imageset/Contents.json", + "keyboard_bg_portrait_tablet.imageset/keyboard_bg_portrait_tablet.png", + ] +} + +imageset("default_favicon") { + sources = [ + "default_favicon.imageset/Contents.json", + "default_favicon.imageset/default_favicon.png", + "default_favicon.imageset/default_favicon@2x.png", + "default_favicon.imageset/default_favicon@3x.png", + ] +} + +imageset("default_favicon_incognito") { + sources = [ + "default_favicon_incognito.imageset/Contents.json", + "default_favicon_incognito.imageset/default_favicon_incognito.png", + "default_favicon_incognito.imageset/default_favicon_incognito@2x.png", + "default_favicon_incognito.imageset/default_favicon_incognito@3x.png", + ] +} + +imageset("custom_row_voice") { + sources = [ + "custom_row_voice.imageset/Contents.json", + "custom_row_voice.imageset/custom_row_voice.png", + "custom_row_voice.imageset/custom_row_voice@2x.png", + "custom_row_voice.imageset/custom_row_voice@2x~ipad.png", + "custom_row_voice.imageset/custom_row_voice@3x.png", + "custom_row_voice.imageset/custom_row_voice~ipad.png", + ] +} + +imageset("keyboard_button") { + sources = [ + "keyboard_button.imageset/Contents.json", + "keyboard_button.imageset/keyboard_button.png", + "keyboard_button.imageset/keyboard_button@2x.png", + "keyboard_button.imageset/keyboard_button@2x~ipad.png", + "keyboard_button.imageset/keyboard_button@3x.png", + "keyboard_button.imageset/keyboard_button~ipad.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/sad_tab/BUILD.gn b/chromium/ios/chrome/browser/ui/sad_tab/BUILD.gn index c5bd5f0e74d..4b96b076c33 100644 --- a/chromium/ios/chrome/browser/ui/sad_tab/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/sad_tab/BUILD.gn @@ -12,6 +12,7 @@ source_set("sad_tab") { "//base", "//components/resources", "//components/strings", + "//components/ui_metrics", "//ios/chrome/browser", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/colors", @@ -26,3 +27,26 @@ source_set("sad_tab") { ] libs = [ "UIKit.framework" ] } + +source_set("eg_tests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "sad_tab_view_egtest.mm", + ] + + deps = [ + ":sad_tab", + "//base", + "//components/strings", + "//ios/chrome/app/strings", + "//ios/chrome/browser/ui/tools_menu", + "//ios/chrome/test/app:test_support", + "//ios/chrome/test/earl_grey:test_support", + "//ios/testing/earl_grey:earl_grey_support", + "//ios/third_party/earl_grey", + "//ios/web/public/test/http_server", + "//ui/base", + ] + libs = [ "XCTest.framework" ] +} diff --git a/chromium/ios/chrome/browser/ui/settings/BUILD.gn b/chromium/ios/chrome/browser/ui/settings/BUILD.gn index 1b95fc00c0f..3ead793c3b9 100644 --- a/chromium/ios/chrome/browser/ui/settings/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/settings/BUILD.gn @@ -2,29 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/app_icon_placeholder.png", - "resources/app_icon_placeholder@2x.png", - "resources/app_icon_placeholder@3x.png", - "resources/encryption_error.png", - "resources/encryption_error@2x.png", - "resources/encryption_error@3x.png", - "resources/settings_accounts_add_account.png", - "resources/settings_accounts_add_account@2x.png", - "resources/settings_accounts_add_account@3x.png", - "resources/settings_error.png", - "resources/settings_error@2x.png", - "resources/settings_error@3x.png", - "resources/settings_sync.png", - "resources/settings_sync@2x.png", - "resources/settings_sync@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("settings") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ @@ -53,8 +30,6 @@ source_set("settings") { "compose_email_handler_collection_view_controller.mm", "content_settings_collection_view_controller.h", "content_settings_collection_view_controller.mm", - "contextual_search_collection_view_controller.h", - "contextual_search_collection_view_controller.mm", "dataplan_usage_collection_view_controller.h", "dataplan_usage_collection_view_controller.mm", "do_not_track_collection_view_controller.h", @@ -65,11 +40,9 @@ source_set("settings") { "import_data_collection_view_controller.mm", "material_cell_catalog_view_controller.h", "material_cell_catalog_view_controller.mm", - "native_apps_collection_view_controller.h", - "native_apps_collection_view_controller.mm", - "native_apps_collection_view_controller_private.h", "password_details_collection_view_controller.h", "password_details_collection_view_controller.mm", + "password_details_collection_view_controller_delegate.h", "physical_web_collection_view_controller.h", "physical_web_collection_view_controller.mm", "privacy_collection_view_controller.h", @@ -105,7 +78,11 @@ source_set("settings") { "voicesearch_collection_view_controller.mm", ] deps = [ - ":resources", + "resources:app_icon_placeholder", + "resources:encryption_error", + "resources:settings_accounts_add_account", + "resources:settings_error", + "resources:settings_sync", "//base", "//base:i18n", "//components/autofill/core/browser", @@ -115,6 +92,7 @@ source_set("settings") { "//components/browsing_data/core", "//components/content_settings/core/browser", "//components/content_settings/core/common", + "//components/feature_engagement_tracker", "//components/google/core/browser", "//components/handoff", "//components/history/core/browser", @@ -124,6 +102,7 @@ source_set("settings") { "//components/password_manager/core/browser", "//components/password_manager/core/common", "//components/physical_web/data_source", + "//components/pref_registry", "//components/prefs", "//components/resources", "//components/search_engines", @@ -144,14 +123,13 @@ source_set("settings") { "//ios/chrome/browser/browser_state:browser_state_impl", "//ios/chrome/browser/browsing_data", "//ios/chrome/browser/content_settings", + "//ios/chrome/browser/feature_engagement_tracker", "//ios/chrome/browser/history", - "//ios/chrome/browser/native_app_launcher:native_app_launcher_internal", "//ios/chrome/browser/passwords", "//ios/chrome/browser/physical_web", "//ios/chrome/browser/prefs", "//ios/chrome/browser/search_engines", "//ios/chrome/browser/signin", - "//ios/chrome/browser/store_kit", "//ios/chrome/browser/sync", "//ios/chrome/browser/translate", "//ios/chrome/browser/ui", @@ -167,7 +145,6 @@ source_set("settings") { "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/content_suggestions/cells", "//ios/chrome/browser/ui/content_suggestions/cells:cells_ui", - "//ios/chrome/browser/ui/contextual_search", "//ios/chrome/browser/ui/icons", "//ios/chrome/browser/ui/keyboard", "//ios/chrome/browser/ui/material_components", @@ -180,10 +157,10 @@ source_set("settings") { "//ios/chrome/common", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/images", - "//ios/public/provider/chrome/browser/native_app_launcher", "//ios/public/provider/chrome/browser/signin", "//ios/public/provider/chrome/browser/user_feedback", "//ios/public/provider/chrome/browser/voice", + "//ios/shared/chrome/browser/ui/commands", "//ios/third_party/material_components_ios", "//ios/third_party/material_roboto_font_loader_ios", "//ios/web", @@ -198,7 +175,6 @@ source_set("settings") { libs = [ "CoreLocation.framework", "LocalAuthentication.framework", - "StoreKit.framework", "UIKit.framework", ] } @@ -235,7 +211,7 @@ source_set("test_support") { "//ios/chrome/browser/sync:test_support", "//ios/chrome/browser/ui/collection_view:test_support", "//ios/public/provider/chrome/browser/signin:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", ] } @@ -252,11 +228,9 @@ source_set("unit_tests") { "clear_browsing_data_collection_view_controller_unittest.mm", "compose_email_handler_collection_view_controller_unittest.mm", "content_settings_collection_view_controller_unittest.mm", - "contextual_search_collection_view_controller_unittest.mm", "dataplan_usage_collection_view_controller_unittest.mm", "do_not_track_collection_view_controller_unittest.mm", "import_data_collection_view_controller_unittest.mm", - "native_apps_collection_view_controller_unittest.mm", "password_details_collection_view_controller_unittest.mm", "physical_web_collection_view_controller_unittest.mm", "privacy_collection_view_controller_unittest.mm", @@ -315,7 +289,6 @@ source_set("unit_tests") { "//ios/chrome/browser/ui/collection_view:test_support", "//ios/chrome/browser/ui/collection_view/cells", "//ios/chrome/browser/ui/commands", - "//ios/chrome/browser/ui/contextual_search", "//ios/chrome/browser/ui/icons", "//ios/chrome/browser/ui/settings/cells", "//ios/chrome/browser/ui/sync", @@ -325,11 +298,10 @@ source_set("unit_tests") { "//ios/chrome/common", "//ios/chrome/test:test_support", "//ios/public/provider/chrome/browser", - "//ios/public/provider/chrome/browser/native_app_launcher:test_support", "//ios/public/provider/chrome/browser/voice", "//ios/third_party/material_components_ios", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//net", "//net:test_support", "//testing/gmock", @@ -356,6 +328,7 @@ source_set("eg_tests") { deps = [ ":settings", "//base", + "//base/test:test_support", "//components/autofill/core/common", "//components/browsing_data/core", "//components/content_settings/core/browser", @@ -383,10 +356,12 @@ source_set("eg_tests") { "//ios/chrome/test/app:test_support", "//ios/chrome/test/earl_grey:test_support", "//ios/public/provider/chrome/browser/signin:test_support", + "//ios/testing:ios_test_support", "//ios/testing/earl_grey:earl_grey_support", "//ios/third_party/earl_grey", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//net", "//ui/base", "//url", diff --git a/chromium/ios/chrome/browser/ui/settings/cells/BUILD.gn b/chromium/ios/chrome/browser/ui/settings/cells/BUILD.gn index de546429071..37b25708221 100644 --- a/chromium/ios/chrome/browser/ui/settings/cells/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/settings/cells/BUILD.gn @@ -18,8 +18,6 @@ source_set("cells") { "encryption_item.mm", "import_data_multiline_detail_cell.h", "import_data_multiline_detail_cell.mm", - "native_app_item.h", - "native_app_item.mm", "passphrase_error_item.h", "passphrase_error_item.mm", "password_details_item.h", @@ -56,7 +54,6 @@ source_set("unit_tests") { "copied_to_chrome_item_unittest.mm", "encryption_item_unittest.mm", "import_data_multiline_detail_cell_unittest.mm", - "native_app_item_unittest.mm", "passphrase_error_item_unittest.mm", "password_details_item_unittest.mm", "sync_switch_item_unittest.mm", diff --git a/chromium/ios/chrome/browser/ui/settings/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/settings/resources/BUILD.gn new file mode 100644 index 00000000000..fd54ec3d454 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/settings/resources/BUILD.gn @@ -0,0 +1,50 @@ +# Copyright 2017 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/imageset.gni") + +imageset("app_icon_placeholder") { + sources = [ + "app_icon_placeholder.imageset/Contents.json", + "app_icon_placeholder.imageset/app_icon_placeholder.png", + "app_icon_placeholder.imageset/app_icon_placeholder@2x.png", + "app_icon_placeholder.imageset/app_icon_placeholder@3x.png", + ] +} + +imageset("encryption_error") { + sources = [ + "encryption_error.imageset/Contents.json", + "encryption_error.imageset/encryption_error.png", + "encryption_error.imageset/encryption_error@2x.png", + "encryption_error.imageset/encryption_error@3x.png", + ] +} + +imageset("settings_accounts_add_account") { + sources = [ + "settings_accounts_add_account.imageset/Contents.json", + "settings_accounts_add_account.imageset/settings_accounts_add_account.png", + "settings_accounts_add_account.imageset/settings_accounts_add_account@2x.png", + "settings_accounts_add_account.imageset/settings_accounts_add_account@3x.png", + ] +} + +imageset("settings_error") { + sources = [ + "settings_error.imageset/Contents.json", + "settings_error.imageset/settings_error.png", + "settings_error.imageset/settings_error@2x.png", + "settings_error.imageset/settings_error@3x.png", + ] +} + +imageset("settings_sync") { + sources = [ + "settings_sync.imageset/Contents.json", + "settings_sync.imageset/settings_sync.png", + "settings_sync.imageset/settings_sync@2x.png", + "settings_sync.imageset/settings_sync@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/settings/utils/BUILD.gn b/chromium/ios/chrome/browser/ui/settings/utils/BUILD.gn index 06dcac497bd..2e4473c91c9 100644 --- a/chromium/ios/chrome/browser/ui/settings/utils/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/settings/utils/BUILD.gn @@ -49,7 +49,7 @@ source_set("unit_tests") { "//components/sync_preferences:test_support", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/content_settings", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", ] } diff --git a/chromium/ios/chrome/browser/ui/side_swipe/BUILD.gn b/chromium/ios/chrome/browser/ui/side_swipe/BUILD.gn index 4130c43f012..233f2ea7670 100644 --- a/chromium/ios/chrome/browser/ui/side_swipe/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/side_swipe/BUILD.gn @@ -2,20 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/side_swipe_navigation_back.png", - "resources/side_swipe_navigation_back@2x.png", - "resources/side_swipe_navigation_back@3x.png", - "resources/side_swipe_navigation_content_shadow.png", - "resources/side_swipe_navigation_content_shadow@2x.png", - "resources/side_swipe_navigation_content_shadow@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("side_swipe") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ @@ -31,7 +17,8 @@ source_set("side_swipe") { "side_swipe_util.mm", ] deps = [ - ":resources", + "resources:side_swipe_navigation_back", + "resources:side_swipe_navigation_content_shadow", "//base", "//components/reading_list/core", "//ios/chrome/app/theme", @@ -65,7 +52,7 @@ source_set("unit_tests") { "//base", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/ui/toolbar", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", ] diff --git a/chromium/ios/chrome/browser/ui/side_swipe/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/side_swipe/resources/BUILD.gn new file mode 100644 index 00000000000..7295312dcae --- /dev/null +++ b/chromium/ios/chrome/browser/ui/side_swipe/resources/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright 2017 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/imageset.gni") + +imageset("side_swipe_navigation_back") { + sources = [ + "side_swipe_navigation_back.imageset/Contents.json", + "side_swipe_navigation_back.imageset/side_swipe_navigation_back.png", + "side_swipe_navigation_back.imageset/side_swipe_navigation_back@2x.png", + "side_swipe_navigation_back.imageset/side_swipe_navigation_back@3x.png", + ] +} + +imageset("side_swipe_navigation_content_shadow") { + sources = [ + "side_swipe_navigation_content_shadow.imageset/Contents.json", + "side_swipe_navigation_content_shadow.imageset/side_swipe_navigation_content_shadow.png", + "side_swipe_navigation_content_shadow.imageset/side_swipe_navigation_content_shadow@2x.png", + "side_swipe_navigation_content_shadow.imageset/side_swipe_navigation_content_shadow@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/stack_view/BUILD.gn b/chromium/ios/chrome/browser/ui/stack_view/BUILD.gn index 73868e23eea..0d12d0a3e87 100644 --- a/chromium/ios/chrome/browser/ui/stack_view/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/stack_view/BUILD.gn @@ -2,56 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/border_frame_bottom.png", - "resources/border_frame_bottom@2x.png", - "resources/border_frame_bottom@3x.png", - "resources/border_frame_incognito_bottom.png", - "resources/border_frame_incognito_bottom@2x.png", - "resources/border_frame_incognito_bottom@3x.png", - "resources/border_frame_incognito_left.png", - "resources/border_frame_incognito_left@2x.png", - "resources/border_frame_incognito_left@3x.png", - "resources/border_frame_incognito_right.png", - "resources/border_frame_incognito_right@2x.png", - "resources/border_frame_incognito_right@3x.png", - "resources/border_frame_incognito_top.png", - "resources/border_frame_incognito_top@2x.png", - "resources/border_frame_incognito_top@3x.png", - "resources/border_frame_left.png", - "resources/border_frame_left@2x.png", - "resources/border_frame_left@3x.png", - "resources/border_frame_right.png", - "resources/border_frame_right@2x.png", - "resources/border_frame_right@3x.png", - "resources/border_frame_top.png", - "resources/border_frame_top@2x.png", - "resources/border_frame_top@3x.png", - "resources/card_close_button.png", - "resources/card_close_button@2x.png", - "resources/card_close_button@3x.png", - "resources/card_close_button_incognito.png", - "resources/card_close_button_incognito@2x.png", - "resources/card_close_button_incognito@3x.png", - "resources/card_close_button_pressed.png", - "resources/card_close_button_pressed@2x.png", - "resources/card_close_button_pressed@3x.png", - "resources/card_frame_shadow.png", - "resources/card_frame_shadow@2x.png", - "resources/card_frame_shadow@3x.png", - "resources/stack_view_background_noise.jpg", - "resources/stack_view_background_noise@2x.jpg", - "resources/stack_view_background_noise@2x~ipad.jpg", - "resources/stack_view_background_noise@3x.jpg", - "resources/stack_view_background_noise~ipad.jpg", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("stack_view") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "card_set.h", "card_set.mm", @@ -76,7 +28,19 @@ source_set("stack_view") { "title_label.mm", ] deps = [ - ":resources", + "resources:border_frame_bottom", + "resources:border_frame_incognito_bottom", + "resources:border_frame_incognito_left", + "resources:border_frame_incognito_right", + "resources:border_frame_incognito_top", + "resources:border_frame_left", + "resources:border_frame_right", + "resources:border_frame_top", + "resources:card_close_button", + "resources:card_close_button_incognito", + "resources:card_close_button_pressed", + "resources:card_frame_shadow", + "resources:stack_view_background_noise", "//base", "//components/strings", "//ios/chrome/app/strings", @@ -92,6 +56,7 @@ source_set("stack_view") { "//ios/chrome/browser/ui/toolbar", "//ios/chrome/browser/ui/tools_menu", "//ios/chrome/common", + "//ios/shared/chrome/browser/ui/commands", "//ios/shared/chrome/browser/ui/tools_menu", "//ios/third_party/material_components_ios", "//ios/web", @@ -147,6 +112,7 @@ source_set("eg_tests") { "//ios/chrome/test/earl_grey:test_support", "//ios/testing:ios_test_support", "//ios/testing/earl_grey:earl_grey_support", + "//ios/web/public/test/http_server", ] libs = [ "XCTest.framework" ] } diff --git a/chromium/ios/chrome/browser/ui/stack_view/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/stack_view/resources/BUILD.gn new file mode 100644 index 00000000000..f324f55dfbd --- /dev/null +++ b/chromium/ios/chrome/browser/ui/stack_view/resources/BUILD.gn @@ -0,0 +1,124 @@ +# Copyright 2017 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/imageset.gni") + +imageset("border_frame_bottom") { + sources = [ + "border_frame_bottom.imageset/Contents.json", + "border_frame_bottom.imageset/border_frame_bottom.png", + "border_frame_bottom.imageset/border_frame_bottom@2x.png", + "border_frame_bottom.imageset/border_frame_bottom@3x.png", + ] +} + +imageset("border_frame_incognito_bottom") { + sources = [ + "border_frame_incognito_bottom.imageset/Contents.json", + "border_frame_incognito_bottom.imageset/border_frame_incognito_bottom.png", + "border_frame_incognito_bottom.imageset/border_frame_incognito_bottom@2x.png", + "border_frame_incognito_bottom.imageset/border_frame_incognito_bottom@3x.png", + ] +} + +imageset("border_frame_incognito_left") { + sources = [ + "border_frame_incognito_left.imageset/Contents.json", + "border_frame_incognito_left.imageset/border_frame_incognito_left.png", + "border_frame_incognito_left.imageset/border_frame_incognito_left@2x.png", + "border_frame_incognito_left.imageset/border_frame_incognito_left@3x.png", + ] +} + +imageset("border_frame_incognito_right") { + sources = [ + "border_frame_incognito_right.imageset/Contents.json", + "border_frame_incognito_right.imageset/border_frame_incognito_right.png", + "border_frame_incognito_right.imageset/border_frame_incognito_right@2x.png", + "border_frame_incognito_right.imageset/border_frame_incognito_right@3x.png", + ] +} + +imageset("border_frame_incognito_top") { + sources = [ + "border_frame_incognito_top.imageset/Contents.json", + "border_frame_incognito_top.imageset/border_frame_incognito_top.png", + "border_frame_incognito_top.imageset/border_frame_incognito_top@2x.png", + "border_frame_incognito_top.imageset/border_frame_incognito_top@3x.png", + ] +} + +imageset("border_frame_left") { + sources = [ + "border_frame_left.imageset/Contents.json", + "border_frame_left.imageset/border_frame_left.png", + "border_frame_left.imageset/border_frame_left@2x.png", + "border_frame_left.imageset/border_frame_left@3x.png", + ] +} + +imageset("border_frame_right") { + sources = [ + "border_frame_right.imageset/Contents.json", + "border_frame_right.imageset/border_frame_right.png", + "border_frame_right.imageset/border_frame_right@2x.png", + "border_frame_right.imageset/border_frame_right@3x.png", + ] +} + +imageset("border_frame_top") { + sources = [ + "border_frame_top.imageset/Contents.json", + "border_frame_top.imageset/border_frame_top.png", + "border_frame_top.imageset/border_frame_top@2x.png", + "border_frame_top.imageset/border_frame_top@3x.png", + ] +} + +imageset("card_close_button") { + sources = [ + "card_close_button.imageset/Contents.json", + "card_close_button.imageset/card_close_button.png", + "card_close_button.imageset/card_close_button@2x.png", + "card_close_button.imageset/card_close_button@3x.png", + ] +} + +imageset("card_close_button_incognito") { + sources = [ + "card_close_button_incognito.imageset/Contents.json", + "card_close_button_incognito.imageset/card_close_button_incognito.png", + "card_close_button_incognito.imageset/card_close_button_incognito@2x.png", + "card_close_button_incognito.imageset/card_close_button_incognito@3x.png", + ] +} + +imageset("card_close_button_pressed") { + sources = [ + "card_close_button_pressed.imageset/Contents.json", + "card_close_button_pressed.imageset/card_close_button_pressed.png", + "card_close_button_pressed.imageset/card_close_button_pressed@2x.png", + "card_close_button_pressed.imageset/card_close_button_pressed@3x.png", + ] +} + +imageset("card_frame_shadow") { + sources = [ + "card_frame_shadow.imageset/Contents.json", + "card_frame_shadow.imageset/card_frame_shadow.png", + "card_frame_shadow.imageset/card_frame_shadow@2x.png", + "card_frame_shadow.imageset/card_frame_shadow@3x.png", + ] +} + +imageset("stack_view_background_noise") { + sources = [ + "stack_view_background_noise.imageset/Contents.json", + "stack_view_background_noise.imageset/stack_view_background_noise.jpg", + "stack_view_background_noise.imageset/stack_view_background_noise@2x.jpg", + "stack_view_background_noise.imageset/stack_view_background_noise@2x~ipad.jpg", + "stack_view_background_noise.imageset/stack_view_background_noise@3x.jpg", + "stack_view_background_noise.imageset/stack_view_background_noise~ipad.jpg", + ] +} diff --git a/chromium/ios/chrome/browser/ui/static_content/BUILD.gn b/chromium/ios/chrome/browser/ui/static_content/BUILD.gn index 307a27083ca..61ec53eec95 100644 --- a/chromium/ios/chrome/browser/ui/static_content/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/static_content/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("static_content") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "static_html_native_content.h", "static_html_native_content.mm", @@ -34,7 +35,8 @@ source_set("unit_tests") { "//ios/chrome/browser/ui", "//ios/testing:ocmock_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//net", "//testing/gtest", "//third_party/ocmock", diff --git a/chromium/ios/chrome/browser/ui/sync/BUILD.gn b/chromium/ios/chrome/browser/ui/sync/BUILD.gn index 53aaf3e0fb3..5490f891921 100644 --- a/chromium/ios/chrome/browser/ui/sync/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/sync/BUILD.gn @@ -5,21 +5,26 @@ import("//ios/public/provider/chrome/browser/build_config.gni") source_set("sync") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "sync_error_infobar_delegate.h", "sync_error_infobar_delegate.mm", "sync_util.h", "sync_util.mm", + "synced_sessions_bridge.h", + "synced_sessions_bridge.mm", ] deps = [ "//base", "//components/browser_sync", "//components/infobars/core", + "//components/signin/core/browser", "//components/strings", "//components/sync", "//google_apis", "//ios/chrome/app/strings", "//ios/chrome/browser/browser_state", + "//ios/chrome/browser/signin", "//ios/chrome/browser/sync", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui/commands", @@ -30,6 +35,7 @@ source_set("sync") { } source_set("eg_tests") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "sync_fake_server_egtest.mm", @@ -52,7 +58,7 @@ source_set("eg_tests") { "//ios/public/provider/chrome/browser/signin:test_support", "//ios/testing:ios_test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//net", "//ui/base", "//url", diff --git a/chromium/ios/chrome/browser/ui/tab_switcher/BUILD.gn b/chromium/ios/chrome/browser/ui/tab_switcher/BUILD.gn index 5a9a65d0543..026f8eef975 100644 --- a/chromium/ios/chrome/browser/ui/tab_switcher/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/tab_switcher/BUILD.gn @@ -2,53 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/tabswitcher_full_history.png", - "resources/tabswitcher_full_history@2x.png", - "resources/tabswitcher_full_history@3x.png", - "resources/tabswitcher_incognito.png", - "resources/tabswitcher_incognito@2x.png", - "resources/tabswitcher_incognito@3x.png", - "resources/tabswitcher_laptop.png", - "resources/tabswitcher_laptop@2x.png", - "resources/tabswitcher_laptop@3x.png", - "resources/tabswitcher_menu.png", - "resources/tabswitcher_menu@2x.png", - "resources/tabswitcher_menu@3x.png", - "resources/tabswitcher_new_tab.png", - "resources/tabswitcher_new_tab@2x.png", - "resources/tabswitcher_new_tab@3x.png", - "resources/tabswitcher_new_tab_fab.png", - "resources/tabswitcher_new_tab_fab@2x.png", - "resources/tabswitcher_new_tab_fab@3x.png", - "resources/tabswitcher_open_tabs.png", - "resources/tabswitcher_open_tabs@2x.png", - "resources/tabswitcher_open_tabs@3x.png", - "resources/tabswitcher_other_devices.png", - "resources/tabswitcher_other_devices@2x.png", - "resources/tabswitcher_other_devices@3x.png", - "resources/tabswitcher_overflow_arrow.png", - "resources/tabswitcher_overflow_arrow@2x.png", - "resources/tabswitcher_overflow_arrow@3x.png", - "resources/tabswitcher_phone.png", - "resources/tabswitcher_phone@2x.png", - "resources/tabswitcher_phone@3x.png", - "resources/tabswitcher_recently_closed.png", - "resources/tabswitcher_recently_closed@2x.png", - "resources/tabswitcher_recently_closed@3x.png", - "resources/tabswitcher_tab_switcher_button.png", - "resources/tabswitcher_tab_switcher_button@2x.png", - "resources/tabswitcher_tab_switcher_button@3x.png", - "resources/tabswitcher_tablet.png", - "resources/tabswitcher_tablet@2x.png", - "resources/tabswitcher_tablet@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("tab_switcher") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ @@ -90,8 +43,20 @@ source_set("tab_switcher") { "tab_switcher_view.mm", ] deps = [ - ":resources", ":utils", + "resources:tabswitcher_full_history", + "resources:tabswitcher_incognito", + "resources:tabswitcher_laptop", + "resources:tabswitcher_menu", + "resources:tabswitcher_new_tab", + "resources:tabswitcher_new_tab_fab", + "resources:tabswitcher_open_tabs", + "resources:tabswitcher_other_devices", + "resources:tabswitcher_overflow_arrow", + "resources:tabswitcher_phone", + "resources:tabswitcher_recently_closed", + "resources:tabswitcher_tab_switcher_button", + "resources:tabswitcher_tablet", "//base", "//components/browser_sync", "//components/sessions", @@ -121,6 +86,7 @@ source_set("tab_switcher") { "//ios/chrome/browser/ui/toolbar", "//ios/chrome/common:ios_app_bundle_id_prefix_header", "//ios/public/provider/chrome/browser", + "//ios/shared/chrome/browser/ui/commands", "//ios/third_party/material_components_ios", "//ios/third_party/material_roboto_font_loader_ios", "//ios/third_party/material_text_accessibility_ios", @@ -187,6 +153,7 @@ source_set("eg_tests") { "tab_switcher_controller_egtest.mm", ] deps = [ + ":tab_switcher", "//base", "//base/test:test_support", "//ios/chrome/app:app_internal", @@ -197,7 +164,9 @@ source_set("eg_tests") { "//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/public/test/http_server", "//ui/base", ] libs = [ diff --git a/chromium/ios/chrome/browser/ui/tab_switcher/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/tab_switcher/resources/BUILD.gn new file mode 100644 index 00000000000..e15b039085e --- /dev/null +++ b/chromium/ios/chrome/browser/ui/tab_switcher/resources/BUILD.gn @@ -0,0 +1,122 @@ +# Copyright 2017 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/imageset.gni") + +imageset("tabswitcher_full_history") { + sources = [ + "tabswitcher_full_history.imageset/Contents.json", + "tabswitcher_full_history.imageset/tabswitcher_full_history.png", + "tabswitcher_full_history.imageset/tabswitcher_full_history@2x.png", + "tabswitcher_full_history.imageset/tabswitcher_full_history@3x.png", + ] +} + +imageset("tabswitcher_incognito") { + sources = [ + "tabswitcher_incognito.imageset/Contents.json", + "tabswitcher_incognito.imageset/tabswitcher_incognito.png", + "tabswitcher_incognito.imageset/tabswitcher_incognito@2x.png", + "tabswitcher_incognito.imageset/tabswitcher_incognito@3x.png", + ] +} + +imageset("tabswitcher_laptop") { + sources = [ + "tabswitcher_laptop.imageset/Contents.json", + "tabswitcher_laptop.imageset/tabswitcher_laptop.png", + "tabswitcher_laptop.imageset/tabswitcher_laptop@2x.png", + "tabswitcher_laptop.imageset/tabswitcher_laptop@3x.png", + ] +} + +imageset("tabswitcher_menu") { + sources = [ + "tabswitcher_menu.imageset/Contents.json", + "tabswitcher_menu.imageset/tabswitcher_menu.png", + "tabswitcher_menu.imageset/tabswitcher_menu@2x.png", + "tabswitcher_menu.imageset/tabswitcher_menu@3x.png", + ] +} + +imageset("tabswitcher_new_tab") { + sources = [ + "tabswitcher_new_tab.imageset/Contents.json", + "tabswitcher_new_tab.imageset/tabswitcher_new_tab.png", + "tabswitcher_new_tab.imageset/tabswitcher_new_tab@2x.png", + "tabswitcher_new_tab.imageset/tabswitcher_new_tab@3x.png", + ] +} + +imageset("tabswitcher_new_tab_fab") { + sources = [ + "tabswitcher_new_tab_fab.imageset/Contents.json", + "tabswitcher_new_tab_fab.imageset/tabswitcher_new_tab_fab.png", + "tabswitcher_new_tab_fab.imageset/tabswitcher_new_tab_fab@2x.png", + "tabswitcher_new_tab_fab.imageset/tabswitcher_new_tab_fab@3x.png", + ] +} + +imageset("tabswitcher_open_tabs") { + sources = [ + "tabswitcher_open_tabs.imageset/Contents.json", + "tabswitcher_open_tabs.imageset/tabswitcher_open_tabs.png", + "tabswitcher_open_tabs.imageset/tabswitcher_open_tabs@2x.png", + "tabswitcher_open_tabs.imageset/tabswitcher_open_tabs@3x.png", + ] +} + +imageset("tabswitcher_other_devices") { + sources = [ + "tabswitcher_other_devices.imageset/Contents.json", + "tabswitcher_other_devices.imageset/tabswitcher_other_devices.png", + "tabswitcher_other_devices.imageset/tabswitcher_other_devices@2x.png", + "tabswitcher_other_devices.imageset/tabswitcher_other_devices@3x.png", + ] +} + +imageset("tabswitcher_overflow_arrow") { + sources = [ + "tabswitcher_overflow_arrow.imageset/Contents.json", + "tabswitcher_overflow_arrow.imageset/tabswitcher_overflow_arrow.png", + "tabswitcher_overflow_arrow.imageset/tabswitcher_overflow_arrow@2x.png", + "tabswitcher_overflow_arrow.imageset/tabswitcher_overflow_arrow@3x.png", + ] +} + +imageset("tabswitcher_phone") { + sources = [ + "tabswitcher_phone.imageset/Contents.json", + "tabswitcher_phone.imageset/tabswitcher_phone.png", + "tabswitcher_phone.imageset/tabswitcher_phone@2x.png", + "tabswitcher_phone.imageset/tabswitcher_phone@3x.png", + ] +} + +imageset("tabswitcher_recently_closed") { + sources = [ + "tabswitcher_recently_closed.imageset/Contents.json", + "tabswitcher_recently_closed.imageset/tabswitcher_recently_closed.png", + "tabswitcher_recently_closed.imageset/tabswitcher_recently_closed@2x.png", + "tabswitcher_recently_closed.imageset/tabswitcher_recently_closed@3x.png", + ] +} + +imageset("tabswitcher_tab_switcher_button") { + sources = [ + "tabswitcher_tab_switcher_button.imageset/Contents.json", + "tabswitcher_tab_switcher_button.imageset/tabswitcher_tab_switcher_button.png", + "tabswitcher_tab_switcher_button.imageset/tabswitcher_tab_switcher_button@2x.png", + "tabswitcher_tab_switcher_button.imageset/tabswitcher_tab_switcher_button@3x.png", + ] +} + +imageset("tabswitcher_tablet") { + sources = [ + "tabswitcher_tablet.imageset/Contents.json", + "tabswitcher_tablet.imageset/tabswitcher_tablet.png", + "tabswitcher_tablet.imageset/tabswitcher_tablet@2x.png", + "tabswitcher_tablet.imageset/tabswitcher_tablet@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/tabs/BUILD.gn b/chromium/ios/chrome/browser/ui/tabs/BUILD.gn index a67a4032d1e..5f90849ffe4 100644 --- a/chromium/ios/chrome/browser/ui/tabs/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/tabs/BUILD.gn @@ -2,42 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/tabstrip_background_tab@2x~ipad.png", - "resources/tabstrip_background_tab~ipad.png", - "resources/tabstrip_foreground_tab@2x~ipad.png", - "resources/tabstrip_foreground_tab~ipad.png", - "resources/tabstrip_incognito_background_tab@2x~ipad.png", - "resources/tabstrip_incognito_background_tab~ipad.png", - "resources/tabstrip_incognito_foreground_tab@2x~ipad.png", - "resources/tabstrip_incognito_foreground_tab~ipad.png", - "resources/tabstrip_new_tab@2x~ipad.png", - "resources/tabstrip_new_tab_incognito@2x~ipad.png", - "resources/tabstrip_new_tab_incognito_pressed@2x~ipad.png", - "resources/tabstrip_new_tab_incognito_pressed~ipad.png", - "resources/tabstrip_new_tab_incognito~ipad.png", - "resources/tabstrip_new_tab_pressed@2x~ipad.png", - "resources/tabstrip_new_tab_pressed~ipad.png", - "resources/tabstrip_new_tab~ipad.png", - "resources/tabstrip_tab_close@2x~ipad.png", - "resources/tabstrip_tab_close_incognito@2x~ipad.png", - "resources/tabstrip_tab_close_incognito_pressed@2x~ipad.png", - "resources/tabstrip_tab_close_incognito_pressed~ipad.png", - "resources/tabstrip_tab_close_incognito~ipad.png", - "resources/tabstrip_tab_close_pressed@2x~ipad.png", - "resources/tabstrip_tab_close_pressed~ipad.png", - "resources/tabstrip_tab_close~ipad.png", - "resources/tabstrip_toggle_button_gradient@2x~ipad.png", - "resources/tabstrip_toggle_button_gradient@3x~ipad.png", - "resources/tabstrip_toggle_button_gradient~ipad.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("tabs") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "tab_strip_controller+tab_switcher_animation.h", "tab_strip_controller.h", @@ -54,7 +20,19 @@ source_set("tabs") { "//ios/chrome/browser/tabs", ] deps = [ - ":resources", + "resources:tabstrip_background_tab", + "resources:tabstrip_foreground_tab", + "resources:tabstrip_incognito_background_tab", + "resources:tabstrip_incognito_foreground_tab", + "resources:tabstrip_new_tab", + "resources:tabstrip_new_tab_incognito", + "resources:tabstrip_new_tab_incognito_pressed", + "resources:tabstrip_new_tab_pressed", + "resources:tabstrip_tab_close", + "resources:tabstrip_tab_close_incognito", + "resources:tabstrip_tab_close_incognito_pressed", + "resources:tabstrip_tab_close_pressed", + "resources:tabstrip_toggle_button_gradient", "//base", "//base:i18n", "//ios/chrome/app/strings", @@ -86,7 +64,7 @@ source_set("unit_tests") { "//ios/chrome/browser/sessions:test_support", "//ios/chrome/browser/tabs", "//ios/chrome/browser/ui", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/ocmock", ] diff --git a/chromium/ios/chrome/browser/ui/tabs/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/tabs/resources/BUILD.gn new file mode 100644 index 00000000000..5dac694c24d --- /dev/null +++ b/chromium/ios/chrome/browser/ui/tabs/resources/BUILD.gn @@ -0,0 +1,109 @@ +# Copyright 2017 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/imageset.gni") + +imageset("tabstrip_background_tab") { + sources = [ + "tabstrip_background_tab.imageset/Contents.json", + "tabstrip_background_tab.imageset/tabstrip_background_tab@2x~ipad.png", + "tabstrip_background_tab.imageset/tabstrip_background_tab~ipad.png", + ] +} + +imageset("tabstrip_foreground_tab") { + sources = [ + "tabstrip_foreground_tab.imageset/Contents.json", + "tabstrip_foreground_tab.imageset/tabstrip_foreground_tab@2x~ipad.png", + "tabstrip_foreground_tab.imageset/tabstrip_foreground_tab~ipad.png", + ] +} + +imageset("tabstrip_incognito_background_tab") { + sources = [ + "tabstrip_incognito_background_tab.imageset/Contents.json", + "tabstrip_incognito_background_tab.imageset/tabstrip_incognito_background_tab@2x~ipad.png", + "tabstrip_incognito_background_tab.imageset/tabstrip_incognito_background_tab~ipad.png", + ] +} + +imageset("tabstrip_incognito_foreground_tab") { + sources = [ + "tabstrip_incognito_foreground_tab.imageset/Contents.json", + "tabstrip_incognito_foreground_tab.imageset/tabstrip_incognito_foreground_tab@2x~ipad.png", + "tabstrip_incognito_foreground_tab.imageset/tabstrip_incognito_foreground_tab~ipad.png", + ] +} + +imageset("tabstrip_new_tab") { + sources = [ + "tabstrip_new_tab.imageset/Contents.json", + "tabstrip_new_tab.imageset/tabstrip_new_tab@2x~ipad.png", + "tabstrip_new_tab.imageset/tabstrip_new_tab~ipad.png", + ] +} + +imageset("tabstrip_new_tab_incognito") { + sources = [ + "tabstrip_new_tab_incognito.imageset/Contents.json", + "tabstrip_new_tab_incognito.imageset/tabstrip_new_tab_incognito@2x~ipad.png", + "tabstrip_new_tab_incognito.imageset/tabstrip_new_tab_incognito~ipad.png", + ] +} + +imageset("tabstrip_new_tab_incognito_pressed") { + sources = [ + "tabstrip_new_tab_incognito_pressed.imageset/Contents.json", + "tabstrip_new_tab_incognito_pressed.imageset/tabstrip_new_tab_incognito_pressed@2x~ipad.png", + "tabstrip_new_tab_incognito_pressed.imageset/tabstrip_new_tab_incognito_pressed~ipad.png", + ] +} + +imageset("tabstrip_new_tab_pressed") { + sources = [ + "tabstrip_new_tab_pressed.imageset/Contents.json", + "tabstrip_new_tab_pressed.imageset/tabstrip_new_tab_pressed@2x~ipad.png", + "tabstrip_new_tab_pressed.imageset/tabstrip_new_tab_pressed~ipad.png", + ] +} + +imageset("tabstrip_tab_close") { + sources = [ + "tabstrip_tab_close.imageset/Contents.json", + "tabstrip_tab_close.imageset/tabstrip_tab_close@2x~ipad.png", + "tabstrip_tab_close.imageset/tabstrip_tab_close~ipad.png", + ] +} + +imageset("tabstrip_tab_close_incognito") { + sources = [ + "tabstrip_tab_close_incognito.imageset/Contents.json", + "tabstrip_tab_close_incognito.imageset/tabstrip_tab_close_incognito@2x~ipad.png", + "tabstrip_tab_close_incognito.imageset/tabstrip_tab_close_incognito~ipad.png", + ] +} + +imageset("tabstrip_tab_close_incognito_pressed") { + sources = [ + "tabstrip_tab_close_incognito_pressed.imageset/Contents.json", + "tabstrip_tab_close_incognito_pressed.imageset/tabstrip_tab_close_incognito_pressed@2x~ipad.png", + "tabstrip_tab_close_incognito_pressed.imageset/tabstrip_tab_close_incognito_pressed~ipad.png", + ] +} + +imageset("tabstrip_tab_close_pressed") { + sources = [ + "tabstrip_tab_close_pressed.imageset/Contents.json", + "tabstrip_tab_close_pressed.imageset/tabstrip_tab_close_pressed@2x~ipad.png", + "tabstrip_tab_close_pressed.imageset/tabstrip_tab_close_pressed~ipad.png", + ] +} + +imageset("tabstrip_toggle_button_gradient") { + sources = [ + "tabstrip_toggle_button_gradient.imageset/Contents.json", + "tabstrip_toggle_button_gradient.imageset/tabstrip_toggle_button_gradient@2x~ipad.png", + "tabstrip_toggle_button_gradient.imageset/tabstrip_toggle_button_gradient~ipad.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/toolbar/BUILD.gn b/chromium/ios/chrome/browser/ui/toolbar/BUILD.gn index 32b6c41f6d8..456e57eda5a 100644 --- a/chromium/ios/chrome/browser/ui/toolbar/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/toolbar/BUILD.gn @@ -2,44 +2,14 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -bundle_data("resources") { - sources = [ - "resources/collapse.png", - "resources/collapse@2x.png", - "resources/collapse@3x.png", - "resources/collapse_incognito.png", - "resources/collapse_incognito@2x.png", - "resources/collapse_incognito@3x.png", - "resources/collapse_pressed.png", - "resources/collapse_pressed@2x.png", - "resources/collapse_pressed@3x.png", - "resources/collapse_pressed_incognito.png", - "resources/collapse_pressed_incognito@2x.png", - "resources/collapse_pressed_incognito@3x.png", - "resources/incognito_marker_typing.png", - "resources/incognito_marker_typing@2x.png", - "resources/incognito_marker_typing@3x.png", - "resources/toolbar_dark_newtab.png", - "resources/toolbar_dark_newtab@2x.png", - "resources/toolbar_dark_newtab@3x.png", - "resources/toolbar_dark_newtab_active.png", - "resources/toolbar_dark_newtab_active@2x.png", - "resources/toolbar_dark_newtab_active@3x.png", - "resources/toolbar_dark_newtab_incognito.png", - "resources/toolbar_dark_newtab_incognito@2x.png", - "resources/toolbar_dark_newtab_incognito@3x.png", - "resources/toolbar_dark_newtab_incognito_active.png", - "resources/toolbar_dark_newtab_incognito_active@2x.png", - "resources/toolbar_dark_newtab_incognito_active@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - source_set("toolbar") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ + "keyboard_accessory_view_delegate.h", + "keyboard_assist/toolbar_assistive_keyboard_views.h", + "keyboard_assist/toolbar_assistive_keyboard_views.mm", + "new_keyboard_accessory_view.h", + "new_keyboard_accessory_view.mm", "new_tab_button.h", "new_tab_button.mm", "toolbar_button_tints.h", @@ -63,7 +33,17 @@ source_set("toolbar") { ] deps = [ ":resource_macros", - ":resources", + "resources:collapse", + "resources:collapse_incognito", + "resources:collapse_pressed", + "resources:collapse_pressed_incognito", + "resources:incognito_marker_typing", + "resources:keyboard_accessory_qr_scanner", + "resources:keyboard_accessory_voice_search", + "resources:toolbar_dark_newtab", + "resources:toolbar_dark_newtab_active", + "resources:toolbar_dark_newtab_incognito", + "resources:toolbar_dark_newtab_incognito_active", "//base", "//base:i18n", "//components/bookmarks/browser", @@ -178,7 +158,8 @@ source_set("unit_tests") { "//ios/chrome/test:test_support", "//ios/shared/chrome/browser/ui/toolbar:test_support", "//ios/testing:ocmock_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", ] @@ -198,6 +179,7 @@ source_set("eg_tests") { "//ios/chrome/app/strings", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/commands", + "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/chrome/browser/ui/omnibox:omnibox_internal", "//ios/chrome/browser/ui/tools_menu", @@ -205,7 +187,7 @@ source_set("eg_tests") { "//ios/chrome/test/earl_grey:test_support", "//ios/testing/earl_grey:earl_grey_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test/http_server", "//ui/base", ] libs = [ "XCTest.framework" ] diff --git a/chromium/ios/chrome/browser/ui/toolbar/resources/BUILD.gn b/chromium/ios/chrome/browser/ui/toolbar/resources/BUILD.gn new file mode 100644 index 00000000000..33479f4de21 --- /dev/null +++ b/chromium/ios/chrome/browser/ui/toolbar/resources/BUILD.gn @@ -0,0 +1,104 @@ +# Copyright 2017 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/imageset.gni") + +imageset("collapse_incognito") { + sources = [ + "collapse_incognito.imageset/Contents.json", + "collapse_incognito.imageset/collapse_incognito.png", + "collapse_incognito.imageset/collapse_incognito@2x.png", + "collapse_incognito.imageset/collapse_incognito@3x.png", + ] +} + +imageset("collapse_pressed_incognito") { + sources = [ + "collapse_pressed_incognito.imageset/Contents.json", + "collapse_pressed_incognito.imageset/collapse_pressed_incognito.png", + "collapse_pressed_incognito.imageset/collapse_pressed_incognito@2x.png", + "collapse_pressed_incognito.imageset/collapse_pressed_incognito@3x.png", + ] +} + +imageset("keyboard_accessory_voice_search") { + sources = [ + "keyboard_accessory_voice_search.imageset/Contents.json", + "keyboard_accessory_voice_search.imageset/keyboard_accessory_voice_search.png", + "keyboard_accessory_voice_search.imageset/keyboard_accessory_voice_search@2x.png", + "keyboard_accessory_voice_search.imageset/keyboard_accessory_voice_search@3x.png", + ] +} + +imageset("toolbar_dark_newtab") { + sources = [ + "toolbar_dark_newtab.imageset/Contents.json", + "toolbar_dark_newtab.imageset/toolbar_dark_newtab.png", + "toolbar_dark_newtab.imageset/toolbar_dark_newtab@2x.png", + "toolbar_dark_newtab.imageset/toolbar_dark_newtab@3x.png", + ] +} + +imageset("toolbar_dark_newtab_incognito_active") { + sources = [ + "toolbar_dark_newtab_incognito_active.imageset/Contents.json", + "toolbar_dark_newtab_incognito_active.imageset/toolbar_dark_newtab_incognito_active.png", + "toolbar_dark_newtab_incognito_active.imageset/toolbar_dark_newtab_incognito_active@2x.png", + "toolbar_dark_newtab_incognito_active.imageset/toolbar_dark_newtab_incognito_active@3x.png", + ] +} + +imageset("collapse_pressed") { + sources = [ + "collapse_pressed.imageset/Contents.json", + "collapse_pressed.imageset/collapse_pressed.png", + "collapse_pressed.imageset/collapse_pressed@2x.png", + "collapse_pressed.imageset/collapse_pressed@3x.png", + ] +} + +imageset("toolbar_dark_newtab_incognito") { + sources = [ + "toolbar_dark_newtab_incognito.imageset/Contents.json", + "toolbar_dark_newtab_incognito.imageset/toolbar_dark_newtab_incognito.png", + "toolbar_dark_newtab_incognito.imageset/toolbar_dark_newtab_incognito@2x.png", + "toolbar_dark_newtab_incognito.imageset/toolbar_dark_newtab_incognito@3x.png", + ] +} + +imageset("toolbar_dark_newtab_active") { + sources = [ + "toolbar_dark_newtab_active.imageset/Contents.json", + "toolbar_dark_newtab_active.imageset/toolbar_dark_newtab_active.png", + "toolbar_dark_newtab_active.imageset/toolbar_dark_newtab_active@2x.png", + "toolbar_dark_newtab_active.imageset/toolbar_dark_newtab_active@3x.png", + ] +} + +imageset("incognito_marker_typing") { + sources = [ + "incognito_marker_typing.imageset/Contents.json", + "incognito_marker_typing.imageset/incognito_marker_typing.png", + "incognito_marker_typing.imageset/incognito_marker_typing@2x.png", + "incognito_marker_typing.imageset/incognito_marker_typing@3x.png", + ] +} + +imageset("keyboard_accessory_qr_scanner") { + sources = [ + "keyboard_accessory_qr_scanner.imageset/Contents.json", + "keyboard_accessory_qr_scanner.imageset/keyboard_accessory_qr_scanner.png", + "keyboard_accessory_qr_scanner.imageset/keyboard_accessory_qr_scanner@2x.png", + "keyboard_accessory_qr_scanner.imageset/keyboard_accessory_qr_scanner@3x.png", + ] +} + +imageset("collapse") { + sources = [ + "collapse.imageset/Contents.json", + "collapse.imageset/collapse.png", + "collapse.imageset/collapse@2x.png", + "collapse.imageset/collapse@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/ui/tools_menu/BUILD.gn b/chromium/ios/chrome/browser/ui/tools_menu/BUILD.gn index c966f19e33e..d920bb2f7ab 100644 --- a/chromium/ios/chrome/browser/ui/tools_menu/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/tools_menu/BUILD.gn @@ -3,7 +3,10 @@ # found in the LICENSE file. source_set("tools_menu") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ + "new_tab_menu_view_item.h", + "new_tab_menu_view_item.mm", "reading_list_menu_view_item.h", "reading_list_menu_view_item.mm", "tools_menu_constants.h", @@ -30,6 +33,7 @@ source_set("tools_menu") { "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/popup_menu", "//ios/chrome/browser/ui/reading_list", + "//ios/chrome/browser/ui/reading_list:reading_list_ui", "//ios/chrome/browser/ui/toolbar:resource_macros", "//ios/chrome/common", "//ios/public/provider/chrome/browser", @@ -82,7 +86,8 @@ source_set("eg_tests") { "//ios/chrome/browser/ui/toolbar", "//ios/chrome/test/earl_grey:test_support", "//ios/third_party/earl_grey", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//ui/base", ] libs = [ "XCTest.framework" ] diff --git a/chromium/ios/chrome/browser/ui/voice/BUILD.gn b/chromium/ios/chrome/browser/ui/voice/BUILD.gn index 1039524f44f..aa2b017454c 100644 --- a/chromium/ios/chrome/browser/ui/voice/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/voice/BUILD.gn @@ -33,7 +33,7 @@ source_set("unit_tests") { "//base", "//base/test:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//url", ] diff --git a/chromium/ios/chrome/browser/ui/webui/BUILD.gn b/chromium/ios/chrome/browser/ui/webui/BUILD.gn index 46785c132b1..a17bac51c1d 100644 --- a/chromium/ios/chrome/browser/ui/webui/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/webui/BUILD.gn @@ -16,8 +16,8 @@ source_set("webui") { "ntp_tiles_internals_ui.h", "physical_web_ui.cc", "physical_web_ui.h", - "popular_sites_internals_ui.cc", - "popular_sites_internals_ui.h", + "suggestions_ui.cc", + "suggestions_ui.h", "terms_ui.h", "terms_ui.mm", "version_handler.cc", @@ -31,12 +31,14 @@ source_set("webui") { "//base:i18n", "//components/crash/core/browser", "//components/flags_ui", + "//components/keyed_service/core", "//components/ntp_tiles", "//components/physical_web/data_source", "//components/physical_web/webui", "//components/prefs", "//components/resources", "//components/strings", + "//components/suggestions", "//components/version_info", "//components/version_ui", "//google_apis", @@ -44,8 +46,10 @@ source_set("webui") { "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/crash_report", + "//ios/chrome/browser/favicon:favicon", "//ios/chrome/browser/metrics", "//ios/chrome/browser/ntp_tiles", + "//ios/chrome/browser/suggestions", "//ios/chrome/browser/ui", "//ios/chrome/common", "//ios/web", diff --git a/chromium/ios/chrome/browser/ui/webui/net_export/BUILD.gn b/chromium/ios/chrome/browser/ui/webui/net_export/BUILD.gn index ab4037a4def..969f0a400fd 100644 --- a/chromium/ios/chrome/browser/ui/webui/net_export/BUILD.gn +++ b/chromium/ios/chrome/browser/ui/webui/net_export/BUILD.gn @@ -15,6 +15,7 @@ source_set("net_export") { "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/ui", + "//ios/chrome/common:common", "//ios/web", "//net:net", ] diff --git a/chromium/ios/chrome/browser/upgrade/BUILD.gn b/chromium/ios/chrome/browser/upgrade/BUILD.gn index 74fecdaaa32..2c33ed2934b 100644 --- a/chromium/ios/chrome/browser/upgrade/BUILD.gn +++ b/chromium/ios/chrome/browser/upgrade/BUILD.gn @@ -3,19 +3,20 @@ # found in the LICENSE file. source_set("upgrade") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "upgrade_center.h", "upgrade_center.mm", "upgrade_recommended_details.h", ] deps = [ + "resources:infobar_update", "//base", "//components/infobars/core", "//components/version_info", "//ios/chrome/app/strings", "//ios/chrome/browser", "//ios/chrome/browser/ui/commands", - "//ios/chrome/browser/ui/infobars:resources", "//ios/web", "//net", "//ui/base", diff --git a/chromium/ios/chrome/browser/upgrade/resources/BUILD.gn b/chromium/ios/chrome/browser/upgrade/resources/BUILD.gn new file mode 100644 index 00000000000..8cf608a9eaf --- /dev/null +++ b/chromium/ios/chrome/browser/upgrade/resources/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright 2017 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/imageset.gni") + +imageset("infobar_update") { + sources = [ + "infobar_update.imageset/Contents.json", + "infobar_update.imageset/infobar_update.png", + "infobar_update.imageset/infobar_update@2x.png", + "infobar_update.imageset/infobar_update@3x.png", + ] +} diff --git a/chromium/ios/chrome/browser/voice/BUILD.gn b/chromium/ios/chrome/browser/voice/BUILD.gn index d7c3926c1eb..5d81ae39c80 100644 --- a/chromium/ios/chrome/browser/voice/BUILD.gn +++ b/chromium/ios/chrome/browser/voice/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("voice") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "speech_input_locale.h", "speech_input_locale_config.h", @@ -74,7 +75,7 @@ source_set("unit_tests") { ":tts", "//base", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", "//third_party/google_toolbox_for_mac", ] diff --git a/chromium/ios/chrome/browser/web/BUILD.gn b/chromium/ios/chrome/browser/web/BUILD.gn index 70cbc657766..ed357f0fbcb 100644 --- a/chromium/ios/chrome/browser/web/BUILD.gn +++ b/chromium/ios/chrome/browser/web/BUILD.gn @@ -25,6 +25,8 @@ source_set("web") { "repost_form_tab_helper.mm", "sad_tab_tab_helper.h", "sad_tab_tab_helper.mm", + "tab_id_tab_helper.h", + "tab_id_tab_helper.mm", ] deps = [ ":sad_tab_tab_helper_delegate", @@ -63,6 +65,7 @@ source_set("unit_tests") { "network_activity_indicator_tab_helper_unittest.mm", "repost_form_tab_helper_unittest.mm", "sad_tab_tab_helper_unittest.mm", + "tab_id_tab_helper_unittest.mm", ] deps = [ ":sad_tab_tab_helper_delegate", @@ -74,108 +77,15 @@ source_set("unit_tests") { "//ios/chrome/browser/ui:ui", "//ios/chrome/browser/ui/sad_tab", "//ios/chrome/test:test_support", - "//ios/web:test_support", "//ios/web:web_arc", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//testing/gtest", "//ui/base:base", "//url:url", ] } -bundle_data("resources") { - sources = [ - "resources/autofill_card_american_express.png", - "resources/autofill_card_american_express@2x.png", - "resources/autofill_card_american_express@2x~ipad.png", - "resources/autofill_card_american_express@3x.png", - "resources/autofill_card_american_express~ipad.png", - "resources/autofill_card_diners.png", - "resources/autofill_card_diners@2x.png", - "resources/autofill_card_diners@2x~ipad.png", - "resources/autofill_card_diners@3x.png", - "resources/autofill_card_diners~ipad.png", - "resources/autofill_card_discover.png", - "resources/autofill_card_discover@2x.png", - "resources/autofill_card_discover@2x~ipad.png", - "resources/autofill_card_discover@3x.png", - "resources/autofill_card_discover~ipad.png", - "resources/autofill_card_generic.png", - "resources/autofill_card_generic@2x.png", - "resources/autofill_card_generic@2x~ipad.png", - "resources/autofill_card_generic@3x.png", - "resources/autofill_card_generic~ipad.png", - "resources/autofill_card_jcb.png", - "resources/autofill_card_jcb@2x.png", - "resources/autofill_card_jcb@2x~ipad.png", - "resources/autofill_card_jcb@3x.png", - "resources/autofill_card_jcb~ipad.png", - "resources/autofill_card_mastercard.png", - "resources/autofill_card_mastercard@2x.png", - "resources/autofill_card_mastercard@2x~ipad.png", - "resources/autofill_card_mastercard@3x.png", - "resources/autofill_card_mastercard~ipad.png", - "resources/autofill_card_unionpay.png", - "resources/autofill_card_unionpay@2x.png", - "resources/autofill_card_unionpay@2x~ipad.png", - "resources/autofill_card_unionpay@3x.png", - "resources/autofill_card_unionpay~ipad.png", - "resources/autofill_card_visa.png", - "resources/autofill_card_visa@2x.png", - "resources/autofill_card_visa@2x~ipad.png", - "resources/autofill_card_visa@3x.png", - "resources/autofill_card_visa~ipad.png", - "resources/autofill_close.png", - "resources/autofill_close@2x.png", - "resources/autofill_close@3x.png", - "resources/autofill_close_pressed.png", - "resources/autofill_close_pressed@2x.png", - "resources/autofill_close_pressed@3x.png", - "resources/autofill_keyboard_background.png", - "resources/autofill_keyboard_background@2x.png", - "resources/autofill_keyboard_background@3x.png", - "resources/autofill_keyboard_background_left.png", - "resources/autofill_keyboard_background_left@2x.png", - "resources/autofill_keyboard_background_right.png", - "resources/autofill_keyboard_background_right@2x.png", - "resources/autofill_left_sep.png", - "resources/autofill_left_sep@2x.png", - "resources/autofill_left_sep@3x.png", - "resources/autofill_left_sep_RTL.png", - "resources/autofill_left_sep_RTL@2x.png", - "resources/autofill_left_sep_RTL@3x.png", - "resources/autofill_middle_sep.png", - "resources/autofill_middle_sep@2x.png", - "resources/autofill_middle_sep@3x.png", - "resources/autofill_next.png", - "resources/autofill_next@2x.png", - "resources/autofill_next@3x.png", - "resources/autofill_next_inactive.png", - "resources/autofill_next_inactive@2x.png", - "resources/autofill_next_inactive@3x.png", - "resources/autofill_next_pressed.png", - "resources/autofill_next_pressed@2x.png", - "resources/autofill_next_pressed@3x.png", - "resources/autofill_prev.png", - "resources/autofill_prev@2x.png", - "resources/autofill_prev@3x.png", - "resources/autofill_prev_inactive.png", - "resources/autofill_prev_inactive@2x.png", - "resources/autofill_prev_inactive@3x.png", - "resources/autofill_prev_pressed.png", - "resources/autofill_prev_pressed@2x.png", - "resources/autofill_prev_pressed@3x.png", - "resources/autofill_right_sep.png", - "resources/autofill_right_sep@2x.png", - "resources/autofill_right_sep@3x.png", - "resources/autofill_right_sep_RTL.png", - "resources/autofill_right_sep_RTL@2x.png", - "resources/autofill_right_sep_RTL@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - js_compile_bundle("chrome_bundle") { closure_entry_point = "__crWeb.chromeBundle" sources = [ @@ -217,12 +127,12 @@ source_set("web_internal") { ] deps = [ ":chrome_bundle", - ":resources", "//base", "//components/content_settings/core/browser", "//components/dom_distiller/core", "//components/error_page/common", "//components/infobars/core", + "//components/payments/core", "//components/prefs", "//components/resources", "//components/strings", @@ -268,7 +178,7 @@ source_set("test_support") { "//ios/chrome/browser/ui:ui_internal", "//ios/chrome/browser/web", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", ] } @@ -289,6 +199,7 @@ source_set("unit_tests_internal") { "//base/test:test_support", "//components/content_settings/core/browser", "//components/infobars/core", + "//components/payments/core", "//ios/chrome/browser", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/content_settings:content_settings", @@ -296,7 +207,8 @@ source_set("unit_tests_internal") { "//ios/chrome/browser/infobars", "//ios/chrome/browser/ui", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//net", "//testing/gtest", "//third_party/ocmock", @@ -342,7 +254,8 @@ source_set("eg_tests") { "//ios/third_party/earl_grey", "//ios/third_party/material_components_ios", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//net", "//ui/base", "//url", @@ -363,7 +276,8 @@ source_set("perf_tests") { "//base", "//ios/chrome/test/base:perf_test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", ] libs = [ "WebKit.framework" ] } diff --git a/chromium/ios/chrome/browser/web_state_list/BUILD.gn b/chromium/ios/chrome/browser/web_state_list/BUILD.gn index 7ddb1ae6959..3b8eb0e81ed 100644 --- a/chromium/ios/chrome/browser/web_state_list/BUILD.gn +++ b/chromium/ios/chrome/browser/web_state_list/BUILD.gn @@ -60,7 +60,7 @@ source_set("unit_tests") { "//base", "//ios/chrome/browser/sessions:serialisation", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//net", "//testing/gtest", "//ui/base", diff --git a/chromium/ios/chrome/common/BUILD.gn b/chromium/ios/chrome/common/BUILD.gn index d0b2a470e2c..f38e2705982 100644 --- a/chromium/ios/chrome/common/BUILD.gn +++ b/chromium/ios/chrome/common/BUILD.gn @@ -21,6 +21,7 @@ source_set("common") { deps = [ "//base", "//components/version_info", + "//components/version_info:version_string", "//ios/chrome/common/app_group:main_app", "//ios/chrome/common/physical_web", "//net", diff --git a/chromium/ios/chrome/content_widget_extension/BUILD.gn b/chromium/ios/chrome/content_widget_extension/BUILD.gn new file mode 100644 index 00000000000..acfad800bd0 --- /dev/null +++ b/chromium/ios/chrome/content_widget_extension/BUILD.gn @@ -0,0 +1,102 @@ +# Copyright 2017 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") +import("//build/config/locales.gni") +import("//build/config/mac/base_rules.gni") +import("//build/mac/tweak_info_plist.gni") +import("//ios/build/chrome_build.gni") +import("//tools/grit/repack.gni") +import("//ios/chrome/tools/strings/generate_localizable_strings.gni") + +tweak_info_plist("tweak_info_plist") { + info_plist = "Info.plist" +} + +compile_plist("entitlements") { + format = "xml1" + substitutions = [ "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix" ] + output_name = "$target_gen_dir/content_widget_extension.appex.entitlements" + plist_templates = + [ "entitlements/external/content_widget_extension.appex.entitlements" ] +} + +ios_appex_bundle("content_widget_extension") { + deps = [ + ":content_widget", + ":system_strings", + ] + + extra_substitutions = [ + "CHROME_CHANNEL_SCHEME=$url_channel_scheme", + "CHROMIUM_SHORT_NAME=$chromium_short_name", + "WIDGET_EXTENSION_BUNDLE_ID=$chromium_bundle_id.ContentTodayExtension", + ] + + entitlements_target = ":entitlements" + info_plist_target = ":tweak_info_plist" +} + +source_set("content_widget") { + sources = [ + "content_widget_view.h", + "content_widget_view.mm", + "content_widget_view_controller.h", + "content_widget_view_controller.mm", + ] + + deps = [ + "//base", + "//ios/chrome/common/app_group", + ] + + libs = [ + "Foundation.framework", + "NotificationCenter.framework", + "UIKit.framework", + ] + + configs += [ "//build/config/compiler:enable_arc" ] +} + +source_set("unit_tests") { + testonly = true + sources = [ + "content_widget_view_controller_unittest.mm", + ] + deps = [ + ":content_widget", + "//testing/gtest", + ] + configs += [ "//build/config/compiler:enable_arc" ] +} + +repack_locales("packed_resources") { + input_locales = ios_packed_locales + output_locales = ios_packed_locales_as_mac_outputs + + source_patterns = [ "$root_gen_dir/ios/content_widget_extension/ios_content_widget_extension_${branding_path_component}_strings_" ] + + deps = [ + "//ios/chrome/content_widget_extension/strings:ios_content_widget_extension_${branding_path_component}_strings", + ] +} + +generate_localizable_strings("system_strings") { + visibility = [ ":*" ] + _packed_resources_target = ":packed_resources" + config_file = "content_widget_extension_localize_strings_config.plist" + datapack_dir = get_label_info(_packed_resources_target, "target_gen_dir") + packed_locales = ios_packed_locales_as_mac_outputs + output_filenames = [ "InfoPlist.strings" ] + deps = [ + "//ios/chrome/content_widget_extension/strings:ios_content_widget_extension_chromium_strings", + + # Depends on both branding strings target to ensure the proper .h exists + # (the .plist configuration can only reference one of them, and their + # content is identical). + "//ios/chrome/content_widget_extension/strings:ios_content_widget_extension_google_chrome_strings", + _packed_resources_target, + ] +} diff --git a/chromium/ios/chrome/content_widget_extension/strings/BUILD.gn b/chromium/ios/chrome/content_widget_extension/strings/BUILD.gn new file mode 100644 index 00000000000..d7dfab2cfac --- /dev/null +++ b/chromium/ios/chrome/content_widget_extension/strings/BUILD.gn @@ -0,0 +1,36 @@ +# Copyright 2017 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/locales.gni") +import("//tools/grit/grit_rule.gni") + +group("strings") { + public_deps = [ + ":ios_content_widget_extension_chromium_strings", + ":ios_content_widget_extension_google_chrome_strings", + ] +} + +grit("ios_content_widget_extension_chromium_strings") { + source = "ios_content_widget_extension_chromium_strings.grd" + output_dir = "$root_gen_dir/ios/content_widget_extension" + outputs = [ + "grit/ios_content_widget_extension_chromium_strings.h", + ] + foreach(locale, locales_with_fake_bidi) { + outputs += [ "ios_content_widget_extension_chromium_strings_$locale.pak" ] + } +} + +grit("ios_content_widget_extension_google_chrome_strings") { + source = "ios_content_widget_extension_google_chrome_strings.grd" + output_dir = "$root_gen_dir/ios/content_widget_extension" + outputs = [ + "grit/ios_content_widget_extension_google_chrome_strings.h", + ] + foreach(locale, locales_with_fake_bidi) { + outputs += + [ "ios_content_widget_extension_google_chrome_strings_$locale.pak" ] + } +} diff --git a/chromium/ios/chrome/search_widget_extension/BUILD.gn b/chromium/ios/chrome/search_widget_extension/BUILD.gn index 38540eb4224..ee32aebceae 100644 --- a/chromium/ios/chrome/search_widget_extension/BUILD.gn +++ b/chromium/ios/chrome/search_widget_extension/BUILD.gn @@ -25,6 +25,11 @@ compile_plist("entitlements") { ios_appex_bundle("search_widget_extension") { deps = [ ":search_widget", + ":system_strings", + "resources:quick_action_camera_search", + "resources:quick_action_incognito_search", + "resources:quick_action_search", + "resources:quick_action_voice_search", ] extra_substitutions = [ @@ -39,6 +44,10 @@ ios_appex_bundle("search_widget_extension") { source_set("search_widget") { sources = [ + "copied_url_view.h", + "copied_url_view.mm", + "search_action_view.h", + "search_action_view.mm", "search_widget_view.h", "search_widget_view.mm", "search_widget_view_controller.h", @@ -48,8 +57,6 @@ source_set("search_widget") { ] deps = [ - ":resources", - ":system_strings", "//base", "//components/open_from_clipboard:open_from_clipboard_impl", "//ios/chrome/common/app_group", @@ -76,27 +83,6 @@ source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] } -bundle_data("resources") { - visibility = [ ":*" ] - sources = [ - "resources/quick_action_camera_search.png", - "resources/quick_action_camera_search@2x.png", - "resources/quick_action_camera_search@3x.png", - "resources/quick_action_incognito_search.png", - "resources/quick_action_incognito_search@2x.png", - "resources/quick_action_incognito_search@3x.png", - "resources/quick_action_search.png", - "resources/quick_action_search@2x.png", - "resources/quick_action_search@3x.png", - "resources/quick_action_voice_search.png", - "resources/quick_action_voice_search@2x.png", - "resources/quick_action_voice_search@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} - repack_locales("packed_resources") { input_locales = ios_packed_locales output_locales = ios_packed_locales_as_mac_outputs diff --git a/chromium/ios/chrome/search_widget_extension/resources/BUILD.gn b/chromium/ios/chrome/search_widget_extension/resources/BUILD.gn new file mode 100644 index 00000000000..124ab76fffa --- /dev/null +++ b/chromium/ios/chrome/search_widget_extension/resources/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright 2017 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/imageset.gni") + +imageset("quick_action_search") { + sources = [ + "quick_action_search.imageset/Contents.json", + "quick_action_search.imageset/quick_action_search.png", + "quick_action_search.imageset/quick_action_search@2x.png", + "quick_action_search.imageset/quick_action_search@3x.png", + ] +} + +imageset("quick_action_incognito_search") { + sources = [ + "quick_action_incognito_search.imageset/Contents.json", + "quick_action_incognito_search.imageset/quick_action_incognito_search.png", + "quick_action_incognito_search.imageset/quick_action_incognito_search@2x.png", + "quick_action_incognito_search.imageset/quick_action_incognito_search@3x.png", + ] +} + +imageset("quick_action_voice_search") { + sources = [ + "quick_action_voice_search.imageset/Contents.json", + "quick_action_voice_search.imageset/quick_action_voice_search.png", + "quick_action_voice_search.imageset/quick_action_voice_search@2x.png", + "quick_action_voice_search.imageset/quick_action_voice_search@3x.png", + ] +} + +imageset("quick_action_camera_search") { + sources = [ + "quick_action_camera_search.imageset/Contents.json", + "quick_action_camera_search.imageset/quick_action_camera_search.png", + "quick_action_camera_search.imageset/quick_action_camera_search@2x.png", + "quick_action_camera_search.imageset/quick_action_camera_search@3x.png", + ] +} diff --git a/chromium/ios/chrome/test/BUILD.gn b/chromium/ios/chrome/test/BUILD.gn index 4c64b5ace61..48a4bdbcc54 100644 --- a/chromium/ios/chrome/test/BUILD.gn +++ b/chromium/ios/chrome/test/BUILD.gn @@ -17,10 +17,9 @@ group("all_tests") { } source_set("test_support") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ - "block_cleanup_test.h", - "block_cleanup_test.mm", "ios_chrome_scoped_testing_chrome_browser_provider.h", "ios_chrome_scoped_testing_chrome_browser_provider.mm", "ios_chrome_scoped_testing_chrome_browser_state_manager.cc", @@ -34,6 +33,10 @@ source_set("test_support") { "testing_application_context.mm", ] + public_deps = [ + ":block_cleanup_test", + ] + deps = [ "//base", "//base/test:test_support", @@ -48,7 +51,7 @@ source_set("test_support") { "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//net", "//testing/gmock", "//testing/gtest", @@ -57,6 +60,21 @@ source_set("test_support") { ] } +source_set("block_cleanup_test") { + # TODO(crbug.com/733237): Replace this comment with an explicit disable_arc config. + # The files in this target depend on non-ARC memeory management. + testonly = true + sources = [ + "block_cleanup_test.h", + "block_cleanup_test.mm", + ] + + deps = [ + "//base", + "//testing/gtest", + ] +} + source_set("run_all_unittests") { testonly = true sources = [ @@ -122,10 +140,9 @@ test("ios_chrome_unittests") { "//ios/chrome/browser/find_in_page:unit_tests", "//ios/chrome/browser/geolocation:unit_tests", "//ios/chrome/browser/itunes_links:unit_tests", + "//ios/chrome/browser/language:unit_tests", "//ios/chrome/browser/metrics:unit_tests", "//ios/chrome/browser/metrics:unit_tests_internal", - "//ios/chrome/browser/native_app_launcher:unit_tests", - "//ios/chrome/browser/native_app_launcher:unit_tests_internal", "//ios/chrome/browser/net:unit_tests", "//ios/chrome/browser/omaha:unit_tests", "//ios/chrome/browser/passwords:unit_tests", @@ -147,14 +164,15 @@ test("ios_chrome_unittests") { "//ios/chrome/browser/ui/autofill/cells:unit_tests", "//ios/chrome/browser/ui/bookmarks:unit_tests", "//ios/chrome/browser/ui/bookmarks/cells:unit_tests", + "//ios/chrome/browser/ui/bubble:unit_tests", "//ios/chrome/browser/ui/collection_view:unit_tests", "//ios/chrome/browser/ui/collection_view/cells:unit_tests", - "//ios/chrome/browser/ui/commands:unit_tests", "//ios/chrome/browser/ui/content_suggestions:unit_tests", "//ios/chrome/browser/ui/content_suggestions/cells:unit_tests", "//ios/chrome/browser/ui/content_suggestions/identifier:unit_tests", "//ios/chrome/browser/ui/context_menu:unit_tests", "//ios/chrome/browser/ui/contextual_search:unit_tests", + "//ios/chrome/browser/ui/contextual_search/settings:unit_tests", "//ios/chrome/browser/ui/dialogs:unit_tests", "//ios/chrome/browser/ui/dialogs:unit_tests_internal", "//ios/chrome/browser/ui/downloads:unit_tests", @@ -190,12 +208,13 @@ test("ios_chrome_unittests") { "//ios/chrome/browser/web_resource:unit_tests", "//ios/chrome/browser/web_state_list:unit_tests", "//ios/chrome/common:unit_tests", + "//ios/chrome/content_widget_extension:unit_tests", "//ios/chrome/search_widget_extension:unit_tests", "//ios/chrome/test/base:unit_tests", "//ios/shared/chrome/browser/ui/broadcaster:unit_tests", "//ios/shared/chrome/browser/ui/browser_list:unit_tests", - "//ios/shared/chrome/browser/ui/commands:unit_tests", "//ios/shared/chrome/browser/ui/coordinators:unit_tests", + "//ios/testing:http_server_bundle_data", ] assert_no_deps = ios_assert_no_deps diff --git a/chromium/ios/chrome/test/app/BUILD.gn b/chromium/ios/chrome/test/app/BUILD.gn index b1c07a69804..5abfdb91bf1 100644 --- a/chromium/ios/chrome/test/app/BUILD.gn +++ b/chromium/ios/chrome/test/app/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("test_support") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "bookmarks_test_util.h", @@ -67,15 +68,16 @@ source_set("test_support") { "//ios/chrome/browser/ui:ui_internal", "//ios/chrome/browser/ui/commands", "//ios/chrome/browser/ui/main", - "//ios/chrome/browser/ui/ntp:ntp_internal", + "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/stack_view", "//ios/chrome/browser/ui/static_content", + "//ios/chrome/browser/ui/tab_switcher", "//ios/chrome/browser/ui/tabs", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/signin:test_support", "//ios/testing:ios_test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test", "//net", "//net:test_support", "//url", diff --git a/chromium/ios/chrome/test/base/BUILD.gn b/chromium/ios/chrome/test/base/BUILD.gn index 5b902b2c358..02f8dfe3083 100644 --- a/chromium/ios/chrome/test/base/BUILD.gn +++ b/chromium/ios/chrome/test/base/BUILD.gn @@ -38,6 +38,6 @@ source_set("perf_test_support") { "//base", "//ios/chrome/browser/web:web_internal", "//ios/chrome/test:test_support", - "//ios/web:test_support", + "//ios/web/public/test", ] } diff --git a/chromium/ios/chrome/test/earl_grey/BUILD.gn b/chromium/ios/chrome/test/earl_grey/BUILD.gn index 7da5f6993fe..ffb3f1cb5c3 100644 --- a/chromium/ios/chrome/test/earl_grey/BUILD.gn +++ b/chromium/ios/chrome/test/earl_grey/BUILD.gn @@ -27,6 +27,15 @@ chrome_ios_eg_test("ios_chrome_integration_egtests") { "//ios/chrome/browser/device_sharing:eg_tests", "//ios/chrome/browser/metrics:eg_tests", "//ios/chrome/browser/net:eg_tests", + "//ios/chrome/browser/ntp_tiles:eg_tests", + ] +} + +chrome_ios_eg_test("ios_chrome_payments_egtests") { + deps = [ + ":test_support", + "//components/payments/core:payments_test_bundle_data", + "//ios/chrome/browser/ui/payments:eg_tests", ] } @@ -46,6 +55,7 @@ chrome_ios_eg_test("ios_chrome_settings_egtests") { chrome_ios_eg_test("ios_chrome_ui_egtests") { deps = [ "//ios/chrome/app/safe_mode:eg_tests", + "//ios/chrome/browser/content_suggestions:eg_tests", "//ios/chrome/browser/ui:eg_tests", "//ios/chrome/browser/ui/activity_services:eg_tests", "//ios/chrome/browser/ui/alert_coordinator:eg_tests", @@ -60,6 +70,7 @@ chrome_ios_eg_test("ios_chrome_ui_egtests") { "//ios/chrome/browser/ui/ntp/recent_tabs:eg_tests", "//ios/chrome/browser/ui/print:eg_tests", "//ios/chrome/browser/ui/qr_scanner:eg_tests", + "//ios/chrome/browser/ui/sad_tab:eg_tests", "//ios/chrome/browser/ui/stack_view:eg_tests", "//ios/chrome/browser/ui/sync:eg_tests", "//ios/chrome/browser/ui/tab_switcher:eg_tests", @@ -77,6 +88,7 @@ chrome_ios_eg_test("ios_chrome_web_egtests") { } chrome_ios_eg_test("ios_chrome_multitasking_egtests") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "//ios/chrome/app/multitasking_test_application_delegate.h", "//ios/chrome/app/multitasking_test_application_delegate.mm", @@ -153,8 +165,6 @@ source_set("test_support") { "accessibility_util.mm", "chrome_actions.h", "chrome_actions.mm", - "chrome_assertions.h", - "chrome_assertions.mm", "chrome_earl_grey.h", "chrome_earl_grey.mm", "chrome_earl_grey_ui.h", @@ -184,7 +194,8 @@ source_set("test_support") { "//ios/third_party/material_components_ios", "//ios/web", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//ui/base", "//ui/base:test_support", "//url", @@ -193,6 +204,7 @@ source_set("test_support") { public_deps = [ "//build/config/ios:xctest", "//ios/third_party/earl_grey", + "//ios/web/public/test/fakes", ] libs = [ diff --git a/chromium/ios/chrome/test/ocmock/BUILD.gn b/chromium/ios/chrome/test/ocmock/BUILD.gn index 1b830410d59..cc3ebdf3808 100644 --- a/chromium/ios/chrome/test/ocmock/BUILD.gn +++ b/chromium/ios/chrome/test/ocmock/BUILD.gn @@ -3,12 +3,11 @@ # found in the LICENSE file. source_set("ocmock") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "OCMockObject+BreakpadControllerTesting.h", "OCMockObject+BreakpadControllerTesting.mm", - "scoped_mock_object.h", - "scoped_verifying_mock_object.h", ] deps = [ "//base", diff --git a/chromium/ios/chrome/today_extension/BUILD.gn b/chromium/ios/chrome/today_extension/BUILD.gn index 8a9ebffd204..886ed216562 100644 --- a/chromium/ios/chrome/today_extension/BUILD.gn +++ b/chromium/ios/chrome/today_extension/BUILD.gn @@ -30,6 +30,7 @@ compile_plist("entitlements") { } ios_appex_bundle("today_extension") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "footer_label.h", "footer_label.mm", @@ -57,7 +58,10 @@ ios_appex_bundle("today_extension") { deps = [ ":packed_resources", - ":resources", + "resources:todayview_clipboard", + "resources:todayview_new_tab", + "resources:todayview_physical_web", + "resources:todayview_voice_search", "//base", "//base:i18n", "//components/metrics", @@ -95,24 +99,3 @@ ios_appex_bundle("today_extension") { entitlements_target = ":entitlements" info_plist_target = ":tweak_info_plist" } - -bundle_data("resources") { - visibility = [ ":*" ] - sources = [ - "resources/todayview_clipboard.png", - "resources/todayview_clipboard@2x.png", - "resources/todayview_clipboard@3x.png", - "resources/todayview_new_tab.png", - "resources/todayview_new_tab@2x.png", - "resources/todayview_new_tab@3x.png", - "resources/todayview_physical_web.png", - "resources/todayview_physical_web@2x.png", - "resources/todayview_physical_web@3x.png", - "resources/todayview_voice_search.png", - "resources/todayview_voice_search@2x.png", - "resources/todayview_voice_search@3x.png", - ] - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] -} diff --git a/chromium/ios/chrome/today_extension/resources/BUILD.gn b/chromium/ios/chrome/today_extension/resources/BUILD.gn new file mode 100644 index 00000000000..43c0b52d213 --- /dev/null +++ b/chromium/ios/chrome/today_extension/resources/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright 2017 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/imageset.gni") + +imageset("todayview_new_tab") { + sources = [ + "todayview_new_tab.imageset/Contents.json", + "todayview_new_tab.imageset/todayview_new_tab.png", + "todayview_new_tab.imageset/todayview_new_tab@2x.png", + "todayview_new_tab.imageset/todayview_new_tab@3x.png", + ] +} + +imageset("todayview_clipboard") { + sources = [ + "todayview_clipboard.imageset/Contents.json", + "todayview_clipboard.imageset/todayview_clipboard.png", + "todayview_clipboard.imageset/todayview_clipboard@2x.png", + "todayview_clipboard.imageset/todayview_clipboard@3x.png", + ] +} + +imageset("todayview_physical_web") { + sources = [ + "todayview_physical_web.imageset/Contents.json", + "todayview_physical_web.imageset/todayview_physical_web.png", + "todayview_physical_web.imageset/todayview_physical_web@2x.png", + "todayview_physical_web.imageset/todayview_physical_web@3x.png", + ] +} + +imageset("todayview_voice_search") { + sources = [ + "todayview_voice_search.imageset/Contents.json", + "todayview_voice_search.imageset/todayview_voice_search.png", + "todayview_voice_search.imageset/todayview_voice_search@2x.png", + "todayview_voice_search.imageset/todayview_voice_search@3x.png", + ] +} diff --git a/chromium/ios/clean/chrome/app/BUILD.gn b/chromium/ios/clean/chrome/app/BUILD.gn index 2966dd8a9a8..e5d414ba038 100644 --- a/chromium/ios/clean/chrome/app/BUILD.gn +++ b/chromium/ios/clean/chrome/app/BUILD.gn @@ -53,12 +53,14 @@ ios_app_bundle("chrome_clean_skeleton") { extra_substitutions = [ "CHROMIUM_BUNDLE_ID=$output_name", + "CHROMIUM_HANDOFF_ID=$chromium_handoff_id", "CHROMIUM_SHORT_NAME=$output_name", "CHROMIUM_URL_SCHEME_1=$url_unsecure_scheme", "CHROMIUM_URL_SCHEME_2=$url_secure_scheme", "CHROMIUM_URL_SCHEME_3=$url_x_callback_scheme", "CHROMIUM_URL_SCHEME_4=$url_channel_scheme", "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix", + "SSOAUTH_URL_SCHEME=$url_ssoauth_scheme", ] if (ios_encryption_export_compliance_code != "") { @@ -83,6 +85,7 @@ source_set("main") { "//ios/chrome/browser:browser_internal", "//ios/chrome/browser/crash_report", "//ios/chrome/common", + "//ios/testing/perf:startup", "//third_party/google_toolbox_for_mac", ] @@ -102,6 +105,7 @@ source_set("application_state") { deps = [ "//base", "//ios/shared/chrome/browser/ui/coordinators", + "//ios/testing/perf:startup", ] } @@ -116,5 +120,6 @@ source_set("app") { deps = [ ":application_state", "//ios/clean/chrome/app/steps", + "//ios/testing/perf:startup", ] } diff --git a/chromium/ios/clean/chrome/browser/ui/commands/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/commands/BUILD.gn index 1e5d2703f1e..eda1a9b122b 100644 --- a/chromium/ios/clean/chrome/browser/ui/commands/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/commands/BUILD.gn @@ -4,6 +4,7 @@ source_set("commands") { sources = [ + "context_menu_commands.h", "find_in_page_search_commands.h", "find_in_page_visibility_commands.h", "navigation_commands.h", diff --git a/chromium/ios/clean/chrome/browser/ui/context_menu/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/context_menu/BUILD.gn index 24307b6dc8b..75ed85b0965 100644 --- a/chromium/ios/clean/chrome/browser/ui/context_menu/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/context_menu/BUILD.gn @@ -4,6 +4,8 @@ source_set("context_menu") { sources = [ + "context_menu_context_impl.h", + "context_menu_context_impl.mm", "context_menu_mediator.h", "context_menu_mediator.mm", "web_context_menu_coordinator.h", @@ -14,6 +16,8 @@ source_set("context_menu") { deps = [ ":context_menu_ui", + "//ios/chrome/browser/web_state_list:web_state_list", + "//ios/clean/chrome/browser/ui/commands:commands", "//ios/shared/chrome/browser/ui/browser_list", "//ios/shared/chrome/browser/ui/commands", "//ios/shared/chrome/browser/ui/coordinators", @@ -26,11 +30,19 @@ source_set("context_menu") { source_set("context_menu_ui") { sources = [ "context_menu_consumer.h", - "context_menu_consumer.mm", + "context_menu_context.h", + "context_menu_context.mm", + "context_menu_item.h", + "context_menu_item.mm", "context_menu_view_controller.h", "context_menu_view_controller.mm", ] + deps = [ + "//base:base", + "//ios/clean/chrome/browser/ui/commands:commands", + ] + configs += [ "//build/config/compiler:enable_arc" ] } @@ -48,7 +60,8 @@ source_set("unit_tests") { "//base", "//base/test:test_support", "//ios/chrome/test/base", - "//ios/web:test_support", + "//ios/web", + "//ios/web/public/test", "//testing/gtest", ] } diff --git a/chromium/ios/clean/chrome/browser/ui/find_in_page/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/find_in_page/BUILD.gn index a53b364004e..dccbfe0a097 100644 --- a/chromium/ios/clean/chrome/browser/ui/find_in_page/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/find_in_page/BUILD.gn @@ -19,7 +19,6 @@ source_set("find_in_page") { "//ios/chrome/browser/web_state_list", "//ios/clean/chrome/browser", "//ios/clean/chrome/browser/ui/actions", - "//ios/clean/chrome/browser/ui/animators", "//ios/clean/chrome/browser/ui/commands", "//ios/shared/chrome/browser/ui/browser_list", "//ios/shared/chrome/browser/ui/commands", @@ -40,9 +39,7 @@ source_set("find_in_page_ui") { "//ios/chrome/browser/ui/find_bar", "//ios/clean/chrome/browser/ui", "//ios/clean/chrome/browser/ui/actions", - "//ios/clean/chrome/browser/ui/animators", "//ios/clean/chrome/browser/ui/commands", - "//ios/clean/chrome/browser/ui/presenters", "//ui/base", ] libs = [ "UIKit.framework" ] diff --git a/chromium/ios/clean/chrome/browser/ui/ntp/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/ntp/BUILD.gn index c8a871d4805..1f11d555d0d 100644 --- a/chromium/ios/clean/chrome/browser/ui/ntp/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/ntp/BUILD.gn @@ -20,6 +20,7 @@ source_set("ntp") { ":ntp_ui", "//ios/chrome/app/strings:ios_strings_grit", "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/chrome/browser/ui/toolbar", "//ios/clean/chrome/browser/ui/bookmarks", @@ -48,6 +49,7 @@ source_set("ntp_ui") { "//components/strings:components_strings_grit", "//ios/chrome/app/strings:ios_strings_grit", "//ios/chrome/browser/ui:ui", + "//ios/chrome/browser/ui/ntp:ntp_controller", "//ios/chrome/browser/ui/ntp:ntp_internal", "//ios/clean/chrome/browser/ui", "//ios/clean/chrome/browser/ui/commands:commands", diff --git a/chromium/ios/clean/chrome/browser/ui/root/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/root/BUILD.gn index 19133fb13ac..d499ecdf6a7 100644 --- a/chromium/ios/clean/chrome/browser/ui/root/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/root/BUILD.gn @@ -26,8 +26,8 @@ source_set("root_ui") { ] deps = [ "//base", - "//ios/clean/chrome/browser/ui/animators", - "//ios/clean/chrome/browser/ui/presenters", + "//ios/clean/chrome/browser/ui/transitions/animators", + "//ios/clean/chrome/browser/ui/transitions/presenters", ] configs += [ "//build/config/compiler:enable_arc" ] } @@ -42,7 +42,7 @@ source_set("unit_tests") { ":root_ui", "//base", "//ios/clean/chrome/browser", - "//ios/clean/chrome/browser/ui/animators", + "//ios/clean/chrome/browser/ui/transitions/animators", "//testing/gtest", "//third_party/ocmock", ] diff --git a/chromium/ios/clean/chrome/browser/ui/settings/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/settings/BUILD.gn index e5b4bf6de9c..fae4fa04c98 100644 --- a/chromium/ios/clean/chrome/browser/ui/settings/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/settings/BUILD.gn @@ -4,13 +4,19 @@ source_set("settings") { sources = [ + "material_cell_catalog_coordinator.h", + "material_cell_catalog_coordinator.mm", "settings_coordinator.h", "settings_coordinator.mm", + "settings_main_page_coordinator.h", + "settings_main_page_coordinator.mm", ] configs += [ "//build/config/compiler:enable_arc" ] deps = [ + "//base:base", + "//ios/chrome/browser/browser_state", "//ios/chrome/browser/ui/settings", "//ios/clean/chrome/browser/ui/actions", "//ios/clean/chrome/browser/ui/commands", @@ -19,3 +25,21 @@ source_set("settings") { "//ios/shared/chrome/browser/ui/coordinators", ] } + +source_set("unit_tests") { + testonly = true + sources = [ + "material_cell_catalog_coordinator_unittest.mm", + ] + + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + ":settings", + "//ios/chrome/browser/browser_state:test_support", + "//ios/chrome/browser/ui/settings", + "//ios/shared/chrome/browser/ui/browser_list", + "//ios/shared/chrome/browser/ui/coordinators:test_support", + "//testing/gtest", + ] +} diff --git a/chromium/ios/clean/chrome/browser/ui/tab/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/tab/BUILD.gn index 1a209c0bfb2..3e44ed17162 100644 --- a/chromium/ios/clean/chrome/browser/ui/tab/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/tab/BUILD.gn @@ -6,6 +6,8 @@ source_set("tab") { sources = [ "tab_coordinator.h", "tab_coordinator.mm", + "tab_navigation_controller.h", + "tab_navigation_controller.mm", ] configs += [ "//build/config/compiler:enable_arc" ] @@ -14,14 +16,16 @@ source_set("tab") { ":tab_ui", "//base", "//ios/chrome/browser", + "//ios/chrome/browser/web_state_list", "//ios/clean/chrome/browser/ui/actions", - "//ios/clean/chrome/browser/ui/animators", "//ios/clean/chrome/browser/ui/commands", "//ios/clean/chrome/browser/ui/find_in_page", "//ios/clean/chrome/browser/ui/ntp", "//ios/clean/chrome/browser/ui/tab_strip", "//ios/clean/chrome/browser/ui/toolbar", + "//ios/clean/chrome/browser/ui/transitions", "//ios/clean/chrome/browser/ui/web_contents", + "//ios/shared/chrome/browser/ui/broadcaster", "//ios/shared/chrome/browser/ui/browser_list", "//ios/shared/chrome/browser/ui/commands", "//ios/shared/chrome/browser/ui/coordinators", @@ -36,8 +40,9 @@ source_set("tab_ui") { ] deps = [ "//ios/clean/chrome/browser/ui", - "//ios/clean/chrome/browser/ui/animators", - "//ios/clean/chrome/browser/ui/presenters", + "//ios/clean/chrome/browser/ui/transitions", + "//ios/clean/chrome/browser/ui/transitions/animators", + "//ios/clean/chrome/browser/ui/transitions/presenters", ] libs = [ "UIKit.framework" ] configs += [ "//build/config/compiler:enable_arc" ] @@ -56,11 +61,12 @@ source_set("unit_tests") { ":tab", ":tab_ui", "//base", - "//ios/chrome/browser/browser_state:test_support", "//ios/shared/chrome/browser/ui/browser_list", "//ios/shared/chrome/browser/ui/coordinators", + "//ios/shared/chrome/browser/ui/coordinators:test_support", + "//ios/shared/chrome/browser/ui/tab:test_support", "//ios/shared/chrome/browser/ui/toolbar:test_support", - "//ios/web:test_support", + "//ios/web/public/test", "//testing/gtest", ] } diff --git a/chromium/ios/clean/chrome/browser/ui/tab_collection/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/tab_collection/BUILD.gn index d599e374086..565a91a3ec3 100644 --- a/chromium/ios/clean/chrome/browser/ui/tab_collection/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/tab_collection/BUILD.gn @@ -10,8 +10,11 @@ source_set("tab_collection") { deps = [ ":tab_collection_ui", "//base", + "//ios/chrome/browser/snapshots", + "//ios/chrome/browser/web", "//ios/chrome/browser/web_state_list", "//ios/web", + "//ui/gfx", ] configs += [ "//build/config/compiler:enable_arc" ] } @@ -28,8 +31,13 @@ source_set("tab_collection_ui") { ] deps = [ "//base", + "//components/strings:components_strings_grit", + "//ios/chrome/app/theme:theme_grit", + "//ios/chrome/browser/snapshots", + "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/tab_switcher", "//ios/clean/chrome/browser/ui/commands", + "//ui/base", ] configs += [ "//build/config/compiler:enable_arc" ] } @@ -37,6 +45,7 @@ source_set("tab_collection_ui") { source_set("unit_tests") { sources = [ "tab_collection_mediator_unittest.mm", + "tab_collection_tab_cell_unittest.mm", "tab_collection_view_controller_unittest.mm", ] deps = [ @@ -44,12 +53,16 @@ source_set("unit_tests") { ":tab_collection_ui", "//base", "//base/test:test_support", + "//ios/chrome/browser/snapshots", + "//ios/chrome/browser/ui/tab_switcher", + "//ios/chrome/browser/web", "//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list:test_support", "//ios/chrome/test/base", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", + "//ui/base:test_support", "//url:url", ] configs += [ "//build/config/compiler:enable_arc" ] diff --git a/chromium/ios/clean/chrome/browser/ui/tab_grid/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/tab_grid/BUILD.gn index 4f11f72f139..6dce052de4b 100644 --- a/chromium/ios/clean/chrome/browser/ui/tab_grid/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/tab_grid/BUILD.gn @@ -16,9 +16,11 @@ source_set("tab_grid") { ":tab_grid_ui", "//base", "//ios/chrome/browser/browser_state", + "//ios/chrome/browser/snapshots", "//ios/chrome/browser/web_state_list", "//ios/clean/chrome/browser", "//ios/clean/chrome/browser/ui/commands", + "//ios/clean/chrome/browser/ui/context_menu", "//ios/clean/chrome/browser/ui/settings", "//ios/clean/chrome/browser/ui/tab", "//ios/clean/chrome/browser/ui/tab_collection", @@ -60,9 +62,9 @@ source_set("tab_grid_ui") { "//ios/chrome/browser/ui/colors", "//ios/chrome/browser/ui/tab_switcher", "//ios/clean/chrome/browser/ui/actions", - "//ios/clean/chrome/browser/ui/animators", "//ios/clean/chrome/browser/ui/commands", "//ios/clean/chrome/browser/ui/tab_collection:tab_collection_ui", + "//ios/clean/chrome/browser/ui/transitions/animators", "//ios/third_party/material_components_ios:material_components_ios", "//ui/base", ] @@ -82,10 +84,11 @@ source_set("unit_tests") { ":tab_grid_ui", "//base", "//base/test:test_support", + "//ios/chrome/browser/web", "//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list:test_support", "//ios/chrome/test/base", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", ] diff --git a/chromium/ios/clean/chrome/browser/ui/toolbar/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/toolbar/BUILD.gn index 029838e9642..0addb86f2c2 100644 --- a/chromium/ios/clean/chrome/browser/ui/toolbar/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/toolbar/BUILD.gn @@ -15,9 +15,12 @@ source_set("toolbar") { deps = [ ":toolbar_ui", "//base", + "//ios/chrome/browser", + "//ios/chrome/browser/web_state_list", "//ios/clean/chrome/browser/ui/commands", "//ios/clean/chrome/browser/ui/omnibox", "//ios/clean/chrome/browser/ui/tools", + "//ios/shared/chrome/browser/ui/broadcaster", "//ios/shared/chrome/browser/ui/browser_list", "//ios/shared/chrome/browser/ui/commands", "//ios/shared/chrome/browser/ui/coordinators", @@ -35,10 +38,10 @@ source_set("toolbar_ui") { deps = [ ":toolbar_components_ui", "//base", - "//ios/clean/chrome/browser/ui/actions", - "//ios/clean/chrome/browser/ui/animators", + "//ios/chrome/browser/ui", "//ios/clean/chrome/browser/ui/commands", "//ios/clean/chrome/browser/ui/tools", + "//ios/clean/chrome/browser/ui/transitions/animators", "//ios/third_party/material_components_ios", ] libs = [ "UIKit.framework" ] @@ -57,8 +60,11 @@ source_set("toolbar_components_ui") { ] deps = [ "//base", + "//components/strings", + "//ios/chrome/app/strings", "//ios/chrome/app/theme", "//ios/chrome/browser/ui", + "//ui/base", ] libs = [ "UIKit.framework" ] configs += [ "//build/config/compiler:enable_arc" ] @@ -75,9 +81,11 @@ source_set("unit_tests") { ":toolbar_ui", "//base", "//base/test:test_support", + "//ios/chrome/browser/web_state_list", + "//ios/chrome/browser/web_state_list:test_support", "//ios/shared/chrome/browser/ui/toolbar:test_support", "//ios/web", - "//ios/web:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", ] diff --git a/chromium/ios/clean/chrome/browser/ui/tools/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/tools/BUILD.gn index 7ffdbb6fe8a..07e10439e0b 100644 --- a/chromium/ios/clean/chrome/browser/ui/tools/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/tools/BUILD.gn @@ -9,8 +9,6 @@ source_set("tools") { "tools_mediator.h", "tools_mediator.mm", "tools_mediator_private.h", - "tools_menu_model.h", - "tools_menu_model.mm", ] configs += [ "//build/config/compiler:enable_arc" ] @@ -18,15 +16,12 @@ source_set("tools") { deps = [ ":tools_ui", "//base", - "//components/strings", - "//ios/chrome/app/strings", - "//ios/chrome/browser/ui/tools_menu", - "//ios/clean/chrome/browser/ui/animators", "//ios/clean/chrome/browser/ui/commands", - "//ios/clean/chrome/browser/ui/presenters", + "//ios/clean/chrome/browser/ui/transitions", "//ios/shared/chrome/browser/ui/browser_list", "//ios/shared/chrome/browser/ui/coordinators", "//ios/shared/chrome/browser/ui/tools_menu", + "//ios/web", "//ui/base", ] } @@ -37,10 +32,11 @@ source_set("tools_ui") { "menu_overflow_controls_stackview.mm", "menu_view_controller.h", "menu_view_controller.mm", - "tools_actions.h", "tools_consumer.h", "tools_menu_item.h", "tools_menu_item.mm", + "tools_menu_model.h", + "tools_menu_model.mm", ] configs += [ "//build/config/compiler:enable_arc" ] @@ -48,10 +44,14 @@ source_set("tools_ui") { deps = [ "//base", "//base:i18n", + "//components/strings", + "//ios/chrome/app/strings", "//ios/chrome/app/theme", "//ios/chrome/browser/ui", + "//ios/chrome/browser/ui/tools_menu", "//ios/clean/chrome/browser/ui/commands", "//ios/clean/chrome/browser/ui/toolbar:toolbar_components_ui", + "//ios/clean/chrome/browser/ui/transitions", "//ios/third_party/material_components_ios", ] } @@ -69,9 +69,13 @@ source_set("unit_tests") { deps = [ ":tools", ":tools_ui", + "//base", "//base/test:test_support", "//ios/chrome/test/base", + "//ios/shared/chrome/browser/ui/toolbar:test_support", "//ios/shared/chrome/browser/ui/tools_menu", + "//ios/web", + "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", ] diff --git a/chromium/ios/clean/chrome/browser/ui/transitions/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/transitions/BUILD.gn new file mode 100644 index 00000000000..7bcdbc22410 --- /dev/null +++ b/chromium/ios/clean/chrome/browser/ui/transitions/BUILD.gn @@ -0,0 +1,39 @@ +# Copyright 2017 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. + +source_set("transitions") { + sources = [ + "containment_transition_context.h", + "containment_transition_context.mm", + "containment_transitioning_delegate.h", + "zoom_transition_controller.h", + "zoom_transition_controller.mm", + "zooming_menu_transition_controller.h", + "zooming_menu_transition_controller.mm", + ] + + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + "//base", + "//ios/chrome/browser", + "//ios/clean/chrome/browser/ui/transitions/animators", + "//ios/clean/chrome/browser/ui/transitions/presenters", + ] +} + +source_set("unit_tests") { + testonly = true + + sources = [ + "containment_transition_context_unittest.mm", + ] + + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + ":transitions", + "//testing/gtest", + ] +} diff --git a/chromium/ios/clean/chrome/browser/ui/transitions/animators/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/transitions/animators/BUILD.gn new file mode 100644 index 00000000000..c4fba637d7e --- /dev/null +++ b/chromium/ios/clean/chrome/browser/ui/transitions/animators/BUILD.gn @@ -0,0 +1,37 @@ +# 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. + +source_set("animators") { + sources = [ + "swap_from_above_animator.h", + "swap_from_above_animator.mm", + "zoom_transition_animator.h", + "zoom_transition_animator.mm", + "zoom_transition_delegate.h", + ] + + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + "//base", + ] +} + +source_set("unit_tests") { + testonly = true + + sources = [ + "swap_from_above_animator_unittest.mm", + "test_transition_context.h", + "test_transition_context.mm", + ] + + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + ":animators", + "//base/test:test_support", + "//testing/gtest", + ] +} diff --git a/chromium/ios/clean/chrome/browser/ui/presenters/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/transitions/presenters/BUILD.gn index 3a89a3397b8..3a89a3397b8 100644 --- a/chromium/ios/clean/chrome/browser/ui/presenters/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/transitions/presenters/BUILD.gn diff --git a/chromium/ios/clean/chrome/browser/ui/web_contents/BUILD.gn b/chromium/ios/clean/chrome/browser/ui/web_contents/BUILD.gn index ea952636dd6..7cc6f98200d 100644 --- a/chromium/ios/clean/chrome/browser/ui/web_contents/BUILD.gn +++ b/chromium/ios/clean/chrome/browser/ui/web_contents/BUILD.gn @@ -15,9 +15,10 @@ source_set("web_contents") { deps = [ ":web_contents_ui", "//ios/chrome/browser", - "//ios/chrome/browser/web_state_list", + "//ios/clean/chrome/browser/ui/commands", "//ios/clean/chrome/browser/ui/context_menu", "//ios/shared/chrome/browser/ui/browser_list", + "//ios/shared/chrome/browser/ui/commands", "//ios/shared/chrome/browser/ui/coordinators", "//ios/web", "//ui/base", @@ -48,10 +49,9 @@ source_set("unit_tests") { ":web_contents_ui", "//base", "//base/test:test_support", - "//ios/chrome/browser/web_state_list", - "//ios/chrome/browser/web_state_list:test_support", "//ios/chrome/test/base", - "//ios/web:test_support", + "//ios/shared/chrome/browser/ui/tab:test_support", + "//ios/web/public/test/fakes", "//testing/gtest", ] } diff --git a/chromium/ios/clean/chrome/test/BUILD.gn b/chromium/ios/clean/chrome/test/BUILD.gn index b68f0acae58..d48ff38e0e7 100644 --- a/chromium/ios/clean/chrome/test/BUILD.gn +++ b/chromium/ios/clean/chrome/test/BUILD.gn @@ -9,6 +9,7 @@ group("all_tests") { testonly = true deps = [ ":ios_clean_chrome_unittests", + "//ios/clean/chrome/test/perf:ios_clean_skeleton_perf_egtests", ] } @@ -27,11 +28,14 @@ test("ios_clean_chrome_unittests") { "//ios/clean/chrome/browser/ui/omnibox:unit_tests", "//ios/clean/chrome/browser/ui/recent_tabs:unit_tests", "//ios/clean/chrome/browser/ui/root:unit_tests", + "//ios/clean/chrome/browser/ui/settings:unit_tests", "//ios/clean/chrome/browser/ui/tab:unit_tests", "//ios/clean/chrome/browser/ui/tab_collection:unit_tests", "//ios/clean/chrome/browser/ui/tab_grid:unit_tests", "//ios/clean/chrome/browser/ui/toolbar:unit_tests", "//ios/clean/chrome/browser/ui/tools:unit_tests", + "//ios/clean/chrome/browser/ui/transitions:unit_tests", + "//ios/clean/chrome/browser/ui/transitions/animators:unit_tests", "//ios/clean/chrome/browser/ui/web_contents:unit_tests", ] } diff --git a/chromium/ios/clean/chrome/test/perf/BUILD.gn b/chromium/ios/clean/chrome/test/perf/BUILD.gn new file mode 100644 index 00000000000..d984a55a397 --- /dev/null +++ b/chromium/ios/clean/chrome/test/perf/BUILD.gn @@ -0,0 +1,83 @@ +# Copyright 2017 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") +import("//build/config/mac/base_rules.gni") +import("//build/mac/tweak_info_plist.gni") +import("//ios/build/chrome_build.gni") +import("//ios/third_party/earl_grey/ios_eg_test.gni") + +tweak_info_plist("info_plist") { + info_plists = [ + "//ios/chrome/app/resources/Info.plist", + "//ios/chrome/app/resources/EarlGreyAddition+Info.plist", + ] + if (ios_chrome_info_plist_additions != []) { + info_plists += ios_chrome_info_plist_additions + } + if (ios_encryption_export_compliance_code != "") { + info_plists += + [ "//ios/chrome/app/resources/EncryptionExportCompliance+Info.plist" ] + } + args = [ + "--breakpad=$breakpad_enabled_as_int", + "--branding=$chromium_short_name", + ] +} + +compile_plist("entitlements") { + format = "xml1" + plist_templates = [ "resources/Chrome.entitlements" ] + if (ios_chrome_entitlements_additions != []) { + # TODO(crbug.com/707206): Allow additional entitlements once the CSChromium + # mobile provisioning profiles have been updated. + # plist_templates += ios_chrome_entitlements_additions + } + substitutions = [ "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix" ] + output_name = "$target_gen_dir/$chromium_short_name.entitlements" +} + +ios_eg_test("ios_clean_skeleton_perf_egtests") { + entitlements_target = ":entitlements" + info_plist_target = ":info_plist" + + sources = [ + "startup_egtests.mm", + ] + + deps = [ + "//ios/clean/chrome/app:main", + "//ios/testing/perf:startup", + ] + + bundle_deps = [ "//ios/chrome/app/resources" ] + + configs += [ "//build/config/compiler:enable_arc" ] + + _eg_main_application_delegate = "MainApplicationDelegate" + + extra_substitutions = [ + "CHROMIUM_HANDOFF_ID=$chromium_handoff_id", + "CHROMIUM_SHORT_NAME=$target_name", + "CHROMIUM_URL_SCHEME_1=$url_unsecure_scheme", + "CHROMIUM_URL_SCHEME_2=$url_secure_scheme", + "CHROMIUM_URL_SCHEME_3=$url_x_callback_scheme", + "CHROMIUM_URL_SCHEME_4=$url_channel_scheme", + "EG_MAIN_APPLICATION_DELEGATE=$_eg_main_application_delegate", + "SSOAUTH_URL_SCHEME=$url_ssoauth_scheme", + ] + + if (ios_automatically_manage_certs) { + # Use the same bundle identifier for EarlGrey tests as for unit tests + # when managing certificates as the number of free certs is limited. + extra_substitutions += + [ "CHROMIUM_BUNDLE_ID=gtest.${ios_generic_test_bundle_id_suffix}" ] + } else { + extra_substitutions += [ "CHROMIUM_BUNDLE_ID=gtest.$target_name" ] + } + + if (ios_encryption_export_compliance_code != "") { + extra_substitutions += [ "ENCRYPTION_EXPORT_COMPLIANCE_CODE=$ios_encryption_export_compliance_code" ] + } +} diff --git a/chromium/ios/components/BUILD.gn b/chromium/ios/components/BUILD.gn new file mode 100644 index 00000000000..03fb2b97984 --- /dev/null +++ b/chromium/ios/components/BUILD.gn @@ -0,0 +1,33 @@ +# Copyright 2017 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("//ios/build/config.gni") +import("//testing/test.gni") + +# All tests needs to be listed in that target to be built as part of +# "gn_all" target (i.e. by the bots). +group("all_tests") { + testonly = true + deps = [ + ":ios_components_unittests", + ] +} + +# To add a unit test to this target, make a "unit_tests" source_set in your +# component (it's important to use a source_set instead of a static library or +# no tests will run) and add a reference here. You can add more than one unit +# test target if convenient. +test("ios_components_unittests") { + # Add only ":unit_tests" dependencies here. If your tests have dependencies + # (this would at least include the component itself), they should be on the + # test source set and not here. + + deps = [ + "//base", + "//base/test:run_all_unittests", + "//ios/components/io_thread:unit_tests", + ] + + assert_no_deps = ios_assert_no_deps +} diff --git a/chromium/ios/components/captive_portal/BUILD.gn b/chromium/ios/components/captive_portal/BUILD.gn new file mode 100644 index 00000000000..a920cfa715d --- /dev/null +++ b/chromium/ios/components/captive_portal/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright 2017 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. + +component("captive_portal") { + deps = [ + "//base", + ] + + sources = [ + "features.cc", + "features.h", + ] +} diff --git a/chromium/ios/components/io_thread/BUILD.gn b/chromium/ios/components/io_thread/BUILD.gn new file mode 100644 index 00000000000..229a0234251 --- /dev/null +++ b/chromium/ios/components/io_thread/BUILD.gn @@ -0,0 +1,48 @@ +# Copyright 2017 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. + +component("io_thread") { + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + "//base", + "//components/net_log", + "//components/network_session_configurator/browser", + "//components/prefs", + "//components/proxy_config", + "//components/proxy_config/ios", + "//components/ssl_config", + "//components/variations", + "//components/version_info", + "//ios/web", + "//ios/web:user_agent", + "//net", + ] + + sources = [ + "ios_io_thread.h", + "ios_io_thread.mm", + ] +} + +source_set("unit_tests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "ios_io_thread_unittest.mm", + ] + deps = [ + ":io_thread", + "//base", + "//components/prefs", + "//components/prefs:test_support", + "//components/proxy_config", + "//components/ssl_config", + "//ios/web", + "//ios/web/public/test", + "//net", + "//net:test_support", + "//testing/gtest", + ] +} diff --git a/chromium/ios/crnet/BUILD.gn b/chromium/ios/crnet/BUILD.gn deleted file mode 100644 index 2030e8f0e32..00000000000 --- a/chromium/ios/crnet/BUILD.gn +++ /dev/null @@ -1,133 +0,0 @@ -# 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("//build/config/ios/rules.gni") -import("//build/config/mac/symbols.gni") -import("//build/mac/tweak_info_plist.gni") -import("//build/util/version.gni") -import("//testing/test.gni") -import("//url/features.gni") - -assert(!is_component_build, "CrNet requires static library build.") - -source_set("crnet_sources") { - deps = [ - "//base", - "//components/metrics", - "//components/metrics/proto", - "//components/prefs", - "//ios/net", - "//ios/web:user_agent", - "//net", - "//url", - "//url:url_features", - ] - - sources = [ - "CrNet.h", - "CrNet.mm", - "crnet_environment.h", - "crnet_environment.mm", - "sdch_owner_pref_storage.cc", - "sdch_owner_pref_storage.h", - ] - - if (!use_platform_icu_alternatives) { - deps += [ "//base:i18n" ] - } -} - -# Tweak |info_plist| with current version and revision. -tweak_info_plist("tweak_crnet_plist") { - info_plist = "Info.plist" -} - -bundle_data("crnet_framework_resources") { - # This bundle contains "Accept-Languages" header values for known locales. - # TODO(mef): These strings should be auto-generated from chrome's .xtb - # files, not hardcoded. - sources = [ - "Resources/Localization/am.lproj", - "Resources/Localization/ar.lproj", - "Resources/Localization/bg.lproj", - "Resources/Localization/bn.lproj", - "Resources/Localization/ca.lproj", - "Resources/Localization/cs.lproj", - "Resources/Localization/da.lproj", - "Resources/Localization/de.lproj", - "Resources/Localization/el.lproj", - "Resources/Localization/en-GB.lproj", - "Resources/Localization/en.lproj", - "Resources/Localization/es-419.lproj", - "Resources/Localization/es.lproj", - "Resources/Localization/fa.lproj", - "Resources/Localization/fi.lproj", - "Resources/Localization/fil.lproj", - "Resources/Localization/fr.lproj", - "Resources/Localization/gu.lproj", - "Resources/Localization/he.lproj", - "Resources/Localization/hi.lproj", - "Resources/Localization/hr.lproj", - "Resources/Localization/hu.lproj", - "Resources/Localization/id.lproj", - "Resources/Localization/it.lproj", - "Resources/Localization/ja.lproj", - "Resources/Localization/kn.lproj", - "Resources/Localization/ko.lproj", - "Resources/Localization/lt.lproj", - "Resources/Localization/lv.lproj", - "Resources/Localization/ml.lproj", - "Resources/Localization/mr.lproj", - "Resources/Localization/ms.lproj", - "Resources/Localization/nb.lproj", - "Resources/Localization/nl.lproj", - "Resources/Localization/pl.lproj", - "Resources/Localization/pt-BR.lproj", - "Resources/Localization/pt-PT.lproj", - "Resources/Localization/pt.lproj", - "Resources/Localization/ro.lproj", - "Resources/Localization/ru.lproj", - "Resources/Localization/sk.lproj", - "Resources/Localization/sl.lproj", - "Resources/Localization/sr.lproj", - "Resources/Localization/sv.lproj", - "Resources/Localization/sw.lproj", - "Resources/Localization/ta.lproj", - "Resources/Localization/te.lproj", - "Resources/Localization/th.lproj", - "Resources/Localization/tr.lproj", - "Resources/Localization/uk.lproj", - "Resources/Localization/vi.lproj", - "Resources/Localization/zh-Hans.lproj", - "Resources/Localization/zh-Hant.lproj", - "Resources/Localization/zh.lproj", - ] - outputs = [ - "{{bundle_resources_dir}}/crnet_resources.bundle/{{source_file_part}}", - ] -} - -ios_framework_bundle("crnet_framework") { - output_name = "CrNet" - info_plist_target = ":tweak_crnet_plist" - - deps = [ - ":crnet_framework_resources", - ":crnet_sources", - "//base", - "//net", - ] - - libs = [ "UIKit.Framework" ] - - public_headers = [ "CrNet.h" ] - - sources = [ - "CrNet.h", - ] - - configs -= [ "//build/config/compiler:default_symbols" ] - configs += [ "//build/config/compiler:symbols" ] -} diff --git a/chromium/ios/crnet/test/BUILD.gn b/chromium/ios/crnet/test/BUILD.gn deleted file mode 100644 index f96fe823e0e..00000000000 --- a/chromium/ios/crnet/test/BUILD.gn +++ /dev/null @@ -1,25 +0,0 @@ -# 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") -import("//testing/test.gni") - -test("crnet_test") { - testonly = true - sources = [ - "crnet_http_tests.mm", - "crnet_test_runner.mm", - ] - - deps = [ - "//base", - "//base:i18n", - "//ios/crnet:crnet_framework+link", - "//ios/third_party/gcdwebserver", - "//net:test_support", - "//third_party/icu", - ] - - bundle_deps = [ "//ios/crnet:crnet_framework+bundle" ] -} diff --git a/chromium/ios/net/BUILD.gn b/chromium/ios/net/BUILD.gn index 71322769db8..6c9ab8902cc 100644 --- a/chromium/ios/net/BUILD.gn +++ b/chromium/ios/net/BUILD.gn @@ -75,6 +75,7 @@ source_set("net") { } test("ios_net_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] deps = [ ":net", "//base", diff --git a/chromium/ios/public/provider/chrome/browser/BUILD.gn b/chromium/ios/public/provider/chrome/browser/BUILD.gn index d28965c507a..fb196d9e403 100644 --- a/chromium/ios/public/provider/chrome/browser/BUILD.gn +++ b/chromium/ios/public/provider/chrome/browser/BUILD.gn @@ -6,6 +6,7 @@ import("//build/buildflag_header.gni") import("//ios/public/provider/chrome/browser/build_config.gni") source_set("browser") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "chrome_browser_provider.h", "chrome_browser_provider.mm", @@ -20,6 +21,7 @@ source_set("browser") { } source_set("test_support") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "test_chrome_browser_provider.h", @@ -32,7 +34,6 @@ source_set("test_support") { "//base", "//ios/public/provider/chrome/browser/distribution:test_support", "//ios/public/provider/chrome/browser/images:test_support", - "//ios/public/provider/chrome/browser/native_app_launcher:test_support", "//ios/public/provider/chrome/browser/omaha:test_support", "//ios/public/provider/chrome/browser/signin:test_support", "//ios/public/provider/chrome/browser/spotlight:test_support", diff --git a/chromium/ios/public/provider/chrome/browser/native_app_launcher/BUILD.gn b/chromium/ios/public/provider/chrome/browser/native_app_launcher/BUILD.gn deleted file mode 100644 index b647bb388d1..00000000000 --- a/chromium/ios/public/provider/chrome/browser/native_app_launcher/BUILD.gn +++ /dev/null @@ -1,29 +0,0 @@ -# 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. - -source_set("native_app_launcher") { - sources = [ - "native_app_metadata.h", - "native_app_types.h", - "native_app_whitelist_manager.h", - ] - configs += [ "//build/config/compiler:enable_arc" ] -} - -source_set("test_support") { - testonly = true - sources = [ - "fake_native_app_metadata.h", - "fake_native_app_metadata.mm", - "fake_native_app_whitelist_manager.h", - "fake_native_app_whitelist_manager.mm", - ] - deps = [ - ":native_app_launcher", - "//base", - "//ios/public/provider/chrome/browser", - "//url", - ] - configs += [ "//build/config/compiler:enable_arc" ] -} diff --git a/chromium/ios/public/provider/chrome/browser/signin/BUILD.gn b/chromium/ios/public/provider/chrome/browser/signin/BUILD.gn index fd8141a2494..88200072400 100644 --- a/chromium/ios/public/provider/chrome/browser/signin/BUILD.gn +++ b/chromium/ios/public/provider/chrome/browser/signin/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. source_set("signin") { + configs += [ "//build/config/compiler:enable_arc" ] sources = [ "chrome_identity.h", "chrome_identity.mm", diff --git a/chromium/ios/shared/chrome/browser/ui/browser_list/BUILD.gn b/chromium/ios/shared/chrome/browser/ui/browser_list/BUILD.gn index 43231579e69..23f76b5a879 100644 --- a/chromium/ios/shared/chrome/browser/ui/browser_list/BUILD.gn +++ b/chromium/ios/shared/chrome/browser/ui/browser_list/BUILD.gn @@ -15,6 +15,7 @@ source_set("browser_list") { "browser_list_session_service_factory.mm", "browser_list_session_service_impl.h", "browser_list_session_service_impl.mm", + "browser_user_data.h", "browser_web_state_list_delegate.h", "browser_web_state_list_delegate.mm", ] @@ -28,7 +29,9 @@ source_set("browser_list") { "//ios/chrome/browser/sessions", "//ios/chrome/browser/sessions:serialisation", "//ios/chrome/browser/ssl", + "//ios/chrome/browser/web", "//ios/chrome/browser/web_state_list", + "//ios/shared/chrome/browser/ui/broadcaster", "//ios/shared/chrome/browser/ui/commands", "//ios/web", ] diff --git a/chromium/ios/shared/chrome/browser/ui/coordinators/BUILD.gn b/chromium/ios/shared/chrome/browser/ui/coordinators/BUILD.gn index ef49fcc99e0..01805bb812b 100644 --- a/chromium/ios/shared/chrome/browser/ui/coordinators/BUILD.gn +++ b/chromium/ios/shared/chrome/browser/ui/coordinators/BUILD.gn @@ -21,10 +21,11 @@ source_set("coordinators") { ] } -source_set("unit_tests") { +source_set("test_support") { testonly = true sources = [ - "browser_coordinator_unittest.mm", + "browser_coordinator_test.h", + "browser_coordinator_test.mm", ] configs += [ "//build/config/compiler:enable_arc" ] @@ -32,10 +33,22 @@ source_set("unit_tests") { deps = [ ":coordinators", "//base", - "//base/test:test_support", "//ios/chrome/browser/browser_state:test_support", - "//ios/chrome/test/base", "//ios/shared/chrome/browser/ui/browser_list", "//testing/gtest", ] } + +source_set("unit_tests") { + testonly = true + sources = [ + "browser_coordinator_unittest.mm", + ] + + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + ":coordinators", + ":test_support", + ] +} diff --git a/chromium/ios/shared/chrome/browser/ui/dialogs/BUILD.gn b/chromium/ios/shared/chrome/browser/ui/dialogs/BUILD.gn new file mode 100644 index 00000000000..a04eaea93fb --- /dev/null +++ b/chromium/ios/shared/chrome/browser/ui/dialogs/BUILD.gn @@ -0,0 +1,40 @@ +# 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. + +source_set("dialogs") { + deps = [ + "//base", + "//components/strings", + "//components/url_formatter", + "//ios/web", + "//ui/base", + ] + + sources = [ + "nsurl_protection_space_util.h", + "nsurl_protection_space_util.mm", + ] + + configs += [ "//build/config/compiler:enable_arc" ] +} + +source_set("unit_tests") { + testonly = true + + sources = [ + "nsurl_protection_space_util_unittest.mm", + ] + + deps = [ + ":dialogs", + "//base", + "//components/strings", + "//ios/web", + "//ios/web/public/test/fakes", + "//testing/gtest", + "//ui/base", + ] + + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/ios/shared/chrome/browser/ui/settings/BUILD.gn b/chromium/ios/shared/chrome/browser/ui/settings/BUILD.gn new file mode 100644 index 00000000000..ac535bc7e1c --- /dev/null +++ b/chromium/ios/shared/chrome/browser/ui/settings/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright 2017 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. + +source_set("settings") { + sources = [ + "settings_main_page_commands.h", + ] + + configs += [ "//build/config/compiler:enable_arc" ] + + deps = [ + # "//base", + # "//ios/chrome/app:tests_fake_hook", + # "//ios/chrome/browser", + # "//ios/chrome/browser/browser_state", + # "//ios/chrome/browser/tabs:tabs_internal", + # "//ios/shared/chrome/browser/ui/browser_list", + ] +} diff --git a/chromium/ios/shared/chrome/browser/ui/tab/BUILD.gn b/chromium/ios/shared/chrome/browser/ui/tab/BUILD.gn new file mode 100644 index 00000000000..857b808e826 --- /dev/null +++ b/chromium/ios/shared/chrome/browser/ui/tab/BUILD.gn @@ -0,0 +1,15 @@ +# Copyright 2017 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. + +source_set("test_support") { + testonly = true + sources = [ + "tab_test_util.h", + "tab_test_util.mm", + ] + deps = [ + "//ios/web/public/test/fakes", + ] + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/ios/shared/chrome/browser/ui/toolbar/BUILD.gn b/chromium/ios/shared/chrome/browser/ui/toolbar/BUILD.gn index d787bd37d9c..a4877b96a68 100644 --- a/chromium/ios/shared/chrome/browser/ui/toolbar/BUILD.gn +++ b/chromium/ios/shared/chrome/browser/ui/toolbar/BUILD.gn @@ -9,7 +9,7 @@ source_set("test_support") { "toolbar_test_util.mm", ] deps = [ - "//ios/web:test_support", + "//ios/web/public/test/fakes", ] configs += [ "//build/config/compiler:enable_arc" ] } diff --git a/chromium/ios/showcase/BUILD.gn b/chromium/ios/showcase/BUILD.gn index 7b349e7c27c..e5d5bfe82a8 100644 --- a/chromium/ios/showcase/BUILD.gn +++ b/chromium/ios/showcase/BUILD.gn @@ -33,7 +33,9 @@ group("features") { "//ios/showcase/settings", "//ios/showcase/tab", "//ios/showcase/tab_grid", + "//ios/showcase/text_badge_view", "//ios/showcase/toolbar", + "//ios/showcase/tools_menu", "//ios/showcase/uikit_table_view_cell", "//ios/showcase/widget", ] @@ -60,6 +62,8 @@ ios_eg_test("ios_showcase_egtests") { "//ios/showcase/root:eg_tests", "//ios/showcase/tab:eg_tests", "//ios/showcase/tab_grid:eg_tests", + "//ios/showcase/text_badge_view:eg_tests", + "//ios/showcase/toolbar:eg_tests", # All shared libraries must have the sanitizer deps to properly link in # asan mode (this target will be empty in other cases). diff --git a/chromium/ios/showcase/content_suggestions/BUILD.gn b/chromium/ios/showcase/content_suggestions/BUILD.gn index 39e4c63c04b..1ff89d07212 100644 --- a/chromium/ios/showcase/content_suggestions/BUILD.gn +++ b/chromium/ios/showcase/content_suggestions/BUILD.gn @@ -6,11 +6,24 @@ source_set("content_suggestions") { sources = [ "sc_content_suggestions_coordinator.h", "sc_content_suggestions_coordinator.mm", + "sc_content_suggestions_data_source.h", + "sc_content_suggestions_data_source.mm", + "sc_content_suggestions_item.h", + "sc_content_suggestions_item.mm", + "sc_content_suggestions_most_visited_item.h", + "sc_content_suggestions_most_visited_item.mm", ] deps = [ "//base", + "//components/strings", + "//ios/chrome/app/strings", + "//ios/chrome/browser/ui/collection_view/cells", "//ios/chrome/browser/ui/content_suggestions", + "//ios/chrome/browser/ui/content_suggestions/cells:cells_ui", + "//ios/chrome/browser/ui/content_suggestions/identifier", + "//ios/chrome/browser/ui/favicon:favicon_ui", "//ios/showcase/common", + "//ui/base", ] libs = [ "UIKit.framework" ] configs += [ "//build/config/compiler:enable_arc" ] @@ -22,8 +35,13 @@ source_set("eg_tests") { "sc_content_suggestions_egtest.mm", ] deps = [ + ":content_suggestions", + "//components/strings", + "//ios/chrome/app/strings", + "//ios/chrome/test/earl_grey:test_support", "//ios/showcase/test", "//ios/third_party/earl_grey", + "//ui/base", ] configs += [ "//build/config/compiler:enable_arc" ] } diff --git a/chromium/ios/showcase/core/BUILD.gn b/chromium/ios/showcase/core/BUILD.gn index cb5c9ca56c8..cf46103b8c8 100644 --- a/chromium/ios/showcase/core/BUILD.gn +++ b/chromium/ios/showcase/core/BUILD.gn @@ -13,7 +13,7 @@ source_set("core") { ] deps = [ "//base", - "//ios/chrome/app/startup:startup_basic", + "//base:i18n", "//ios/showcase/common", "//ios/third_party/material_components_ios", "//ios/third_party/material_roboto_font_loader_ios", diff --git a/chromium/ios/showcase/payments/BUILD.gn b/chromium/ios/showcase/payments/BUILD.gn index dd19e96daad..3b3bc8b6b65 100644 --- a/chromium/ios/showcase/payments/BUILD.gn +++ b/chromium/ios/showcase/payments/BUILD.gn @@ -36,6 +36,7 @@ source_set("eg_tests") { deps = [ "//base", "//components/strings", + "//ios/chrome/app/strings:ios_strings_grit", "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/autofill:autofill_ui", "//ios/chrome/browser/ui/payments:payments_ui", diff --git a/chromium/ios/showcase/test/BUILD.gn b/chromium/ios/showcase/test/BUILD.gn index 0561a4f365a..365e3038f03 100644 --- a/chromium/ios/showcase/test/BUILD.gn +++ b/chromium/ios/showcase/test/BUILD.gn @@ -12,6 +12,7 @@ source_set("test") { ] deps = [ "//base", + "//ios/showcase/core", "//ios/testing/earl_grey:earl_grey_support", "//ios/third_party/earl_grey", "//testing/gtest", diff --git a/chromium/ios/showcase/text_badge_view/BUILD.gn b/chromium/ios/showcase/text_badge_view/BUILD.gn new file mode 100644 index 00000000000..ab9a4f032cd --- /dev/null +++ b/chromium/ios/showcase/text_badge_view/BUILD.gn @@ -0,0 +1,26 @@ +source_set("text_badge_view") { + sources = [ + "sc_text_badge_view_controller.h", + "sc_text_badge_view_controller.mm", + ] + deps = [ + "//ios/chrome/browser/ui/reading_list:reading_list_ui", + ] + libs = [ "UIKit.framework" ] + configs += [ "//build/config/compiler:enable_arc" ] +} + +source_set("eg_tests") { + testonly = true + sources = [ + "sc_text_badge_view_egtest.mm", + ] + deps = [ + "//ios/chrome/browser/ui/reading_list:reading_list_ui", + "//ios/chrome/test/earl_grey:test_support", + "//ios/showcase/test", + "//ios/third_party/earl_grey", + "//ui/base", + ] + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/ios/showcase/toolbar/BUILD.gn b/chromium/ios/showcase/toolbar/BUILD.gn index 223a3d11bca..c007f41cceb 100644 --- a/chromium/ios/showcase/toolbar/BUILD.gn +++ b/chromium/ios/showcase/toolbar/BUILD.gn @@ -15,3 +15,20 @@ source_set("toolbar") { libs = [ "UIKit.framework" ] configs += [ "//build/config/compiler:enable_arc" ] } + +source_set("eg_tests") { + testonly = true + sources = [ + "sc_toolbar_egtest.mm", + ] + deps = [ + "//components/strings", + "//ios/chrome/app/strings", + "//ios/chrome/browser/ui", + "//ios/chrome/test/earl_grey:test_support", + "//ios/showcase/test", + "//ios/third_party/earl_grey", + "//ui/base", + ] + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/ios/showcase/tools_menu/BUILD.gn b/chromium/ios/showcase/tools_menu/BUILD.gn new file mode 100644 index 00000000000..6ab53553781 --- /dev/null +++ b/chromium/ios/showcase/tools_menu/BUILD.gn @@ -0,0 +1,19 @@ +# Copyright 2017 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. + +source_set("tools_menu") { + sources = [ + "sc_tools_coordinator.h", + "sc_tools_coordinator.mm", + ] + deps = [ + "//base", + "//ios/clean/chrome/browser/ui/commands", + "//ios/clean/chrome/browser/ui/tools:tools_ui", + "//ios/showcase/common", + "//ui/base", + ] + libs = [ "UIKit.framework" ] + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/ios/showcase/widget/BUILD.gn b/chromium/ios/showcase/widget/BUILD.gn index aca547985be..8e2884d1a27 100644 --- a/chromium/ios/showcase/widget/BUILD.gn +++ b/chromium/ios/showcase/widget/BUILD.gn @@ -4,10 +4,13 @@ source_set("widget") { sources = [ + "sc_content_widget_coordinator.h", + "sc_content_widget_coordinator.mm", "sc_search_widget_coordinator.h", "sc_search_widget_coordinator.mm", ] deps = [ + "//ios/chrome/content_widget_extension:content_widget", "//ios/chrome/search_widget_extension:search_widget", "//ios/showcase/common", ] diff --git a/chromium/ios/test/BUILD.gn b/chromium/ios/test/BUILD.gn deleted file mode 100644 index f05c0ecb70f..00000000000 --- a/chromium/ios/test/BUILD.gn +++ /dev/null @@ -1,10 +0,0 @@ -# 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. - -# This empty target is there to help with upstreaming by removing a manual -# step from the process (updating the //ios:all target). It will be changed -# to a real target as part of upstreaming. -group("all_tests") { - testonly = true -} diff --git a/chromium/ios/testing/BUILD.gn b/chromium/ios/testing/BUILD.gn index e4b8ef873b5..ea121023ee7 100644 --- a/chromium/ios/testing/BUILD.gn +++ b/chromium/ios/testing/BUILD.gn @@ -46,6 +46,7 @@ source_set("ocmock_support") { } test("ocmock_support_unittest") { + configs += [ "//build/config/compiler:enable_arc" ] deps = [ ":ocmock_support", "//base/test:run_all_unittests", diff --git a/chromium/ios/testing/perf/BUILD.gn b/chromium/ios/testing/perf/BUILD.gn new file mode 100644 index 00000000000..13700deba9d --- /dev/null +++ b/chromium/ios/testing/perf/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright 2017 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. + +source_set("startup") { + sources = [ + "startupLoggers.h", + "startupLoggers.mm", + ] + deps = [ + "//base", + ] + configs += [ "//build/config/compiler:enable_arc" ] +} diff --git a/chromium/ios/third_party/earl_grey/BUILD.gn b/chromium/ios/third_party/earl_grey/BUILD.gn index 516531a25e2..bd211b6afad 100644 --- a/chromium/ios/third_party/earl_grey/BUILD.gn +++ b/chromium/ios/third_party/earl_grey/BUILD.gn @@ -24,6 +24,8 @@ ios_framework_bundle("earl_grey") { "src/EarlGrey/Action/GREYBaseAction.m", "src/EarlGrey/Action/GREYChangeStepperAction.h", "src/EarlGrey/Action/GREYChangeStepperAction.m", + "src/EarlGrey/Action/GREYMultiFingerSwipeAction.h", + "src/EarlGrey/Action/GREYMultiFingerSwipeAction.m", "src/EarlGrey/Action/GREYPathGestureUtils.h", "src/EarlGrey/Action/GREYPathGestureUtils.m", "src/EarlGrey/Action/GREYPickerAction.h", @@ -112,15 +114,12 @@ ios_framework_bundle("earl_grey") { "src/EarlGrey/Common/GREYError.m", "src/EarlGrey/Common/GREYErrorConstants.h", "src/EarlGrey/Common/GREYErrorConstants.m", - "src/EarlGrey/Common/GREYExposed.h", "src/EarlGrey/Common/GREYFailureFormatter.h", "src/EarlGrey/Common/GREYFailureFormatter.m", - "src/EarlGrey/Common/GREYFailureScreenshotter+Internal.h", "src/EarlGrey/Common/GREYFailureScreenshotter.h", "src/EarlGrey/Common/GREYFailureScreenshotter.m", "src/EarlGrey/Common/GREYLogger.h", "src/EarlGrey/Common/GREYLogger.m", - "src/EarlGrey/Common/GREYObjectFormatter+Internal.h", "src/EarlGrey/Common/GREYObjectFormatter.h", "src/EarlGrey/Common/GREYObjectFormatter.m", "src/EarlGrey/Common/GREYScreenshotUtil+Internal.h", @@ -134,7 +133,6 @@ ios_framework_bundle("earl_grey") { "src/EarlGrey/Common/GREYTestCaseInvocation.m", "src/EarlGrey/Common/GREYTestHelper.h", "src/EarlGrey/Common/GREYTestHelper.m", - "src/EarlGrey/Common/GREYVisibilityChecker+Internal.h", "src/EarlGrey/Common/GREYVisibilityChecker.h", "src/EarlGrey/Common/GREYVisibilityChecker.m", "src/EarlGrey/Common/GREYWeakObjectContainer.h", diff --git a/chromium/ios/third_party/material_components_ios/BUILD.gn b/chromium/ios/third_party/material_components_ios/BUILD.gn index 215f5cb9c30..410c0e5cb39 100644 --- a/chromium/ios/third_party/material_components_ios/BUILD.gn +++ b/chromium/ios/third_party/material_components_ios/BUILD.gn @@ -45,6 +45,9 @@ source_set("material_components_ios") { "src/components/ActivityIndicator/src/MaterialActivityIndicator.h", "src/components/AnimationTiming/src/CAMediaTimingFunction+MDCAnimationTiming.h", "src/components/AnimationTiming/src/CAMediaTimingFunction+MDCAnimationTiming.m", + "src/components/AnimationTiming/src/MaterialAnimationTiming.h", + "src/components/AnimationTiming/src/UIView+MDCTimingFunction.h", + "src/components/AnimationTiming/src/UIView+MDCTimingFunction.m", "src/components/AppBar/src/MDCAppBar.h", "src/components/AppBar/src/MDCAppBar.m", "src/components/AppBar/src/MDCAppBarContainerViewController.h", @@ -160,6 +163,8 @@ source_set("material_components_ios") { "src/components/Typography/src/MDCTypography.h", "src/components/Typography/src/MDCTypography.m", "src/components/Typography/src/MaterialTypography.h", + "src/components/Typography/src/private/UIFont+MaterialTypographyPrivate.h", + "src/components/Typography/src/private/UIFont+MaterialTypographyPrivate.m", "src/components/private/Application/src/MaterialApplication.h", "src/components/private/Application/src/UIApplication+AppExtensions.h", "src/components/private/Application/src/UIApplication+AppExtensions.m", @@ -189,7 +194,7 @@ source_set("material_components_ios") { "src/components/private/Overlay/src/MDCOverlayObserver.h", "src/components/private/Overlay/src/MDCOverlayObserver.m", "src/components/private/Overlay/src/MDCOverlayTransitioning.h", - "src/components/private/Overlay/src/MaterialOverlays.h", + "src/components/private/Overlay/src/MaterialOverlay.h", "src/components/private/Overlay/src/private/MDCOverlayAnimationObserver.h", "src/components/private/Overlay/src/private/MDCOverlayAnimationObserver.m", "src/components/private/Overlay/src/private/MDCOverlayObserverOverlay.h", diff --git a/chromium/ios/web/BUILD.gn b/chromium/ios/web/BUILD.gn index b5e1ad881d7..d84a0cebff4 100644 --- a/chromium/ios/web/BUILD.gn +++ b/chromium/ios/web/BUILD.gn @@ -4,6 +4,7 @@ import("//ios/build/config.gni") import("//ios/web/js_compile.gni") +import("//mojo/public/tools/bindings/mojom.gni") import("//testing/test.gni") import("//tools/grit/grit_rule.gni") @@ -17,6 +18,7 @@ group("all_tests") { source_set("web_arc") { public_deps = [ + ":service_names", "//net", ] @@ -33,7 +35,12 @@ source_set("web_arc") { "//ios/third_party/blink:html_tokenizer", "//mojo/public/cpp/system", "//mojo/public/js", + "//services/catalog/public/cpp", + "//services/service_manager", + "//services/service_manager/embedder", "//services/service_manager/public/cpp", + "//services/service_manager/runner/common", + "//services/service_manager/runner/host:lib", "//ui/base", "//ui/gfx", "//ui/gfx/geometry", @@ -57,6 +64,8 @@ source_set("web_arc") { "navigation/crw_session_controller+private_constructors.h", "navigation/crw_session_controller.h", "navigation/crw_session_controller.mm", + "navigation/legacy_navigation_manager_impl.h", + "navigation/legacy_navigation_manager_impl.mm", "navigation/navigation_item_impl.h", "navigation/navigation_item_impl.mm", "navigation/navigation_item_impl_list.h", @@ -76,6 +85,8 @@ source_set("web_arc") { "navigation/session_storage_builder.mm", "navigation/time_smoother.cc", "navigation/time_smoother.h", + "navigation/wk_based_navigation_manager_impl.h", + "navigation/wk_based_navigation_manager_impl.mm", "net/cert_host_pair.cc", "net/cert_host_pair.h", "net/cert_policy.cc", @@ -131,6 +142,7 @@ source_set("web_arc") { "public/referrer_util.h", "public/security_style.h", "public/serializable_user_data_manager.h", + "public/service_manager_connection.h", "public/ssl_status.cc", "public/ssl_status.h", "public/url_data_source_ios.h", @@ -182,9 +194,15 @@ source_set("web_arc") { "public/webui/web_ui_ios_controller_factory.h", "public/webui/web_ui_ios_message_handler.cc", "public/webui/web_ui_ios_message_handler.h", + "service_manager_connection_impl.cc", + "service_manager_connection_impl.h", + "service_manager_context.h", + "service_manager_context.mm", "url_scheme_util.mm", "url_util.cc", "web_kit_constants.cc", + "web_state/context_menu_constants.h", + "web_state/context_menu_constants.mm", "web_state/context_menu_params.mm", "web_state/context_menu_params_utils.h", "web_state/context_menu_params_utils.mm", @@ -219,11 +237,27 @@ source_set("web_arc") { "web_state/ui/crw_swipe_recognizer_provider.h", "web_state/ui/crw_touch_tracking_recognizer.h", "web_state/ui/crw_touch_tracking_recognizer.mm", + "web_state/ui/crw_web_view_content_view.mm", + "web_state/ui/crw_web_view_navigation_proxy.h", "web_state/ui/crw_web_view_proxy_impl.h", "web_state/ui/crw_web_view_proxy_impl.mm", "web_state/ui/crw_web_view_scroll_view_proxy.mm", "web_state/ui/crw_wk_navigation_states.h", "web_state/ui/crw_wk_navigation_states.mm", + "web_state/ui/crw_wk_script_message_router.h", + "web_state/ui/crw_wk_script_message_router.mm", + "web_state/ui/web_view_js_utils.h", + "web_state/ui/web_view_js_utils.mm", + "web_state/ui/wk_back_forward_list_item_holder.h", + "web_state/ui/wk_back_forward_list_item_holder.mm", + "web_state/ui/wk_web_view_configuration_provider.h", + "web_state/ui/wk_web_view_configuration_provider.mm", + "web_state/web_controller_observer_bridge.h", + "web_state/web_controller_observer_bridge.mm", + "web_state/web_view_internal_creation_util.h", + "web_state/web_view_internal_creation_util.mm", + "web_state/wk_web_view_security_util.h", + "web_state/wk_web_view_security_util.mm", "web_thread_impl.cc", "web_thread_impl.h", "web_view_creation_util.mm", @@ -233,8 +267,6 @@ source_set("web_arc") { "webui/crw_web_ui_page_builder.mm", "webui/mojo_facade.h", "webui/mojo_facade.mm", - "webui/mojo_js_constants.cc", - "webui/mojo_js_constants.h", "webui/shared_resources_data_source_ios.h", "webui/shared_resources_data_source_ios.mm", "webui/url_data_manager_ios.cc", @@ -259,6 +291,12 @@ source_set("web_arc") { configs += [ "//build/config/compiler:enable_arc" ] } +mojom("service_names") { + sources = [ + "public/service_names.mojom", + ] +} + source_set("web") { deps = [ ":core", @@ -290,17 +328,6 @@ source_set("web") { "web_state/ui/crw_web_controller.mm", "web_state/ui/crw_web_controller_container_view.h", "web_state/ui/crw_web_controller_container_view.mm", - "web_state/ui/crw_web_view_content_view.mm", - "web_state/ui/crw_wk_script_message_router.h", - "web_state/ui/crw_wk_script_message_router.mm", - "web_state/ui/web_view_js_utils.h", - "web_state/ui/web_view_js_utils.mm", - "web_state/ui/wk_back_forward_list_item_holder.h", - "web_state/ui/wk_back_forward_list_item_holder.mm", - "web_state/ui/wk_web_view_configuration_provider.h", - "web_state/ui/wk_web_view_configuration_provider.mm", - "web_state/web_controller_observer_bridge.h", - "web_state/web_controller_observer_bridge.mm", "web_state/web_state.mm", "web_state/web_state_delegate.mm", "web_state/web_state_delegate_bridge.mm", @@ -311,10 +338,6 @@ source_set("web") { "web_state/web_state_policy_decider.mm", "web_state/web_state_weak_ptr_factory.h", "web_state/web_state_weak_ptr_factory.mm", - "web_state/web_view_internal_creation_util.h", - "web_state/web_view_internal_creation_util.mm", - "web_state/wk_web_view_security_util.h", - "web_state/wk_web_view_security_util.mm", ] libs = [ @@ -358,16 +381,17 @@ source_set("reload_type") { } source_set("earl_grey_test_support") { + configs += [ "//build/config/compiler:enable_arc" ] testonly = true deps = [ - ":test_support", ":web", "//base", "//base/test:test_support", "//ios/testing:ios_test_support", "//ios/testing/earl_grey:earl_grey_support", "//ios/third_party/earl_grey", + "//ios/web/public/test", "//net", ] @@ -381,122 +405,16 @@ source_set("earl_grey_test_support") { ] } -source_set("test_support") { - testonly = true - - deps = [ - ":web", - "//base", - "//base/test:test_support", - "//ios/testing:ios_test_support", - "//ios/testing:ocmock_support", - "//ios/third_party/gcdwebserver", - "//ios/web/test:mojo_bindings", - "//net:test_support", - "//testing/gmock", - "//testing/gtest", - "//third_party/ocmock", - "//ui/base", - ] - - sources = [ - "public/test/fakes/crw_test_js_injection_receiver.h", - "public/test/fakes/crw_test_js_injection_receiver.mm", - "public/test/fakes/crw_test_web_state_observer.h", - "public/test/fakes/crw_test_web_state_observer.mm", - "public/test/fakes/test_browser_state.cc", - "public/test/fakes/test_browser_state.h", - "public/test/fakes/test_java_script_dialog_presenter.h", - "public/test/fakes/test_java_script_dialog_presenter.mm", - "public/test/fakes/test_native_content.h", - "public/test/fakes/test_native_content.mm", - "public/test/fakes/test_native_content_provider.h", - "public/test/fakes/test_native_content_provider.mm", - "public/test/fakes/test_navigation_manager.h", - "public/test/fakes/test_navigation_manager.mm", - "public/test/fakes/test_web_client.h", - "public/test/fakes/test_web_client.mm", - "public/test/fakes/test_web_state.h", - "public/test/fakes/test_web_state.mm", - "public/test/fakes/test_web_state_delegate.h", - "public/test/fakes/test_web_state_delegate.mm", - "public/test/fakes/test_web_state_observer.h", - "public/test/fakes/test_web_state_observer.mm", - "public/test/fakes/test_web_state_observer_util.h", - "public/test/fakes/test_web_state_observer_util.mm", - "public/test/fakes/test_web_view_content_view.h", - "public/test/fakes/test_web_view_content_view.mm", - "public/test/http_server.h", - "public/test/http_server.mm", - "public/test/http_server_util.h", - "public/test/http_server_util.mm", - "public/test/js_test_util.h", - "public/test/js_test_util.mm", - "public/test/native_controller_test_util.h", - "public/test/native_controller_test_util.mm", - "public/test/navigation_test_util.h", - "public/test/navigation_test_util.mm", - "public/test/response_providers/data_response_provider.h", - "public/test/response_providers/data_response_provider.mm", - "public/test/response_providers/delayed_response_provider.h", - "public/test/response_providers/delayed_response_provider.mm", - "public/test/response_providers/error_page_response_provider.h", - "public/test/response_providers/error_page_response_provider.mm", - "public/test/response_providers/file_based_response_provider.h", - "public/test/response_providers/file_based_response_provider.mm", - "public/test/response_providers/file_based_response_provider_impl.h", - "public/test/response_providers/file_based_response_provider_impl.mm", - "public/test/response_providers/html_response_provider.h", - "public/test/response_providers/html_response_provider.mm", - "public/test/response_providers/html_response_provider_impl.h", - "public/test/response_providers/html_response_provider_impl.mm", - "public/test/response_providers/http_auth_response_provider.h", - "public/test/response_providers/http_auth_response_provider.mm", - "public/test/response_providers/response_provider.h", - "public/test/response_providers/response_provider.mm", - "public/test/response_providers/string_response_provider.h", - "public/test/response_providers/string_response_provider.mm", - "public/test/scoped_testing_web_client.h", - "public/test/scoped_testing_web_client.mm", - "public/test/test_redirect_observer.h", - "public/test/test_redirect_observer.mm", - "public/test/test_web_thread.h", - "public/test/test_web_thread_bundle.h", - "public/test/url_test_util.h", - "public/test/web_js_test.h", - "public/test/web_test.h", - "public/test/web_test.mm", - "public/test/web_test_suite.h", - "public/test/web_test_with_web_state.h", - "public/test/web_test_with_web_state.mm", - "public/test/web_view_interaction_test_util.h", - "public/test/web_view_interaction_test_util.mm", - "test/crw_fake_web_controller_observer.h", - "test/crw_fake_web_controller_observer.mm", - "test/test_url_constants.cc", - "test/test_url_constants.h", - "test/test_web_thread.cc", - "test/test_web_thread_bundle.cc", - "test/url_test_util.mm", - "test/web_int_test.h", - "test/web_int_test.mm", - "test/web_test_suite.mm", - "test/web_test_with_web_controller.h", - "test/web_test_with_web_controller.mm", - "test/wk_web_view_crash_utils.h", - "test/wk_web_view_crash_utils.mm", - ] -} - source_set("run_all_unittests") { testonly = true sources = [ "test/run_all_unittests.cc", ] deps = [ - ":test_support", "//base", "//base/test:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//mojo/edk/system", ] } @@ -515,12 +433,33 @@ bundle_data("ios_web_unittests_bundle_data") { ] } -test("ios_web_unittests_arc") { +test("ios_web_unittests") { deps = [ - ":core", + # Ensure all required data are present in the bundle, and that the + # test runner is linked. ":ios_web_unittests_bundle_data", ":run_all_unittests", - ":test_support", + + # Add individual test source_set targets here. + ":ios_web_general_unittests", + ":ios_web_navigation_unittests", + ":ios_web_net_unittests", + ":ios_web_public_unittests", + ":ios_web_web_state_js_unittests", + ":ios_web_web_state_ui_unittests", + ":ios_web_web_state_unittests", + ":ios_web_webui_unittests", + ] + + assert_no_deps = ios_assert_no_deps + configs += [ "//build/config/compiler:enable_arc" ] +} + +source_set("ios_web_general_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + deps = [ + ":core", ":user_agent", ":web", "//base", @@ -530,7 +469,11 @@ test("ios_web_unittests_arc") { "//ios/net", "//ios/testing:ios_test_support", "//ios/testing:ocmock_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//ios/web/test:mojo_bindings", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", "//net:test_support", "//services/service_manager/public/cpp", "//testing/gmock", @@ -540,21 +483,22 @@ test("ios_web_unittests_arc") { ] sources = [ - "navigation/navigation_manager_util_unittest.mm", - "public/crw_session_certificate_policy_cache_storage_unittest.mm", - "web_state/session_certificate_policy_cache_impl_unittest.mm", - "web_state/session_certificate_policy_cache_storage_builder_unittest.mm", + "active_state_manager_impl_unittest.mm", + "browser_state_unittest.cc", + "history_state_util_unittest.mm", + "payments/payment_request_unittest.cc", + "service_manager_connection_impl_unittest.cc", + "test/web_test_unittest.mm", + "url_scheme_util_unittest.mm", + "url_util_unittest.cc", ] - - configs += [ "//build/config/compiler:enable_arc" ] } -test("ios_web_unittests") { +source_set("ios_web_navigation_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true deps = [ ":core", - ":ios_web_unittests_bundle_data", - ":run_all_unittests", - ":test_support", ":user_agent", ":web", "//base", @@ -564,7 +508,12 @@ test("ios_web_unittests") { "//ios/net", "//ios/testing:ios_test_support", "//ios/testing:ocmock_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", "//ios/web/test:mojo_bindings", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", + "//ios/web/test/fakes", "//net:test_support", "//services/service_manager/public/cpp", "//testing/gmock", @@ -573,14 +522,7 @@ test("ios_web_unittests") { "//ui/base:test_support", ] - public_deps = [ - ":ios_web_unittests_arc", - ] - sources = [ - "active_state_manager_impl_unittest.mm", - "browser_state_unittest.cc", - "history_state_util_unittest.mm", "navigation/crw_navigation_item_storage_unittest.mm", "navigation/crw_session_controller_unittest.mm", "navigation/crw_session_storage_unittest.mm", @@ -588,7 +530,40 @@ test("ios_web_unittests") { "navigation/navigation_item_storage_test_util.h", "navigation/navigation_item_storage_test_util.mm", "navigation/navigation_manager_impl_unittest.mm", + "navigation/navigation_manager_util_unittest.mm", "navigation/nscoder_util_unittest.mm", + "navigation/serializable_user_data_manager_impl_unittest.mm", + ] +} + +source_set("ios_web_net_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + deps = [ + ":core", + ":user_agent", + ":web", + "//base", + "//base/test:test_support", + "//components/payments/core", + "//components/url_formatter", + "//ios/net", + "//ios/testing:ios_test_support", + "//ios/testing:ocmock_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//ios/web/test:mojo_bindings", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", + "//net:test_support", + "//services/service_manager/public/cpp", + "//testing/gmock", + "//testing/gtest", + "//third_party/ocmock", + "//ui/base:test_support", + ] + + sources = [ "net/cert_host_pair_unittest.cc", "net/cert_policy_unittest.cc", "net/crw_cert_verification_controller_unittest.mm", @@ -596,28 +571,187 @@ test("ios_web_unittests") { "net/request_group_util_unittest.mm", "net/request_tracker_impl_unittest.mm", "net/web_http_protocol_handler_delegate_unittest.mm", - "payments/payment_request_unittest.cc", + ] +} + +source_set("test_support") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + sources = [ + "public/test/crw_mock_web_state_delegate.h", + "public/test/crw_mock_web_state_delegate.mm", + ] + deps = [ + "//ios/testing:ocmock_support", + "//ios/web", + ] +} + +source_set("ios_web_public_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + deps = [ + ":core", + ":test_support", + ":user_agent", + ":web", + "//base", + "//base/test:test_support", + "//components/payments/core", + "//components/url_formatter", + "//ios/net", + "//ios/testing:ios_test_support", + "//ios/testing:ocmock_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//ios/web/test:mojo_bindings", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", + "//net:test_support", + "//services/service_manager/public/cpp", + "//testing/gmock", + "//testing/gtest", + "//third_party/ocmock", + "//ui/base:test_support", + ] + + sources = [ + "public/crw_session_certificate_policy_cache_storage_unittest.mm", "public/origin_util_unittest.mm", "public/referrer_util_unittest.cc", "public/serializable_user_data_manager_unittest.mm", - "public/test/crw_mock_web_state_delegate.h", - "public/test/crw_mock_web_state_delegate.mm", "public/user_agent_unittest.mm", "public/web_state/page_viewport_state_unittest.mm", - "test/web_test_unittest.mm", - "url_scheme_util_unittest.mm", - "url_util_unittest.cc", + ] +} + +source_set("ios_web_web_state_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + deps = [ + ":core", + ":ios_web_web_state_unittests_arc", + ":test_support", + ":user_agent", + ":web", + "//base", + "//base/test:test_support", + "//components/payments/core", + "//components/url_formatter", + "//ios/net", + "//ios/testing:ios_test_support", + "//ios/testing:ocmock_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//ios/web/test:mojo_bindings", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", + "//net:test_support", + "//services/service_manager/public/cpp", + "//testing/gmock", + "//testing/gtest", + "//third_party/ocmock", + "//ui/base:test_support", + "//ui/gfx:test_support", + ] + + sources = [ "web_state/context_menu_params_utils_unittest.mm", "web_state/crw_pass_kit_downloader_unittest.mm", "web_state/error_translation_util_unittest.mm", + "web_state/navigation_context_impl_unittest.mm", + "web_state/page_display_state_unittest.mm", + "web_state/web_state_delegate_bridge_unittest.mm", + "web_state/web_state_impl_unittest.mm", + "web_state/web_state_observer_bridge_unittest.mm", + "web_state/web_state_unittest.mm", + "web_state/web_view_internal_creation_util_unittest.mm", + "web_state/wk_web_view_security_util_unittest.mm", + ] +} + +source_set("ios_web_web_state_unittests_arc") { + testonly = true + sources = [ + "web_state/session_certificate_policy_cache_impl_unittest.mm", + "web_state/session_certificate_policy_cache_storage_builder_unittest.mm", + ] + deps = [ + "//base", + "//ios/testing:ios_test_support", + "//ios/web", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//net:test_support", + ] + configs += [ "//build/config/compiler:enable_arc" ] +} + +source_set("ios_web_web_state_js_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + deps = [ + ":core", + ":user_agent", + ":web", + "//base", + "//base/test:test_support", + "//components/payments/core", + "//components/url_formatter", + "//ios/net", + "//ios/testing:ios_test_support", + "//ios/testing:ocmock_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//ios/web/test:mojo_bindings", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", + "//net:test_support", + "//services/service_manager/public/cpp", + "//testing/gmock", + "//testing/gtest", + "//third_party/ocmock", + "//ui/base:test_support", + ] + + sources = [ "web_state/js/common_js_unittest.mm", "web_state/js/context_menu_js_unittest.mm", "web_state/js/crw_js_injection_manager_unittest.mm", "web_state/js/crw_js_post_request_loader_unittest.mm", "web_state/js/crw_js_window_id_manager_unittest.mm", "web_state/js/page_script_util_unittest.mm", - "web_state/navigation_context_impl_unittest.mm", - "web_state/page_display_state_unittest.mm", + ] +} + +source_set("ios_web_web_state_ui_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + deps = [ + ":core", + ":user_agent", + ":web", + "//base", + "//base/test:test_support", + "//components/payments/core", + "//components/url_formatter", + "//ios/net", + "//ios/testing:ios_test_support", + "//ios/testing:ocmock_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//ios/web/test:mojo_bindings", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", + "//net:test_support", + "//services/service_manager/public/cpp", + "//testing/gmock", + "//testing/gtest", + "//third_party/ocmock", + "//ui/base:test_support", + ] + + sources = [ "web_state/ui/crw_web_controller_container_view_unittest.mm", "web_state/ui/crw_web_controller_observer_unittest.mm", "web_state/ui/crw_web_controller_unittest.mm", @@ -627,33 +761,60 @@ test("ios_web_unittests") { "web_state/ui/web_view_js_utils_unittest.mm", "web_state/ui/wk_back_forward_list_item_holder_unittest.mm", "web_state/ui/wk_web_view_configuration_provider_unittest.mm", - "web_state/web_state_delegate_bridge_unittest.mm", - "web_state/web_state_impl_unittest.mm", - "web_state/web_state_observer_bridge_unittest.mm", - "web_state/web_state_unittest.mm", - "web_state/web_view_internal_creation_util_unittest.mm", - "web_state/wk_web_view_security_util_unittest.mm", + ] +} + +source_set("ios_web_webui_unittests") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + deps = [ + ":core", + ":user_agent", + ":web", + "//base", + "//base/test:test_support", + "//components/payments/core", + "//components/url_formatter", + "//ios/net", + "//ios/testing:ios_test_support", + "//ios/testing:ocmock_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//ios/web/test:mojo_bindings", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", + "//net:test_support", + "//services/service_manager/public/cpp", + "//testing/gmock", + "//testing/gtest", + "//third_party/ocmock", + "//ui/base:test_support", + ] + + sources = [ "webui/crw_web_ui_manager_unittest.mm", "webui/crw_web_ui_page_builder_unittest.mm", "webui/mojo_facade_unittest.mm", "webui/url_fetcher_block_adapter_unittest.mm", ] - - assert_no_deps = ios_assert_no_deps - - allow_circular_includes_from = [ ":ios_web_unittests_arc" ] } test("ios_web_inttests") { + configs += [ "//build/config/compiler:enable_arc" ] deps = [ - ":test_support", ":web", "//base/test:test_support", "//ios/testing:http_server_bundle_data", "//ios/testing:ios_test_support", + "//ios/web:resources_grit", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//ios/web/public/test/http_server", "//ios/web/test:mojo_bindings", "//ios/web/test:packed_resources", "//ios/web/test:resources", + "//ios/web/test:test_constants", + "//ios/web/test:test_support", "//mojo/edk/system", "//net:test_support", "//services/service_manager/public/cpp", @@ -680,11 +841,10 @@ js_compile_bundle("web_ui_bundle") { closure_entry_point = "__crWeb.webUIBundle" sources = [ - "../third_party/requirejs/require.js", + "webui/resources/mojo_api.js", "webui/resources/web_ui_base.js", "webui/resources/web_ui_bind.js", "webui/resources/web_ui_bundle.js", - "webui/resources/web_ui_module_load_notifier.js", "webui/resources/web_ui_send.js", ] } @@ -702,14 +862,23 @@ js_compile_bundle("web_bundle") { "web_state/js/resources/form.js", "web_state/js/resources/legacy.js", "web_state/js/resources/message.js", - "web_state/js/resources/navigation.js", "web_state/js/resources/scroll_workaround.js", "web_state/js/resources/web_bundle.js", ] } +js_compile_bundle("nav_bundle") { + visibility = [ ":js_resources" ] + closure_entry_point = "__crWeb.navigation" + + sources = [ + "web_state/js/resources/navigation.js", + ] +} + js_compile_checked("js_resources") { public_deps = [ + ":nav_bundle", ":web_bundle", ":web_ui_bundle", ] @@ -723,6 +892,10 @@ js_compile_checked("js_resources") { grit("resources") { source = "ios_web_resources.grd" + + # The .grd contains references to generated files. + source_is_generated = true + outputs = [ "grit/ios_web_resources.h", "ios_web_resources.pak", @@ -732,6 +905,8 @@ grit("resources") { "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), ] deps = [ - "//mojo/public/js:bindings", + "//ios/web/public/app:browser_manifest", + "//ios/web/public/app:packaged_services_manifest", + "//mojo/public/js:new_bindings", ] } diff --git a/chromium/ios/web/app/BUILD.gn b/chromium/ios/web/app/BUILD.gn index 962b7b2ed7f..10b97059570 100644 --- a/chromium/ios/web/app/BUILD.gn +++ b/chromium/ios/web/app/BUILD.gn @@ -19,6 +19,8 @@ source_set("app") { "//base:i18n", "//crypto", "//ios/web", + "//ios/web/public/global_state", + "//mojo/edk/system", "//net", "//ui/base", "//ui/gfx", diff --git a/chromium/ios/web/public/app/BUILD.gn b/chromium/ios/web/public/app/BUILD.gn index 0d512ff2e0c..45fcc363a35 100644 --- a/chromium/ios/web/public/app/BUILD.gn +++ b/chromium/ios/web/public/app/BUILD.gn @@ -2,8 +2,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//services/service_manager/public/service_manifest.gni") + source_set("app") { sources = [ + "task_scheduler_init_params_callback.h", "web_main.h", "web_main_delegate.h", "web_main_parts.h", @@ -13,8 +16,28 @@ source_set("app") { deps = [ "//base", "//ios/web/app", + + # TODO(crbug.com/728161): remove this dependency as it is not needed but + # is there just to allow adding the target to allow_circular_includes_from + # in order to fix a circular include issue. + "//ios/web:web_arc", + ] + allow_circular_includes_from = [ + "//ios/web/app", + + # TODO(crbug.com/728161): remove this exception. + "//ios/web:web_arc", ] + configs += [ "//build/config/compiler:enable_arc" ] +} + +service_manifest("packaged_services_manifest") { + name = "web_packaged_services" + source = "mojo/web_packaged_services_manifest.json" +} - allow_circular_includes_from = [ "//ios/web/app" ] +service_manifest("browser_manifest") { + name = "web_browser" + source = "mojo/web_browser_manifest.json" } diff --git a/chromium/ios/clean/chrome/browser/ui/animators/BUILD.gn b/chromium/ios/web/public/global_state/BUILD.gn index 32c610ad3c6..a81c95150aa 100644 --- a/chromium/ios/clean/chrome/browser/ui/animators/BUILD.gn +++ b/chromium/ios/web/public/global_state/BUILD.gn @@ -1,17 +1,17 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. +# Copyright 2017 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. -source_set("animators") { - sources = [ - "zoom_transition_animator.h", - "zoom_transition_animator.mm", - "zoom_transition_delegate.h", - ] - +source_set("global_state") { configs += [ "//build/config/compiler:enable_arc" ] deps = [ "//base", + "//net", + ] + + sources = [ + "ios_global_state.h", + "ios_global_state.mm", ] } diff --git a/chromium/ios/web/public/service_names.mojom b/chromium/ios/web/public/service_names.mojom new file mode 100644 index 00000000000..c24e128fae8 --- /dev/null +++ b/chromium/ios/web/public/service_names.mojom @@ -0,0 +1,15 @@ +// Copyright 2017 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. + +module web.mojom; + +// The default service name the browser identifies as when connecting to +// the Service Manager. This must match the name in +// src/ios/web/public/app/mojo/web_browser_manifest.json. +const string kBrowserServiceName = "web_browser"; + +// The service name used to identify the browser process's singleton service +// instance which packages other browser-wide services. This must match the name +// in src/ios/web/public/app/mojo/web_packaged_services_manifest.json. +const string kPackagedServicesServiceName = "web_packaged_services"; diff --git a/chromium/ios/web/public/test/BUILD.gn b/chromium/ios/web/public/test/BUILD.gn new file mode 100644 index 00000000000..f6e802e426f --- /dev/null +++ b/chromium/ios/web/public/test/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright 2017 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. + +source_set("test") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + + deps = [ + "//base", + "//base/test:test_support", + "//ios/testing:ios_test_support", + "//ios/third_party/gcdwebserver", + "//ios/web:web", + "//ios/web:web_arc", + "//ios/web/public/test/fakes", + "//ios/web/public/test/http_server", + "//ios/web/test:test_support", + "//testing/gtest", + "//ui/base", + "//url", + ] + + allow_circular_includes_from = [ "//ios/web/test:test_support" ] + + sources = [ + "js_test_util.h", + "js_test_util.mm", + "native_controller_test_util.h", + "native_controller_test_util.mm", + "navigation_test_util.h", + "navigation_test_util.mm", + "scoped_testing_web_client.h", + "scoped_testing_web_client.mm", + "test_redirect_observer.h", + "test_redirect_observer.mm", + "test_web_thread.h", + "test_web_thread_bundle.h", + "url_test_util.h", + "web_js_test.h", + "web_test.h", + "web_test.mm", + "web_test_suite.h", + "web_test_with_web_state.h", + "web_test_with_web_state.mm", + "web_view_content_test_util.h", + "web_view_content_test_util.mm", + "web_view_interaction_test_util.h", + "web_view_interaction_test_util.mm", + ] +} diff --git a/chromium/ios/web/public/test/fakes/BUILD.gn b/chromium/ios/web/public/test/fakes/BUILD.gn new file mode 100644 index 00000000000..642b01c016e --- /dev/null +++ b/chromium/ios/web/public/test/fakes/BUILD.gn @@ -0,0 +1,47 @@ +# Copyright 2017 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. + +source_set("fakes") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + + deps = [ + "//base", + "//ios/web:web", + "//ios/web/test:test_constants", + "//mojo/common:common_custom_types", + "//net:test_support", + "//testing/gtest", + "//ui/base", + ] + + sources = [ + "crw_test_js_injection_receiver.h", + "crw_test_js_injection_receiver.mm", + "crw_test_web_state_observer.h", + "crw_test_web_state_observer.mm", + "test_browser_state.cc", + "test_browser_state.h", + "test_java_script_dialog_presenter.h", + "test_java_script_dialog_presenter.mm", + "test_native_content.h", + "test_native_content.mm", + "test_native_content_provider.h", + "test_native_content_provider.mm", + "test_navigation_manager.h", + "test_navigation_manager.mm", + "test_web_client.h", + "test_web_client.mm", + "test_web_state.h", + "test_web_state.mm", + "test_web_state_delegate.h", + "test_web_state_delegate.mm", + "test_web_state_observer.h", + "test_web_state_observer.mm", + "test_web_state_observer_util.h", + "test_web_state_observer_util.mm", + "test_web_view_content_view.h", + "test_web_view_content_view.mm", + ] +} diff --git a/chromium/ios/web/public/test/http_server/BUILD.gn b/chromium/ios/web/public/test/http_server/BUILD.gn new file mode 100644 index 00000000000..ad681fcca95 --- /dev/null +++ b/chromium/ios/web/public/test/http_server/BUILD.gn @@ -0,0 +1,42 @@ +# Copyright 2017 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. + +source_set("http_server") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + + deps = [ + "//base", + "//base/test:test_support", + "//ios/third_party/gcdwebserver", + "//net", + "//net:test_support", + "//url", + ] + + sources = [ + "blank_page_response_provider.h", + "blank_page_response_provider.mm", + "data_response_provider.h", + "data_response_provider.mm", + "delayed_response_provider.h", + "delayed_response_provider.mm", + "error_page_response_provider.h", + "error_page_response_provider.mm", + "html_response_provider.h", + "html_response_provider.mm", + "html_response_provider_impl.h", + "html_response_provider_impl.mm", + "http_auth_response_provider.h", + "http_auth_response_provider.mm", + "http_server.h", + "http_server.mm", + "http_server_util.h", + "http_server_util.mm", + "response_provider.h", + "response_provider.mm", + "string_response_provider.h", + "string_response_provider.mm", + ] +} diff --git a/chromium/ios/web/shell/BUILD.gn b/chromium/ios/web/shell/BUILD.gn index 8670e86b943..0b1a99cb817 100644 --- a/chromium/ios/web/shell/BUILD.gn +++ b/chromium/ios/web/shell/BUILD.gn @@ -4,6 +4,9 @@ import("//build/config/ios/rules.gni") import("//ios/build/config.gni") +import("//services/service_manager/public/service_manifest.gni") +import("//tools/grit/grit_rule.gni") +import("//tools/grit/repack.gni") ios_app_bundle("ios_web_shell") { info_plist = "Info.plist" @@ -34,6 +37,53 @@ bundle_data("shell_bundle_data") { ] } +service_manifest("shell_packaged_services_manifest_overlay") { + source = "web_shell_packaged_services_manifest_overlay.json" + packaged_services = [ "//services/test/echo:manifest" ] +} + +service_manifest("shell_browser_manifest_overlay") { + source = "web_shell_browser_manifest_overlay.json" + packaged_services = [ "//services/test/user_id:manifest" ] +} + +grit("resources") { + visibility = [ ":*" ] + source = "shell_resources.grd" + + # The .grd contains references to generated files. + source_is_generated = true + + grit_flags = [ + "-E", + "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), + ] + outputs = [ + "grit/shell_resources.h", + "shell_resources.pak", + ] + deps = [ + ":shell_browser_manifest_overlay", + ":shell_packaged_services_manifest_overlay", + ] +} + +repack("packed_resources") { + visibility = [ ":shell" ] + sources = [ + "$root_gen_dir/ios/web/ios_web_resources.pak", + "$root_gen_dir/ios/web/shell/shell_resources.pak", + ] + deps = [ + "//ios/web:resources", + ] + public_deps = [ + ":resources", + ] + output = "$target_gen_dir/web_shell_resources.pak" + copy_data_to_bundle = true +} + source_set("shell") { sources = [ "app_delegate.h", @@ -56,6 +106,7 @@ source_set("shell") { ] deps = [ + ":packed_resources", ":shell_bundle_data", "//base", "//ios/net", @@ -64,6 +115,10 @@ source_set("shell") { "//ios/web/public/app", "//net", "//net:extras", + "//services/test/echo:lib", + "//services/test/echo/public/interfaces", + "//services/test/user_id:lib", + "//services/test/user_id/public/interfaces", "//ui/base", ] diff --git a/chromium/ios/web/shell/test/BUILD.gn b/chromium/ios/web/shell/test/BUILD.gn index 7d7eedcde3e..3a82cd917b7 100644 --- a/chromium/ios/web/shell/test/BUILD.gn +++ b/chromium/ios/web/shell/test/BUILD.gn @@ -22,6 +22,7 @@ ios_eg_test("ios_web_shell_egtests") { "pdf_egtest.mm", "plugin_placeholder_egtest.mm", "redirect_egtest.mm", + "service_manager_egtest.mm", ] deps = [ @@ -30,10 +31,16 @@ ios_eg_test("ios_web_shell_egtests") { "//base/test:test_support", "//ios/testing:ios_test_support", "//ios/testing/earl_grey:earl_grey_support", + "//ios/web", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/fakes", + "//ios/web/public/test/http_server", "//ios/web/shell", "//net", + "//services/service_manager/public/cpp", + "//services/test/echo/public/interfaces", + "//services/test/user_id/public/interfaces", "//url", # All shared libraries must have the sanitizer deps to properly link in @@ -59,7 +66,8 @@ source_set("earl_grey_test_support") { "//ios/third_party/earl_grey", "//ios/web", "//ios/web:earl_grey_test_support", - "//ios/web:test_support", + "//ios/web/public/test", + "//ios/web/public/test/http_server", "//ios/web/shell", "//url", ] diff --git a/chromium/ios/web/test/BUILD.gn b/chromium/ios/web/test/BUILD.gn index 5ddfc4db6dc..584377f7da1 100644 --- a/chromium/ios/web/test/BUILD.gn +++ b/chromium/ios/web/test/BUILD.gn @@ -28,11 +28,15 @@ repack("packed_resources") { grit("resources") { source = "test_resources.grd" + + # The .grd contains references to generated files. + source_is_generated = true + inputs = [ "${root_gen_dir}/ios/web/test/mojo_test.mojom.js", ] deps = [ - ":mojo_bindings", + ":mojo_bindings_js", ] outputs = [ "grit/test_resources.h", @@ -43,3 +47,44 @@ grit("resources") { "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir), ] } + +source_set("test_support") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + + deps = [ + ":test_constants", + "//base", + "//base/test:test_support", + "//ios/web:web", + "//ios/web/public/test/fakes", + "//ios/web/public/test/http_server", + "//ios/web/test/fakes", + "//testing/gtest", + "//third_party/ocmock", + "//ui/base", + ] + + sources = [ + "crw_fake_web_controller_observer.h", + "crw_fake_web_controller_observer.mm", + "test_web_thread.cc", + "test_web_thread_bundle.cc", + "url_test_util.mm", + "web_int_test.h", + "web_int_test.mm", + "web_test_suite.mm", + "web_test_with_web_controller.h", + "web_test_with_web_controller.mm", + "wk_web_view_crash_utils.h", + "wk_web_view_crash_utils.mm", + ] +} + +source_set("test_constants") { + testonly = true + sources = [ + "test_url_constants.cc", + "test_url_constants.h", + ] +} diff --git a/chromium/ios/web/test/fakes/BUILD.gn b/chromium/ios/web/test/fakes/BUILD.gn new file mode 100644 index 00000000000..6f944bd0a71 --- /dev/null +++ b/chromium/ios/web/test/fakes/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright 2017 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. + +source_set("fakes") { + configs += [ "//build/config/compiler:enable_arc" ] + testonly = true + + deps = [ + "//ios/web:web", + "//third_party/ocmock:ocmock", + ] + + sources = [ + "crw_test_back_forward_list.h", + "crw_test_back_forward_list.mm", + "test_navigation_manager_delegate.h", + "test_navigation_manager_delegate.mm", + ] +} diff --git a/chromium/ios/web_view/BUILD.gn b/chromium/ios/web_view/BUILD.gn index 4f0d6493f50..ae7e4677cde 100644 --- a/chromium/ios/web_view/BUILD.gn +++ b/chromium/ios/web_view/BUILD.gn @@ -5,6 +5,8 @@ import("//build/config/ios/ios_sdk.gni") import("//build/config/ios/rules.gni") import("//components/grpc_support/include/headers.gni") +import("//ios/build/config.gni") +import("//testing/test.gni") import("//tools/grit/repack.gni") config("config") { @@ -23,14 +25,15 @@ ios_web_view_public_headers = [ "public/ChromeWebView.h", "public/cwv_export.h", "public/cwv_html_element.h", - "public/cwv_language_detection_result.h", "public/cwv_navigation_action.h", "public/cwv_navigation_delegate.h", + "public/cwv_preferences.h", "public/cwv_scroll_view.h", "public/cwv_scroll_view_delegate.h", "public/cwv_translation_controller.h", "public/cwv_translation_controller_delegate.h", "public/cwv_translation_language.h", + "public/cwv_translation_policy.h", "public/cwv_ui_delegate.h", "public/cwv_user_content_controller.h", "public/cwv_user_script.h", @@ -39,10 +42,16 @@ ios_web_view_public_headers = [ ] ios_web_view_sources = [ + "internal/app/application_context.cc", + "internal/app/application_context.h", + "internal/app/web_view_io_thread.h", + "internal/app/web_view_io_thread.mm", "internal/cwv_html_element.mm", "internal/cwv_html_element_internal.h", "internal/cwv_navigation_action.mm", "internal/cwv_navigation_action_internal.h", + "internal/cwv_preferences.mm", + "internal/cwv_preferences_internal.h", "internal/cwv_scroll_view.mm", "internal/cwv_scroll_view_internal.h", "internal/cwv_user_content_controller.mm", @@ -53,22 +62,25 @@ ios_web_view_sources = [ "internal/cwv_web_view_configuration_internal.h", "internal/pref_names.cc", "internal/pref_names.h", - "internal/translate/cwv_language_detection_result_internal.h", - "internal/translate/cwv_language_detection_result.mm", "internal/translate/cwv_translation_controller.mm", "internal/translate/cwv_translation_controller_internal.h", "internal/translate/cwv_translation_language_internal.h", "internal/translate/cwv_translation_language.mm", + "internal/translate/cwv_translation_policy.mm", "internal/translate/web_view_translate_accept_languages_factory.cc", "internal/translate/web_view_translate_accept_languages_factory.h", "internal/translate/web_view_translate_client.h", "internal/translate/web_view_translate_client.mm", "internal/translate/web_view_translate_ranker_factory.cc", "internal/translate/web_view_translate_ranker_factory.h", + "internal/translate/web_view_translate_service.cc", + "internal/translate/web_view_translate_service.h", "internal/web_view_browser_state.h", "internal/web_view_browser_state.mm", "internal/web_view_early_page_script_provider.h", "internal/web_view_early_page_script_provider.mm", + "internal/web_view_global_state_util.h", + "internal/web_view_global_state_util.mm", "internal/web_view_java_script_dialog_presenter.h", "internal/web_view_java_script_dialog_presenter.mm", "internal/web_view_network_delegate.cc", @@ -87,18 +99,23 @@ ios_web_view_sources = [ ios_web_view_sources += ios_web_view_public_headers ios_web_view_deps = [ - ":generate_license", ":packed_resources", "//base", + "//components/flags_ui", "//components/infobars/core", "//components/keyed_service/core", "//components/keyed_service/ios", + "//components/net_log", "//components/pref_registry", "//components/prefs", + "//components/proxy_config", + "//components/ssl_config", "//components/translate/core/browser", "//components/translate/core/common", "//components/translate/ios/browser", + "//components/web_resource", "//google_apis", + "//ios/components/io_thread", "//ios/net", "//ios/web", "//ios/web:reload_type", @@ -130,40 +147,13 @@ ios_framework_bundle("web_view") { ] } -# Same framework as ChromeWebView above, but also exposes CrNet. -ios_framework_bundle("crnet_web_view_combined") { - output_name = "CrNetChromeWebView" - info_plist = "Info.plist" - - public_headers = ios_web_view_public_headers - public_headers += [ "../crnet/CrNet.h" ] - - public = [ - "public/ChromeWebView.h", - ] - - sources = ios_web_view_sources - sources += [ "../crnet/CrNet.h" ] - - deps = ios_web_view_deps - deps += [ "//ios/crnet:crnet_sources" ] - - configs += [ - ":config", - "//build/config/compiler:enable_arc", - ] -} - -# Same framework as ChromeWebView above, but also exposes CroNet. +# Same framework as ChromeWebView above, but also exposes Cronet. ios_framework_bundle("cronet_web_view_combined") { - output_name = "CroNetChromeWebView" + output_name = "CronetChromeWebView" info_plist = "Info.plist" public_headers = ios_web_view_public_headers - public_headers += [ - "//components/cronet/ios/Cronet.h", - "//components/cronet/ios/cronet_c_for_grpc.h", - ] + public_headers += [ "//components/cronet/ios/Cronet.h" ] public_headers += grpc_public_headers public = [ @@ -188,6 +178,26 @@ ios_framework_bundle("cronet_web_view_combined") { ] } +test("ios_web_view_unittests") { + testonly = true + sources = [ + "internal/cwv_html_element_unittest.mm", + ] + sources += ios_web_view_sources + + deps = [ + "test:test_support", + "//base/test:run_all_unittests", + "//ios/testing:ios_test_support", + "//testing/gtest", + ] + deps += ios_web_view_deps + + configs += [ "//build/config/compiler:enable_arc" ] + + assert_no_deps = ios_assert_no_deps +} + repack("repack_resources") { visibility = [ ":packed_resources" ] deps = [ @@ -214,22 +224,81 @@ bundle_data("packed_resources") { ] } -action("generate_license") { - _license_path = "$target_out_dir/LICENSE" +if (additional_toolchains == [] || current_toolchain == default_toolchain) { + _package_dir = "$root_out_dir/cronet_ios_web_view" - script = "//tools/licenses.py" - inputs = [ - "//buildtools/$host_os/gn", - ] - outputs = [ - _license_path, - ] - args = [ - "license_file", - rebase_path(_license_path, root_build_dir), - "--gn-target", - "//ios/web_view", - "--gn-out-dir", - ".", - ] + action("cronet_ios_web_view_generate_license") { + _license_path = "$_package_dir/LICENSE" + + script = "//tools/licenses.py" + inputs = [ + "//buildtools/$host_os/gn", + ] + outputs = [ + _license_path, + ] + args = [ + "license_file", + rebase_path(_license_path, root_build_dir), + "--gn-target", + "//ios/web_view", + "--gn-out-dir", + ".", + ] + } + + copy("cronet_ios_web_view_package_copy") { + sources = [ + "$root_out_dir/CronetChromeWebView.framework", + "//AUTHORS", + "//chrome/VERSION", + ] + outputs = [ + "$_package_dir/{{source_file_part}}", + ] + + deps = [ + ":cronet_web_view_combined", + ] + } + + if (enable_dsyms) { + action("cronet_ios_web_view_dsym_archive") { + script = "//chrome/tools/build/mac/archive_symbols.py" + + # These are the dSYMs that will be archived. The sources list must be + # the target outputs that correspond to the dSYMs (since a dSYM is a + # directory it cannot be listed as a source file). The targets that + # generate both the dSYM and binary image are listed in deps. + _dsyms = [ "$root_out_dir/CronetChromeWebView.dSYM" ] + + sources = [ + "$root_out_dir/CronetChromeWebView.framework", + ] + + _output = "$_package_dir/CronetChromeWebView.dSYM.tar.bz2" + + outputs = [ + _output, + ] + + args = [ rebase_path(_output, root_out_dir) ] + + rebase_path(_dsyms, root_out_dir) + + deps = [ + ":cronet_web_view_combined", + ] + } + } else { + group("cronet_ios_web_view_dsym_archive") { + } + } + + group("cronet_ios_web_view_package") { + deps = [ + ":cronet_ios_web_view_dsym_archive", + ":cronet_ios_web_view_generate_license", + ":cronet_ios_web_view_package_copy", + ] + } } diff --git a/chromium/ios/web_view/shell/test/BUILD.gn b/chromium/ios/web_view/shell/test/BUILD.gn index 47fe6946528..79834082fc3 100644 --- a/chromium/ios/web_view/shell/test/BUILD.gn +++ b/chromium/ios/web_view/shell/test/BUILD.gn @@ -20,7 +20,11 @@ ios_eg_test("ios_web_view_shell_egtests") { deps = [ ":earl_grey_test_support", + "//ios/testing:http_server_bundle_data", "//ios/web_view:web_view+link", + "//ios/web_view/shell:shell", + "//ios/web_view/test:test_support", + "//net:test_support", # All shared libraries must have the sanitizer deps to properly link in # asan mode (this target will be empty in other cases). diff --git a/chromium/ios/web_view/test/BUILD.gn b/chromium/ios/web_view/test/BUILD.gn index b4dbe827509..6faebf36b9c 100644 --- a/chromium/ios/web_view/test/BUILD.gn +++ b/chromium/ios/web_view/test/BUILD.gn @@ -16,16 +16,14 @@ group("all_tests") { test("ios_web_view_inttests") { testonly = true sources = [ - "boolean_observer.h", - "boolean_observer.mm", - "chrome_web_view_kvo_inttest.mm", - "chrome_web_view_test.h", - "chrome_web_view_test.mm", - "web_view_interaction_test_util.h", - "web_view_interaction_test_util.mm", + "web_view_kvo_inttest.mm", + "web_view_restorable_state_inttest.mm", + "web_view_test.h", + "web_view_test.mm", ] deps = [ + ":test_support", "//base", "//base/test:run_all_unittests", "//ios/testing:ios_test_support", @@ -41,3 +39,24 @@ test("ios_web_view_inttests") { assert_no_deps = ios_assert_no_deps } + +source_set("test_support") { + testonly = true + sources = [ + # Explicitly reference imported headers from web_view library to avoid + # depending on the framework (as it is statically linked). + "//ios/web_view/public/cwv_web_view.h", + "//ios/web_view/public/cwv_web_view_configuration.h", + "observer.h", + "observer.mm", + "web_view_test_util.h", + "web_view_test_util.mm", + ] + + deps = [ + "//base:base", + "//ios/testing:ios_test_support", + ] + + configs += [ "//build/config/compiler:enable_arc" ] +} |