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/core/common",
41 "//components/dns_prefetch/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",
70 #'../components/nacl.gyp:nacl', TODO(GYP)
71 #'../components/nacl.gyp:nacl_renderer', TODO(GYP)
77 rebase_path(gypi_values.chrome_renderer_plugin_sources, ".", "..")
79 "//components/pdf/renderer",
82 "//ppapi:ppapi_proxy",
83 "//ppapi:ppapi_shared",
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:sender",
120 "//media/cast/logging/proto",
122 if (!enable_webrtc) {
124 "media/cast_rtp_stream.cc",
125 "media/cast_rtp_stream.h",
131 rebase_path(gypi_values.chrome_renderer_webrtc_sources, ".", "..")
133 if (enable_extensions && enable_webrtc) {
135 rebase_path(gypi_values.chrome_renderer_webrtc_extensions_sources,
139 if (enable_spellcheck) {
141 rebase_path(gypi_values.chrome_renderer_spellchecker_sources, ".", "..")
142 deps += [ "//third_party/hunspell" ]
145 if (enable_basic_printing || enable_print_preview) {
146 deps += [ "//printing" ]
148 rebase_path(gypi_values.chrome_renderer_printing_sources, ".", "..")
149 if (enable_print_preview) {
150 sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
157 deps += [ "//third_party/mach_override" ]
161 #'../chrome_elf/chrome_elf.gyp:chrome_elf', TODO(GYP)
167 rebase_path(gypi_values.chrome_renderer_non_android_sources, ".", "..")
171 # In GYP this is part of test_support_common.
172 source_set("test_support") {
174 visibility = [ "//chrome/test:test_support" ]
177 "chrome_mock_render_thread.cc",
178 "chrome_mock_render_thread.h",
179 "safe_browsing/mock_feature_extractor_clock.cc",
180 "safe_browsing/mock_feature_extractor_clock.h",
181 "safe_browsing/test_utils.cc",
182 "safe_browsing/test_utils.h",
187 "//content/test:test_support",
192 if (enable_print_preview) {
193 deps += [ "//chrome/service" ]
195 if (enable_basic_printing || enable_print_preview) {
197 "printing/mock_printer.cc",
198 "printing/mock_printer.h",
204 "media/mock_webrtc_logging_message_filter.cc",
205 "media/mock_webrtc_logging_message_filter.h",