chromium/fuchsia_web/webinstance_host/BUILD.gn

# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(is_fuchsia)

import("//third_party/widevine/cdm/widevine.gni")

visibility = [ ":*" ]

source_set("webinstance_host") {
  assert_no_deps = [
    "//content/public/common",
    "//media",
    "//third_party/blink/common",
  ]

  # Only WebInstance clients should use the host.
  visibility += [
    # WebEngine clients that instantiate WebInstances directly.
    "//fuchsia_web/runners/*",
    "//fuchsia_web/shell:*",
    "//fuchsia_web/webengine:context_provider",
  ]
  sources = [
    "fuchsia_web_debug_proxy.cc",
    "fuchsia_web_debug_proxy.h",
    "web_instance_host.cc",
    "web_instance_host_internal.cc",
    "web_instance_host_internal.h",
  ]
  public = [
    "web_instance_host.h",
    "web_instance_host_constants.h",
  ]
  deps = [
    "//base:base_static",
    "//build:chromecast_buildflags",
    "//components/fuchsia_component_support",
    "//fuchsia_web/common",
    "//fuchsia_web/webengine:switches",
    "//gpu/command_buffer/service",
    "//gpu/config",
    "//services/network/public/cpp",
    "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_hlcpp",
    "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.io:fuchsia.io_hlcpp",
    "//third_party/fuchsia-sdk/sdk/pkg/fit",
    "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
    "//third_party/fuchsia-sdk/sdk/pkg/vfs_cpp",
    "//third_party/widevine/cdm:buildflags",
    "//ui/ozone",
  ]
  if (enable_widevine) {
    deps += [ "//third_party/widevine/cdm:headers" ]
  }

  public_deps = [
    "//base",
    "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.component:fuchsia.component_hlcpp",
    "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.web:fuchsia.web_hlcpp",
    "//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp",
  ]
}