# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/features.gni")
import("//ios/web/public/js_messaging/optimize_ts.gni")
assert(use_blink, "Content is only supported in Blink builds.")
source_set("content") {
sources = [
"content_browser_context.h",
"content_browser_context.mm",
"js_messaging/content_java_script_feature_manager.h",
"js_messaging/content_java_script_feature_manager.mm",
"js_messaging/content_java_script_feature_util.h",
"js_messaging/content_java_script_feature_util.mm",
"js_messaging/content_web_frame.h",
"js_messaging/content_web_frame.mm",
"js_messaging/content_web_frames_manager.h",
"js_messaging/content_web_frames_manager.mm",
"js_messaging/ios_web_message_host_factory.h",
"js_messaging/ios_web_message_host_factory.mm",
"navigation/content_navigation_context.h",
"navigation/content_navigation_context.mm",
"navigation/content_navigation_item.h",
"navigation/content_navigation_item.mm",
"navigation/content_navigation_manager.h",
"navigation/content_navigation_manager.mm",
"web_state/content_web_state.h",
"web_state/content_web_state.mm",
"web_state/content_web_state_builder.h",
"web_state/content_web_state_builder.mm",
"web_state/crc_web_view_proxy_impl.h",
"web_state/crc_web_view_proxy_impl.mm",
"web_state/crc_web_viewport_container_view.h",
"web_state/crc_web_viewport_container_view.mm",
]
deps = [
":send_webkit_message_js",
"//base",
"//build:blink_buildflags",
"//components/embedder_support/ios:web_contents_delegate",
"//components/js_injection/browser",
"//content/public/browser",
"//ios/web/annotations",
"//ios/web/common",
"//ios/web/common:user_agent",
"//ios/web/find_in_page:find_in_page",
"//ios/web/js_features/context_menu",
"//ios/web/js_features/error_page",
"//ios/web/js_messaging",
"//ios/web/navigation:core",
"//ios/web/public",
"//ios/web/public/favicon",
"//ios/web/public/js_messaging",
"//ios/web/public/security:security",
"//ios/web/public/session:session",
"//ios/web/public/session/proto",
"//ios/web/text_fragments:text_fragments",
"//ios/web/web_view:util",
"//ios/web/webui",
]
}
source_set("threads") {
sources = [
"content_thread_impl.cc",
"content_thread_impl.h",
]
deps = [
"//base",
"//content/public/browser",
"//ios/web/public/thread",
]
}
source_set("ui") {
sources = [
"ui/content_context_menu_controller.h",
"ui/content_context_menu_controller.mm",
"ui/web_contents_view_delegate_impl.h",
"ui/web_contents_view_delegate_impl.mm",
]
deps = [
":content",
"//base",
"//content/public/browser",
"//ios/web/public:public",
"//ios/web/public/ui:ui",
]
}
optimize_ts("send_webkit_message_js") {
visibility = [ ":content" ]
sources = [ "js_messaging/resources/send_webkit_message.ts" ]
}