blob: 05f0d52ee887a012736e74a2841460f5295b55d6 [file] [log] [blame]
# Copyright 2019 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/features.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//build/config/win/console_app.gni")
import("//build/config/win/manifest.gni")
import("//gpu/vulkan/features.gni")
import("//media/media_options.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/repack.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
if (is_android) {
import("//build/config/android/config.gni")
} else if (is_mac) {
import("//build/config/mac/rules.gni")
import("//build/mac/tweak_info_plist.gni")
import("//content/public/app/mac_helpers.gni")
import("//third_party/icu/config.gni")
import("//ui/gl/features.gni")
import("//v8/gni/v8.gni")
}
source_set("android_descriptors") {
sources = [
"browser/android_descriptors.h",
]
public_deps = [
"//content/public/common:content_descriptors",
]
}
jumbo_static_library("weblayer_lib") {
sources = [
"app/content_main_delegate_impl.cc",
"app/content_main_delegate_impl.h",
"app/main.cc",
"browser/browser_controller_impl.cc",
"browser/browser_controller_impl.h",
"browser/browser_main_parts_impl.cc",
"browser/browser_main_parts_impl.h",
"browser/content_browser_client_impl.cc",
"browser/content_browser_client_impl.h",
"browser/navigation_controller_impl.cc",
"browser/navigation_controller_impl.h",
"browser/navigation_impl.cc",
"browser/navigation_impl.h",
"browser/profile_impl.cc",
"browser/profile_impl.h",
"browser/weblayer_content_browser_overlay_manifest.cc",
"browser/weblayer_content_browser_overlay_manifest.h",
"browser/webui/web_ui_controller_factory.cc",
"browser/webui/web_ui_controller_factory.h",
"browser/webui/weblayer_internals_ui.cc",
"browser/webui/weblayer_internals_ui.h",
"common/content_client_impl.cc",
"common/content_client_impl.h",
"public/browser_controller.h",
"public/browser_observer.h",
"public/main.h",
"public/navigation.h",
"public/navigation_controller.h",
"public/navigation_observer.h",
"public/profile.h",
]
configs += [
"//build/config:precompiled_headers",
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
]
public_deps = [
":android_descriptors",
]
deps = [
"//base",
"//base:base_static",
"//base/third_party/dynamic_annotations",
"//cc",
"//content:resources",
"//content/app/resources",
"//content/public/app:both",
"//content/public/browser",
"//content/public/child",
"//content/public/common",
"//content/public/common:service_names",
"//net",
"//net:net_resources",
"//sandbox",
"//services/service_manager/embedder:embedder_result_codes",
"//skia",
"//third_party/blink/public/strings",
"//third_party/icu",
"//ui/base",
"//ui/base/clipboard",
"//ui/base/ime/init",
"//ui/display",
"//ui/events:events_base",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gfx/ipc",
"//ui/gfx/ipc/geometry",
"//ui/gfx/ipc/skia",
"//ui/gl",
"//ui/platform_window",
"//ui/webui",
"//url",
"//v8",
"//weblayer:resources",
"//weblayer/browser/webui:mojo_bindings",
]
if (enable_vulkan) {
deps += [ "//gpu/vulkan/init" ]
}
if (mojo_media_host == "browser") {
deps += [
"//media/mojo/mojom:constants",
"//media/mojo/services",
]
}
if (is_win) {
deps += [ "//content:sandbox_helper_win" ]
if (win_console_app) {
defines = [ "WIN_CONSOLE_APP" ]
}
}
if (is_linux) {
deps += [
"//build/config/freetype",
"//third_party/fontconfig",
]
}
if (is_android) {
deps += [
"//components/version_info",
"//ui/android",
"//weblayer/browser/java:jni",
]
sources += [
"app/jni_onload.cc",
"app/jni_onload.h",
"browser/browser_observer_proxy.cc",
"browser/browser_observer_proxy.h",
"browser/content_view_render_view.cc",
"browser/content_view_render_view.h",
"browser/top_controls_container_view.cc",
"browser/top_controls_container_view.h",
]
}
if (!is_android) {
deps += [ "//ui/views/controls/webview" ]
}
if (toolkit_views) {
deps += [ "//ui/views" ]
}
if (use_aura) {
deps += [
"//ui/aura",
"//ui/events",
"//ui/strings",
"//ui/wm",
]
}
}
grit("resources") {
source = "weblayer_resources.grd"
source_is_generated = true
outputs = [
"grit/weblayer_resources.h",
"weblayer_resources.pak",
]
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
]
deps = [
"//weblayer/browser/webui:mojo_bindings_js",
]
}
# TODO(jam): move weblayer_shell_resources_grit and copy_shell_resources here in
# a way that's shareable?
if (is_android) {
shared_library("libweblayer") {
sources = [
"app/entry_point.cc",
]
deps = [
":weblayer_lib",
"//base",
"//content/public/app:both",
]
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
configs += [ "//build/config/android:hide_all_but_jni" ]
}
}