blob: e2bbcd4c431d49eaea85c1f632e131e8b2d83b63 [file] [log] [blame]
# 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")
declare_args() {
# Authorization service implementation used in ios_web_view_shell. Uses a fake
# implementation by default. Override this with a real implementation to make
# Sync feature work in the shell. The real implementation must provide
# implementation of ShellAuthService class.
ios_web_view_shell_auth_service =
"//ios/web_view/shell:shell_auth_service_fake_impl"
# Credit card verification requires risk data to be passed to wallet servers.
# Override this with a real implementation to allow credit cards to be
# unmasked. The real implementation must provide an implementation of
# ShellRiskDataLoader class.
ios_web_view_shell_risk_data_loader =
"//ios/web_view/shell:shell_risk_data_loader_fake_impl"
# Path to an entitlements file used in ios_web_view_shell. Can be overridden
# to provide an alternative.
ios_web_view_shell_entitlements_path = "//build/config/ios/entitlements.plist"
# Controls whether WebView shell links with MaterialComponents.framework or
# gets the implementation from its downstream provider. Ignored if
# MaterialComponents is not build as a framework.
ios_web_view_shell_links_with_material_components_framework = true
}
ios_app_bundle("ios_web_view_shell") {
info_plist = "Info.plist"
deps = [ ":shell" ]
bundle_deps = [
"//ios/web_view:web_view+bundle",
"//ios/web_view/shell/resources",
]
entitlements_path = ios_web_view_shell_entitlements_path
if (ios_web_view_shell_links_with_material_components_framework) {
deps += [
"//ios/third_party/material_components_ios:material_components_ios+bundle",
"//ios/third_party/material_components_ios:material_components_ios+link",
]
} else {
assert_no_deps = [
"//ios/third_party/material_components_ios:material_components_ios+bundle",
"//ios/third_party/material_components_ios:material_components_ios+link",
]
}
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("shell_auth_service_interface") {
sources = [ "shell_auth_service.h" ]
deps = [ "//ios/web_view:web_view+link" ]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("shell_auth_service_fake_impl") {
sources = [ "shell_auth_service_fake.m" ]
deps = [
":shell_auth_service_interface",
"//ios/web_view:web_view+link",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("shell_risk_data_loader_interface") {
sources = [ "shell_risk_data_loader.h" ]
deps = [ "//ios/web_view:web_view+link" ]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("shell_risk_data_loader_fake_impl") {
sources = [ "shell_risk_data_loader_fake.m" ]
deps = [
":shell_risk_data_loader_interface",
"//ios/web_view:web_view+link",
]
configs += [ "//build/config/compiler:enable_arc" ]
}
source_set("shell") {
sources = [
"shell_app_delegate.h",
"shell_app_delegate.m",
"shell_autofill_delegate.h",
"shell_autofill_delegate.m",
"shell_exe_main.m",
"shell_translation_delegate.h",
"shell_translation_delegate.m",
"shell_view_controller.h",
"shell_view_controller.m",
]
deps = [
":shell_auth_service_interface",
":shell_risk_data_loader_interface",
"//ios/third_party/webkit",
"//ios/web_view:web_view+link",
ios_web_view_shell_auth_service,
ios_web_view_shell_risk_data_loader,
]
libs = [ "resolv" ]
frameworks = [
"CFNetwork.framework",
"CoreFoundation.framework",
"CoreGraphics.framework",
"CoreText.framework",
"Foundation.framework",
"ImageIO.framework",
"MobileCoreServices.framework",
"Security.framework",
"SystemConfiguration.framework",
"UIKit.framework",
]
configs += [ "//build/config/compiler:enable_arc" ]
}