import("//build/config/ui.gni")
import("//media/media_options.gni")
import("//extensions/buildflags/buildflags.gni")
import("//third_party/widevine/cdm/widevine.gni")
import("//ui/ozone/ozone.gni")

chromium_version = exec_script("//build/util/version.py", [ "-f", rebase_path("//chrome/VERSION"),
                                                            "-t", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@"],
                                                            "list lines")

include_dirs = [
  "//skia/config",
  "//third_party",
  "//third_party/boringssl/src/include",
  "//third_party/skia/include/core"
]

deps = [
  "//base",
  "//components/cdm/renderer",
  "//components/error_page/common",
  "//components/keyed_service/content",
  "//components/navigation_interception",
  "//components/network_hints/browser",
  "//components/network_hints/common:mojo_bindings",
  "//components/network_hints/renderer",
  "//components/visitedlink/browser",
  "//components/visitedlink/renderer",
  "//components/web_cache/browser",
  "//components/web_cache/renderer",
  "//components/spellcheck:buildflags",
  "//components/proxy_config",
  "//components/user_prefs",
  "//content/public/app",
  "//content",
  "//media:media_buildflags",
  "//net",
  "//services/proxy_resolver:lib",
  "//skia",
  "//third_party/blink/public:blink",
  "//ui/accessibility",
  "//ui/gl",
  "//qtwebengine/browser:interfaces",
  "//qtwebengine/userscript",
  "//qtwebengine/browser:service_manifests",
  "//qtwebengine/common:mojo_bindings",
  ":qtwebengine_sources",
  ":qtwebengine_resources",
]

if (enable_webrtc) {
  deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
}

if (use_ozone) {
  _ozone_extra_directory = get_path_info(ozone_extra_path, "dir")
  deps += [ "$_ozone_extra_directory:qt" ]
}

if (use_xscrnsaver) {
  deps += [ "//ui/base/x" ]
}

if (enable_extensions) {
  deps += [
    ":qtwebengine_extensions_features"
  ]
}

if (is_win) {
  data_deps = [ ":qtwebengine_sandbox_win" ]
}

defines = [
  "CHROMIUM_VERSION=\"" + chromium_version[0] + "\""
]
