chromium/content/public/renderer/BUILD.gn

# Copyright 2014 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("//media/media_options.gni")
import("//ppapi/buildflags/buildflags.gni")

# See //content/BUILD.gn for how this works.
group("renderer") {
  if (is_component_build) {
    public_deps = [ "//content" ]
  } else {
    public_deps = [
      ":render_frame_media_playback_options",
      ":renderer_sources",
    ]
  }
}

if (is_component_build) {
  link_target_type = "source_set"
} else {
  link_target_type = "static_library"
}
target(link_target_type, "renderer_sources") {
  # External code should depend on via ":renderer" above.
  visibility = [ "//content/*" ]

  sources = [
    "chrome_object_extensions_utils.cc",
    "chrome_object_extensions_utils.h",
    "content_renderer_client.cc",
    "content_renderer_client.h",
    "render_accessibility.h",
    "render_frame.h",
    "render_frame_observer.cc",
    "render_frame_observer.h",
    "render_frame_observer_tracker.h",
    "render_frame_visitor.h",
    "render_thread.cc",
    "render_thread.h",
    "render_thread_observer.cc",
    "render_thread_observer.h",
    "v8_value_converter.h",
    "window_features_converter.cc",
    "window_features_converter.h",
    "worker_thread.h",
  ]

  configs += [ "//content:content_implementation" ]

  public_deps = [
    "//build:chromecast_buildflags",
    "//media",
    "//ui/accessibility",
  ]

  deps = [
    "//content/public/child:child_sources",
    "//content/public/common:common_sources",
    "//content/renderer",
    "//gin",
    "//media/capture",
    "//net",
    "//ppapi/buildflags",
    "//skia",
    "//third_party/blink/public:blink_headers",
    "//third_party/blink/public/common",
    "//third_party/webrtc_overrides:webrtc_component",
    "//third_party/widevine/cdm:headers",
    "//ui/base",
    "//ui/base/ime",
    "//ui/gfx",
    "//v8",
  ]

  allow_circular_includes_from = [
    # This target is a pair with content/renderer. They always go together and
    # include headers from each other.
    "//content/renderer",
  ]

  if (enable_plugins) {
    sources += [ "plugin_ax_tree_action_target_adapter.h" ]
  }

  if (enable_ppapi) {
    sources += [
      "pepper_plugin_instance.h",
      "ppapi_gfx_conversion.h",
      "renderer_ppapi_host.h",
    ]
    deps += [ "//ppapi/c" ]
  }

  if (is_android) {
    sources += [ "seccomp_sandbox_status_android.h" ]

    # For seccomp_sandbox_status_android.h.
    deps += [ "//sandbox" ]
  }

  if (enable_library_cdms || is_win || is_android) {
    sources += [
      "key_system_support.cc",
      "key_system_support.h",
    ]
  }
}

source_set("render_frame_media_playback_options") {
  # External code should depend on via ":renderer" above.
  visibility = [ "//content/*" ]

  sources = [
    "render_frame_media_playback_options.cc",
    "render_frame_media_playback_options.h",
  ]

  configs += [ "//content:content_implementation" ]

  public_deps = [
    "//content:export",
    "//content/public/common:renderer_type",
  ]

  deps = [ "//build:android_buildflags" ]
}