BUILD.gn 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. # Copyright 2016 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/ios/ios_sdk.gni")
  5. import("//build/config/ios/rules.gni")
  6. declare_args() {
  7. # The bundle identifier. Overriding this will affect the provisioning profile
  8. # used, and hence will affect the app's capabilities.
  9. ios_web_view_shell_bundle_identifier =
  10. "$ios_app_bundle_id_prefix.ios-web-view-shell"
  11. # Authorization service implementation used in ios_web_view_shell. Uses a fake
  12. # implementation by default. Override this with a real implementation to make
  13. # Sync feature work in the shell. The real implementation must provide
  14. # implementation of ShellAuthService class.
  15. ios_web_view_shell_auth_service =
  16. "//ios/web_view/shell:shell_auth_service_fake_impl"
  17. # Credit card verification requires risk data to be passed to wallet servers.
  18. # Override this with a real implementation to allow credit cards to be
  19. # unmasked. The real implementation must provide an implementation of
  20. # ShellRiskDataLoader class.
  21. ios_web_view_shell_risk_data_loader =
  22. "//ios/web_view/shell:shell_risk_data_loader_fake_impl"
  23. # Trusted vault requires 1p access to the authorization services.
  24. # Override this with a real implementation to enable trusted vault.
  25. ios_web_view_shell_trusted_vault_provider =
  26. "//ios/web_view/shell:shell_trusted_vault_provider_fake_impl"
  27. # Path to an entitlements file used in ios_web_view_shell. Can be overridden
  28. # to provide an alternative.
  29. ios_web_view_shell_entitlements_path = "//build/config/ios/entitlements.plist"
  30. }
  31. ios_app_bundle("ios_web_view_shell") {
  32. info_plist = "Info.plist"
  33. deps = [ ":shell" ]
  34. bundle_deps = [
  35. "//ios/web_view:web_view+bundle",
  36. "//ios/web_view/shell/resources",
  37. ]
  38. entitlements_path = ios_web_view_shell_entitlements_path
  39. bundle_identifier = ios_web_view_shell_bundle_identifier
  40. assert_no_deps = [
  41. "//ios/third_party/material_components_ios:material_components_ios+bundle",
  42. "//ios/third_party/material_components_ios:material_components_ios+link",
  43. ]
  44. configs += [ "//build/config/compiler:enable_arc" ]
  45. }
  46. source_set("shell_auth_service_interface") {
  47. sources = [ "shell_auth_service.h" ]
  48. deps = [ "//ios/web_view:web_view+link" ]
  49. configs += [ "//build/config/compiler:enable_arc" ]
  50. }
  51. source_set("shell_auth_service_fake_impl") {
  52. sources = [ "shell_auth_service_fake.m" ]
  53. deps = [
  54. ":shell_auth_service_interface",
  55. "//ios/web_view:web_view+link",
  56. ]
  57. configs += [ "//build/config/compiler:enable_arc" ]
  58. }
  59. source_set("shell_risk_data_loader_interface") {
  60. sources = [ "shell_risk_data_loader.h" ]
  61. deps = [ "//ios/web_view:web_view+link" ]
  62. configs += [ "//build/config/compiler:enable_arc" ]
  63. }
  64. source_set("shell_risk_data_loader_fake_impl") {
  65. sources = [ "shell_risk_data_loader_fake.m" ]
  66. deps = [
  67. ":shell_risk_data_loader_interface",
  68. "//ios/web_view:web_view+link",
  69. ]
  70. configs += [ "//build/config/compiler:enable_arc" ]
  71. }
  72. source_set("shell_trusted_vault_provider_interface") {
  73. sources = [ "shell_trusted_vault_provider.h" ]
  74. deps = [
  75. ":shell_auth_service_interface",
  76. "//ios/web_view:web_view+link",
  77. ]
  78. configs += [ "//build/config/compiler:enable_arc" ]
  79. }
  80. source_set("shell_trusted_vault_provider_fake_impl") {
  81. sources = [ "shell_trusted_vault_provider_fake.m" ]
  82. deps = [
  83. ":shell_trusted_vault_provider_interface",
  84. "//ios/web_view:web_view+link",
  85. ]
  86. configs += [ "//build/config/compiler:enable_arc" ]
  87. }
  88. source_set("shell") {
  89. sources = [
  90. "shell_app_delegate.h",
  91. "shell_app_delegate.m",
  92. "shell_autofill_delegate.h",
  93. "shell_autofill_delegate.m",
  94. "shell_exe_main.m",
  95. "shell_translation_delegate.h",
  96. "shell_translation_delegate.m",
  97. "shell_view_controller.h",
  98. "shell_view_controller.m",
  99. ]
  100. deps = [
  101. ":shell_auth_service_interface",
  102. ":shell_risk_data_loader_interface",
  103. ":shell_trusted_vault_provider_interface",
  104. "//ios/third_party/webkit",
  105. "//ios/web_view:web_view+link",
  106. ios_web_view_shell_auth_service,
  107. ios_web_view_shell_risk_data_loader,
  108. ios_web_view_shell_trusted_vault_provider,
  109. ]
  110. libs = [ "resolv" ]
  111. frameworks = [
  112. "CFNetwork.framework",
  113. "CoreFoundation.framework",
  114. "CoreGraphics.framework",
  115. "CoreText.framework",
  116. "Foundation.framework",
  117. "ImageIO.framework",
  118. "MobileCoreServices.framework",
  119. "Security.framework",
  120. "SystemConfiguration.framework",
  121. "UIKit.framework",
  122. "UniformTypeIdentifiers.framework",
  123. ]
  124. configs += [ "//build/config/compiler:enable_arc" ]
  125. }