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("//build/gypi_to_gn.py",
9 [ rebase_path("../chrome_renderer.gypi") ],
11 [ "../chrome_renderer.gypi" ])
13 # GYP version: chrome/chrome_resources.gyp:chrome_resources
14 # (generate_renderer_resources action)
16 source = "resources/renderer_resources.grd"
17 output_dir = "$root_gen_dir/chrome"
18 output_name = "renderer_resources"
20 "grit/renderer_resources.h",
21 "renderer_resources_100_percent.pak",
22 "renderer_resources_200_percent.pak",
23 "renderer_resources_300_percent.pak",
27 static_library("renderer") {
28 sources = rebase_path(gypi_values.chrome_renderer_sources, ".", "..")
35 "//chrome/common/net",
38 "//components/autofill/content/renderer",
39 "//components/cdm/renderer",
40 "//components/data_reduction_proxy/content/common",
41 "//components/network_hints/renderer",
42 "//components/error_page/renderer",
43 "//components/password_manager/content/renderer",
44 "//components/plugins/renderer",
45 "//components/printing/renderer:printing_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",
58 "//third_party/WebKit/public:blink",
59 "//third_party/WebKit/public:image_resources",
60 "//third_party/WebKit/public:resources",
62 "//third_party/npapi",
64 "//third_party/widevine/cdm:version_h",
72 "//components/nacl:nacl_renderer",
78 rebase_path(gypi_values.chrome_renderer_plugin_sources, ".", "..")
80 "//components/pdf/renderer",
84 "//ppapi/shared_impl",
88 if (safe_browsing_mode == 1) {
89 sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
93 rebase_path(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) {
104 rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
107 defines += [ "MOBILE_SAFE_BROWSING" ]
110 if (enable_extensions) {
112 rebase_path(gypi_values.chrome_renderer_extensions_sources, ".", "..")
114 # TODO(hclam): See crbug.com/298380 for details.
115 # We should isolate the APIs needed by the renderer.
116 "//chrome/common/extensions/api",
117 "//extensions:extensions_resources",
118 "//extensions/renderer",
120 "//media/cast:receiver",
121 "//media/cast:sender",
122 "//media/cast/logging/proto",
124 if (!enable_webrtc) {
126 "media/cast_receiver_session.cc",
127 "media/cast_receiver_session.h",
128 "media/cast_rtp_stream.cc",
129 "media/cast_rtp_stream.h",
135 rebase_path(gypi_values.chrome_renderer_webrtc_sources, ".", "..")
137 if (enable_extensions && enable_webrtc) {
139 rebase_path(gypi_values.chrome_renderer_webrtc_extensions_sources,
143 if (enable_spellcheck) {
145 rebase_path(gypi_values.chrome_renderer_spellchecker_sources, ".", "..")
146 deps += [ "//third_party/hunspell" ]
149 if (enable_basic_printing || enable_print_preview) {
150 deps += [ "//printing" ]
152 rebase_path(gypi_values.chrome_renderer_printing_sources, ".", "..")
153 if (enable_print_preview) {
154 sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
161 deps += [ "//third_party/mach_override" ]
171 rebase_path(gypi_values.chrome_renderer_non_android_sources, ".", "..")
175 # In GYP this is part of test_support_common.
176 source_set("test_support") {
178 visibility = [ "//chrome/test:test_support" ]
181 "chrome_mock_render_thread.cc",
182 "chrome_mock_render_thread.h",
183 "safe_browsing/mock_feature_extractor_clock.cc",
184 "safe_browsing/mock_feature_extractor_clock.h",
185 "safe_browsing/test_utils.cc",
186 "safe_browsing/test_utils.h",
191 "//content/test:test_support",
196 if (enable_print_preview) {
197 deps += [ "//chrome/service" ]
202 "media/mock_webrtc_logging_message_filter.cc",
203 "media/mock_webrtc_logging_message_filter.h",