# 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("//tools/grit/grit_rule.gni")
+gypi_values = exec_script(
+ "//build/gypi_to_gn.py",
+ [ rebase_path("../chrome_renderer.gypi") ],
+ "scope",
+ [ "../chrome_renderer.gypi" ])
+
# GYP version: chrome/chrome_resources.gyp:chrome_resources
# (generate_renderer_resources action)
grit("resources") {
source = "resources/renderer_resources.grd"
+ output_dir = "$root_gen_dir/chrome"
+ output_name = "renderer_resources"
+ outputs = [
+ "grit/renderer_resources.h",
+ "renderer_resources_100_percent.pak",
+ "renderer_resources_200_percent.pak",
+ ]
+}
+
+static_library("renderer") {
+ sources = rebase_path(gypi_values.chrome_renderer_sources, ".", "..")
+
+ defines = []
+
+ deps = [
+ "//base/allocator",
+ "//chrome/common",
+ "//chrome/common/net",
+ "//chrome:resources",
+ "//chrome:strings",
+ "//components/autofill/content/renderer",
+ "//components/data_reduction_proxy/common",
+ "//components/plugins/renderer",
+ "//components/startup_metric_utils",
+ "//components/translate/core/common",
+ "//components/translate/core/language_detection",
+ "//components/visitedlink/renderer",
+ "//content/app/strings",
+ "//content/public/renderer",
+ "//extensions:extensions_resources",
+ "//media/cast/logging/proto",
+ "//net",
+ "//skia",
+ "//third_party/WebKit/public:blink",
+ "//third_party/WebKit/public:resources",
+ "//third_party/icu",
+ "//third_party/npapi",
+ "//third_party/re2",
+ "//third_party/widevine/cdm:version_h",
+ "//ui/surface",
+ "//v8:v8",
+ "//webkit/child",
+ "//webkit/common",
+ "//webkit/glue/resources",
+ #"../components/components.gyp:cdm_renderer", TODO(GYP)
+ #"../extensions/extensions.gyp:extensions_renderer", TODO(GYP)
+ #"../media/cast/cast.gyp:cast_sender", TODO(GYP)
+ #"../media/cast/cast.gyp:cast_transport", TODO(GYP)
+ ]
+
+ if (enable_nacl) {
+ deps += [
+ #'../components/nacl.gyp:nacl', TODO(GYP)
+ #'../components/nacl.gyp:nacl_renderer', TODO(GYP)
+ ]
+ }
+
+ if (enable_plugins) {
+ sources += rebase_path(gypi_values.chrome_renderer_plugin_sources,
+ ".", "..")
+ deps += [
+ "//ppapi:ppapi_host",
+ "//ppapi:ppapi_ipc",
+ "//ppapi:ppapi_proxy",
+ "//ppapi:ppapi_shared",
+ ]
+ }
+
+ if (safe_browsing_mode == 1) {
+ sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
+ ".", "..")
+ sources += rebase_path(
+ gypi_values.chrome_renderer_basic_safe_browsing_sources,
+ ".", "..")
+ defines += [ "FULL_SAFE_BROWSING" ]
+ deps += [
+ "//chrome/common/safe_browsing:proto",
+ "//third_party/smhasher:murmurhash3",
+ ]
+ }
+ if (safe_browsing_mode == 2) {
+ sources += rebase_path(
+ gypi_values.chrome_renderer_basic_safe_browsing_sources,
+ ".", "..")
+ defines += [ "MOBILE_SAFE_BROWSING" ]
+ }
+
+ if (enable_extensions) {
+ sources += rebase_path(gypi_values.chrome_renderer_extensions_sources,
+ ".", "..")
+ }
+ if (enable_webrtc) {
+ sources += rebase_path(gypi_values.chrome_renderer_webrtc_sources,
+ ".", "..")
+ }
+ if (enable_extensions && enable_webrtc) {
+ sources += rebase_path(
+ gypi_values.chrome_renderer_webrtc_extensions_sources, ".", "..")
+ }
+ if (enable_spellcheck) {
+ sources += rebase_path(gypi_values.chrome_renderer_spellchecker_sources,
+ ".", "..")
+ deps += [ "//third_party/hunspell" ]
+ }
+
+ if (printing_mode > 0) {
+ deps += [ "//printing" ]
+ if (printing_mode == 1) {
+ sources += rebase_path(gypi_values.chrome_renderer_printing_sources,
+ ".", "..")
+ }
+ }
+
+ if (is_mac) {
+ deps += [ "//third_party/mach_override" ]
+ }
+ if (is_win) {
+ deps += [
+ #'../chrome_elf/chrome_elf.gyp:chrome_elf', TODO(GYP)
+ "//third_party/wtl",
+ ]
+ }
+ if (!is_android) {
+ sources += rebase_path(gypi_values.chrome_renderer_non_android_sources,
+ ".", "..")
+ }
+ if (!is_ios) {
+ deps += [
+ # TODO(hclam): See crbug.com/298380 for details.
+ # We should isolate the APIs needed by the renderer.
+ "//chrome/common/extensions/api",
+ ]
+ }
+
+ # TODO(GYP)
+ # ['win_pdf_metafile_for_printing==1', {
+ # 'sources': [
+ # 'renderer/printing/print_web_view_helper_pdf_win.cc',
+ # ],
+ # }, {
+ # 'sources': [
+ # 'renderer/printing/print_web_view_helper_win.cc',
+ # ],
+ # }],
}