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:resources",
61 "//third_party/npapi",
63 "//third_party/widevine/cdm:version_h",
71 "//components/nacl:nacl_renderer",
77 rebase_path(gypi_values.chrome_renderer_plugin_sources, ".", "..")
79 "//components/pdf/renderer",
83 "//ppapi/shared_impl",
87 if (safe_browsing_mode == 1) {
88 sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
92 rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
95 defines += [ "FULL_SAFE_BROWSING" ]
97 "//chrome/common/safe_browsing:proto",
98 "//third_party/smhasher:murmurhash3",
101 if (safe_browsing_mode == 2) {
103 rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
106 defines += [ "MOBILE_SAFE_BROWSING" ]
109 if (enable_extensions) {
111 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",
119 "//media/cast:receiver",
120 "//media/cast:sender",
121 "//media/cast/logging/proto",
123 if (!enable_webrtc) {
125 "media/cast_receiver_session.cc",
126 "media/cast_receiver_session.h",
127 "media/cast_rtp_stream.cc",
128 "media/cast_rtp_stream.h",
134 rebase_path(gypi_values.chrome_renderer_webrtc_sources, ".", "..")
136 if (enable_extensions && enable_webrtc) {
138 rebase_path(gypi_values.chrome_renderer_webrtc_extensions_sources,
142 if (enable_spellcheck) {
144 rebase_path(gypi_values.chrome_renderer_spellchecker_sources, ".", "..")
145 deps += [ "//third_party/hunspell" ]
148 if (enable_basic_printing || enable_print_preview) {
149 deps += [ "//printing" ]
151 rebase_path(gypi_values.chrome_renderer_printing_sources, ".", "..")
152 if (enable_print_preview) {
153 sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
160 deps += [ "//third_party/mach_override" ]
170 rebase_path(gypi_values.chrome_renderer_non_android_sources, ".", "..")
174 # In GYP this is part of test_support_common.
175 source_set("test_support") {
177 visibility = [ "//chrome/test:test_support" ]
180 "chrome_mock_render_thread.cc",
181 "chrome_mock_render_thread.h",
182 "safe_browsing/mock_feature_extractor_clock.cc",
183 "safe_browsing/mock_feature_extractor_clock.h",
184 "safe_browsing/test_utils.cc",
185 "safe_browsing/test_utils.h",
190 "//content/test:test_support",
195 if (enable_print_preview) {
196 deps += [ "//chrome/service" ]
201 "media/mock_webrtc_logging_message_filter.cc",
202 "media/mock_webrtc_logging_message_filter.h",