1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
6 import("//tools/grit/grit_rule.gni")
8 gypi_values = exec_script(
9 "//build/gypi_to_gn.py",
10 [ rebase_path("../chrome_renderer.gypi") ],
12 [ "../chrome_renderer.gypi" ])
14 # GYP version: chrome/chrome_resources.gyp:chrome_resources
15 # (generate_renderer_resources action)
17 source = "resources/renderer_resources.grd"
18 output_dir = "$root_gen_dir/chrome"
19 output_name = "renderer_resources"
21 "grit/renderer_resources.h",
22 "renderer_resources_100_percent.pak",
23 "renderer_resources_200_percent.pak",
24 "renderer_resources_300_percent.pak",
28 static_library("renderer") {
29 sources = rebase_path(gypi_values.chrome_renderer_sources, ".", "..")
36 "//chrome/common/net",
39 "//components/autofill/content/renderer",
40 "//components/cdm/renderer",
41 "//components/data_reduction_proxy/core/common",
42 "//components/dns_prefetch/renderer",
43 "//components/error_page/renderer",
44 "//components/password_manager/content/renderer",
45 "//components/plugins/renderer",
46 "//components/startup_metric_utils",
47 "//components/translate/content/renderer",
48 "//components/translate/core/common",
49 "//components/translate/core/language_detection",
50 "//components/visitedlink/renderer",
51 "//components/web_cache/renderer",
52 "//content/app/resources",
53 "//content/app/strings",
54 "//content/public/renderer",
56 "//media/cast:sender",
57 "//media/cast/logging/proto",
61 "//third_party/WebKit/public:blink",
62 "//third_party/WebKit/public:resources",
64 "//third_party/npapi",
66 "//third_party/widevine/cdm:version_h",
73 #'../components/nacl.gyp:nacl', TODO(GYP)
74 #'../components/nacl.gyp:nacl_renderer', TODO(GYP)
79 sources += rebase_path(gypi_values.chrome_renderer_plugin_sources,
82 "//components/pdf/renderer",
85 "//ppapi:ppapi_proxy",
86 "//ppapi:ppapi_shared",
90 if (safe_browsing_mode == 1) {
91 sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
93 sources += rebase_path(
94 gypi_values.chrome_renderer_basic_safe_browsing_sources,
96 defines += [ "FULL_SAFE_BROWSING" ]
98 "//chrome/common/safe_browsing:proto",
99 "//third_party/smhasher:murmurhash3",
102 if (safe_browsing_mode == 2) {
103 sources += rebase_path(
104 gypi_values.chrome_renderer_basic_safe_browsing_sources,
106 defines += [ "MOBILE_SAFE_BROWSING" ]
109 if (enable_extensions) {
110 sources += rebase_path(gypi_values.chrome_renderer_extensions_sources,
113 # TODO(hclam): See crbug.com/298380 for details.
114 # We should isolate the APIs needed by the renderer.
115 "//chrome/common/extensions/api",
116 "//extensions:extensions_resources",
117 "//extensions/renderer",
121 sources += rebase_path(gypi_values.chrome_renderer_webrtc_sources,
124 if (enable_extensions && enable_webrtc) {
125 sources += rebase_path(
126 gypi_values.chrome_renderer_webrtc_extensions_sources, ".", "..")
128 if (enable_spellcheck) {
129 sources += rebase_path(gypi_values.chrome_renderer_spellchecker_sources,
131 deps += [ "//third_party/hunspell" ]
134 if (enable_basic_printing || enable_print_preview) {
135 deps += [ "//printing" ]
136 sources += rebase_path(gypi_values.chrome_renderer_printing_sources,
138 if (enable_print_preview) {
139 sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
145 deps += [ "//third_party/mach_override" ]
149 #'../chrome_elf/chrome_elf.gyp:chrome_elf', TODO(GYP)
154 sources += rebase_path(gypi_values.chrome_renderer_non_android_sources,
160 # 'renderer/printing/print_web_view_helper_pdf_win.cc',
164 # In GYP this is part of test_support_common.
165 source_set("test_support") {
167 visibility = [ "//chrome/test:test_support" ]
170 "chrome_mock_render_thread.cc",
171 "chrome_mock_render_thread.h",
172 "safe_browsing/mock_feature_extractor_clock.cc",
173 "safe_browsing/mock_feature_extractor_clock.h",
174 "safe_browsing/test_utils.cc",
175 "safe_browsing/test_utils.h",
180 "//content/test:test_support",
185 if (enable_print_preview) {
186 deps += [ "//chrome/service" ]
188 if (enable_basic_printing || enable_print_preview) {
190 "printing/mock_printer.cc",
191 "printing/mock_printer.h",
197 "media/mock_webrtc_logging_message_filter.cc",
198 "media/mock_webrtc_logging_message_filter.h",