mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 22:36:09 +03:00
342 lines
10 KiB
Plaintext
342 lines
10 KiB
Plaintext
# Copyright 2015 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/public/provider/chrome/browser/build_config.gni")
|
|
|
|
source_set("app") {
|
|
configs += [ "//build/config/compiler:enable_arc" ]
|
|
sources = [
|
|
"deferred_initialization_runner.h",
|
|
"deferred_initialization_runner.mm",
|
|
]
|
|
|
|
deps = [
|
|
"//base",
|
|
]
|
|
|
|
libs = [ "Foundation.framework" ]
|
|
}
|
|
|
|
source_set("unit_tests") {
|
|
configs += [ "//build/config/compiler:enable_arc" ]
|
|
testonly = true
|
|
sources = [
|
|
"chrome_overlay_window_testing.h",
|
|
"deferred_initialization_runner_unittest.mm",
|
|
"main_application_delegate_unittest.mm",
|
|
"main_controller_unittest.mm",
|
|
]
|
|
deps = [
|
|
":app",
|
|
":app_internal",
|
|
"//base",
|
|
"//base/test:test_support",
|
|
"//ios/chrome/app/application_delegate:application_delegate_internal",
|
|
"//ios/chrome/browser",
|
|
"//ios/chrome/browser/tabs",
|
|
"//ios/chrome/common/app_group",
|
|
"//ios/chrome/test/base",
|
|
"//ios/public/provider/chrome/browser",
|
|
"//ios/public/provider/chrome/browser/distribution",
|
|
"//testing/gtest",
|
|
"//third_party/ocmock",
|
|
"//url",
|
|
]
|
|
}
|
|
|
|
source_set("tests_hook") {
|
|
# This target is intentionally not test-only, as the main app depends on it.
|
|
sources = [
|
|
"tests_hook.h",
|
|
]
|
|
}
|
|
|
|
source_set("tests_fake_hook") {
|
|
configs += [ "//build/config/compiler:enable_arc" ]
|
|
|
|
# This target is intentionally not test-only, as the main app depends on it.
|
|
sources = [
|
|
"tests_fake_hook.mm",
|
|
]
|
|
deps = [
|
|
":tests_hook",
|
|
]
|
|
}
|
|
|
|
tweak_info_plist("info_plist") {
|
|
info_plists = [
|
|
"resources/Info.plist",
|
|
"resources/ChromeAddition+Info.plist",
|
|
]
|
|
if (ios_chrome_info_plist_additions != []) {
|
|
info_plists += ios_chrome_info_plist_additions
|
|
}
|
|
if (ios_encryption_export_compliance_code != "") {
|
|
info_plists += [ "resources/EncryptionExportCompliance+Info.plist" ]
|
|
}
|
|
args = [
|
|
"--breakpad=$breakpad_enabled_as_int",
|
|
"--branding=$chromium_short_name",
|
|
]
|
|
}
|
|
|
|
compile_entitlements("entitlements") {
|
|
entitlements_templates = [ "resources/Chrome.entitlements" ]
|
|
if (ios_chrome_entitlements_additions != []) {
|
|
entitlements_templates += ios_chrome_entitlements_additions
|
|
}
|
|
substitutions = [ "IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix" ]
|
|
output_name = "$target_gen_dir/$chromium_short_name.entitlements"
|
|
}
|
|
|
|
source_set("app_internal") {
|
|
configs += [ "//build/config/compiler:enable_arc" ]
|
|
sources = [
|
|
"application_mode.h",
|
|
"chrome_overlay_window.h",
|
|
"chrome_overlay_window.mm",
|
|
"main_application_delegate.h",
|
|
"main_application_delegate.mm",
|
|
"main_application_delegate_testing.h",
|
|
"main_controller.h",
|
|
"main_controller.mm",
|
|
"main_controller_private.h",
|
|
"memory_monitor.h",
|
|
"memory_monitor.mm",
|
|
"startup_tasks.h",
|
|
"startup_tasks.mm",
|
|
]
|
|
|
|
deps = [
|
|
":app",
|
|
":tests_hook",
|
|
"//base",
|
|
"//components/bookmarks/browser",
|
|
"//components/browser_sync",
|
|
"//components/browsing_data/core",
|
|
"//components/component_updater",
|
|
"//components/content_settings/core/browser",
|
|
"//components/crash/core/common",
|
|
"//components/favicon/core",
|
|
"//components/favicon_base",
|
|
"//components/feature_engagement",
|
|
"//components/handoff",
|
|
"//components/history/core/browser",
|
|
"//components/infobars/core",
|
|
"//components/keyed_service/core",
|
|
"//components/keyed_service/ios",
|
|
"//components/metrics",
|
|
"//components/ntp_snippets",
|
|
"//components/payments/core",
|
|
"//components/prefs",
|
|
"//components/proxy_config",
|
|
"//components/signin/core/browser",
|
|
"//components/suggestions",
|
|
"//components/sync",
|
|
"//components/url_formatter",
|
|
"//components/web_resource",
|
|
"//ios/chrome/app/application_delegate",
|
|
"//ios/chrome/app/application_delegate:application_delegate_internal",
|
|
"//ios/chrome/app/spotlight",
|
|
"//ios/chrome/app/startup",
|
|
"//ios/chrome/app/startup:startup_basic",
|
|
"//ios/chrome/app/strings",
|
|
"//ios/chrome/browser",
|
|
"//ios/chrome/browser:browser_internal",
|
|
"//ios/chrome/browser/bookmarks",
|
|
"//ios/chrome/browser/browser_state",
|
|
"//ios/chrome/browser/browser_state:browser_state_impl",
|
|
"//ios/chrome/browser/browsing_data",
|
|
"//ios/chrome/browser/browsing_data:browsing_data_internal",
|
|
"//ios/chrome/browser/content_settings",
|
|
"//ios/chrome/browser/crash_report",
|
|
"//ios/chrome/browser/crash_report:crash_report_internal",
|
|
"//ios/chrome/browser/favicon",
|
|
"//ios/chrome/browser/feature_engagement",
|
|
"//ios/chrome/browser/first_run",
|
|
"//ios/chrome/browser/geolocation",
|
|
"//ios/chrome/browser/geolocation:geolocation_internal",
|
|
"//ios/chrome/browser/history",
|
|
"//ios/chrome/browser/memory",
|
|
"//ios/chrome/browser/metrics",
|
|
"//ios/chrome/browser/metrics:metrics_internal",
|
|
"//ios/chrome/browser/net",
|
|
"//ios/chrome/browser/ntp_snippets",
|
|
"//ios/chrome/browser/omaha",
|
|
"//ios/chrome/browser/payments",
|
|
"//ios/chrome/browser/payments:constants",
|
|
"//ios/chrome/browser/prefs",
|
|
"//ios/chrome/browser/reading_list",
|
|
"//ios/chrome/browser/search_engines",
|
|
"//ios/chrome/browser/share_extension",
|
|
"//ios/chrome/browser/signin",
|
|
"//ios/chrome/browser/snapshots",
|
|
"//ios/chrome/browser/suggestions",
|
|
"//ios/chrome/browser/sync",
|
|
"//ios/chrome/browser/tabs",
|
|
"//ios/chrome/browser/ui",
|
|
"//ios/chrome/browser/ui:ui_internal",
|
|
"//ios/chrome/browser/ui/authentication",
|
|
"//ios/chrome/browser/ui/commands",
|
|
"//ios/chrome/browser/ui/contextual_search",
|
|
"//ios/chrome/browser/ui/downloads",
|
|
"//ios/chrome/browser/ui/first_run",
|
|
"//ios/chrome/browser/ui/history",
|
|
"//ios/chrome/browser/ui/main",
|
|
"//ios/chrome/browser/ui/promos",
|
|
"//ios/chrome/browser/ui/settings",
|
|
"//ios/chrome/browser/ui/stack_view",
|
|
"//ios/chrome/browser/ui/tab_switcher",
|
|
"//ios/chrome/browser/ui/tabs",
|
|
"//ios/chrome/browser/ui/util",
|
|
"//ios/chrome/browser/ui/webui:webui_internal",
|
|
"//ios/chrome/browser/upgrade",
|
|
"//ios/chrome/browser/variations:ios_chrome_ui_string_overrider_factory",
|
|
"//ios/chrome/browser/voice",
|
|
"//ios/chrome/browser/web:web_internal",
|
|
"//ios/chrome/common",
|
|
"//ios/chrome/common/app_group",
|
|
"//ios/chrome/common/app_group:main_app",
|
|
"//ios/net",
|
|
"//ios/public/provider/chrome/browser",
|
|
"//ios/public/provider/chrome/browser/distribution",
|
|
"//ios/public/provider/chrome/browser/signin",
|
|
"//ios/public/provider/chrome/browser/user_feedback",
|
|
"//ios/testing/perf:startup",
|
|
"//ios/third_party/material_roboto_font_loader_ios",
|
|
"//ios/web",
|
|
"//ios/web/public/app",
|
|
"//mojo/edk/system",
|
|
"//net",
|
|
"//skia",
|
|
"//ui/base",
|
|
"//ui/gfx",
|
|
"//ui/resources",
|
|
"//ui/strings:ui_strings",
|
|
]
|
|
|
|
libs = [
|
|
"CoreSpotlight.framework",
|
|
"MediaPlayer.framework",
|
|
]
|
|
|
|
allow_circular_includes_from =
|
|
[ "//ios/chrome/app/application_delegate:application_delegate_internal" ]
|
|
}
|
|
|
|
source_set("main") {
|
|
configs += [ "//build/config/compiler:enable_arc" ]
|
|
sources = [
|
|
"chrome_exe_main.mm",
|
|
]
|
|
|
|
deps = [
|
|
":app_internal",
|
|
"//base",
|
|
"//components/crash/core/common",
|
|
"//ios/chrome/app/startup:startup_basic",
|
|
"//ios/chrome/browser:browser_internal",
|
|
"//ios/chrome/browser/crash_report",
|
|
"//ios/chrome/common",
|
|
"//ios/testing/perf:startup",
|
|
"//third_party/google_toolbox_for_mac",
|
|
]
|
|
}
|
|
|
|
ios_app_bundle("chrome") {
|
|
output_name = chromium_short_name
|
|
|
|
entitlements_target = ":entitlements"
|
|
info_plist_target = ":info_plist"
|
|
|
|
bundle_deps = [ "//ios/chrome/app/resources" ]
|
|
if (!is_chrome_branded || ios_chrome_app_variants == []) {
|
|
bundle_deps += [ ios_application_icons_target ]
|
|
} else {
|
|
variants = ios_chrome_app_variants
|
|
}
|
|
|
|
deps = [
|
|
":main",
|
|
":tests_fake_hook",
|
|
]
|
|
|
|
if (current_toolchain == default_toolchain) {
|
|
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" ]
|
|
}
|
|
}
|
|
|
|
extra_substitutions = [
|
|
"CONTENT_WIDGET_EXTENSION_BUNDLE_ID=$chromium_bundle_id.ContentTodayExtension",
|
|
"CHROMIUM_BUNDLE_ID=$chromium_bundle_id",
|
|
"CHROMIUM_HANDOFF_ID=$chromium_handoff_id",
|
|
"CHROMIUM_SHORT_NAME=$chromium_short_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_CHANNEL_SCHEME=$url_channel_scheme",
|
|
"SSOAUTH_URL_SCHEME=$url_ssoauth_scheme",
|
|
]
|
|
|
|
if (ios_encryption_export_compliance_code != "") {
|
|
extra_substitutions += [ "ENCRYPTION_EXPORT_COMPLIANCE_CODE=" +
|
|
ios_encryption_export_compliance_code ]
|
|
}
|
|
}
|
|
|
|
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 = [
|
|
"//ios/chrome/search_widget_extension",
|
|
]
|
|
sources = [
|
|
"$root_out_dir/search_widget_extension.appex",
|
|
]
|
|
outputs = [
|
|
"{{bundle_plugins_dir}}/{{source_file_part}}",
|
|
]
|
|
}
|
|
}
|
|
|
|
if (ios_enable_share_extension) {
|
|
bundle_data("share_extension_bundle") {
|
|
public_deps = [
|
|
"//ios/chrome/share_extension",
|
|
]
|
|
sources = [
|
|
"$root_out_dir/share_extension.appex",
|
|
]
|
|
outputs = [
|
|
"{{bundle_plugins_dir}}/{{source_file_part}}",
|
|
]
|
|
}
|
|
}
|
|
}
|