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:mojo_bindings",
36 "//chrome/common/net",
39 "//components/autofill/content/renderer",
40 "//components/content_settings/content/common",
41 "//components/cdm/renderer",
42 "//components/data_reduction_proxy/content/common",
43 "//components/data_reduction_proxy/core/common",
44 "//components/error_page/renderer",
45 "//components/guest_view/renderer",
46 "//components/network_hints/renderer",
47 "//components/omnibox/common",
48 "//components/password_manager/content/renderer",
49 "//components/plugins/renderer",
50 "//components/printing/renderer:printing_renderer",
51 "//components/startup_metric_utils",
52 "//components/translate/content/renderer",
53 "//components/translate/core/common",
54 "//components/translate/core/language_detection",
55 "//components/visitedlink/renderer",
56 "//components/web_cache/renderer",
57 "//content/app/resources",
58 "//content/app/strings",
59 "//content/public/renderer",
63 "//third_party/WebKit/public:blink",
64 "//third_party/WebKit/public:image_resources",
65 "//third_party/WebKit/public:resources",
68 "//third_party/widevine/cdm:version_h",
76 "//components/nacl:nacl_renderer",
82 rebase_path(gypi_values.chrome_renderer_plugin_sources, ".", "..")
84 "//components/pdf/renderer",
88 "//ppapi/shared_impl",
92 if (safe_browsing_mode != 0) {
94 rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
97 if (safe_browsing_mode == 1) {
98 sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
102 "//chrome/common/safe_browsing:proto",
103 "//third_party/smhasher:murmurhash3",
108 if (enable_extensions) {
110 rebase_path(gypi_values.chrome_renderer_extensions_sources, ".", "..")
112 # TODO(hclam): See crbug.com/298380 for details.
113 # We should isolate the APIs needed by the renderer.
114 "//chrome/common/extensions/api",
115 "//extensions:extensions_resources",
116 "//extensions/renderer",
118 "//media/cast:receiver",
119 "//media/cast:sender",
120 "//media/cast/logging/proto",
122 if (!enable_webrtc) {
124 "media/cast_receiver_session.cc",
125 "media/cast_receiver_session.h",
126 "media/cast_rtp_stream.cc",
127 "media/cast_rtp_stream.h",
133 rebase_path(gypi_values.chrome_renderer_webrtc_sources, ".", "..")
135 if (enable_extensions && enable_webrtc) {
137 rebase_path(gypi_values.chrome_renderer_webrtc_extensions_sources,
141 if (enable_spellcheck) {
143 rebase_path(gypi_values.chrome_renderer_spellchecker_sources, ".", "..")
145 deps += [ "//third_party/hunspell" ]
148 if (!use_browser_spellchecker) {
150 "spellchecker/platform_spelling_engine.cc",
151 "spellchecker/platform_spelling_engine.h",
154 if (enable_basic_printing || enable_print_preview) {
155 deps += [ "//printing" ]
157 rebase_path(gypi_values.chrome_renderer_printing_sources, ".", "..")
158 if (enable_print_preview) {
159 sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
166 deps += [ "//third_party/mach_override" ]
169 deps += [ "//third_party/wtl" ]
173 "spellchecker/hunspell_engine.cc",
174 "spellchecker/hunspell_engine.h",
179 rebase_path(gypi_values.chrome_renderer_non_android_sources, ".", "..")
183 # In GYP this is part of test_support_common.
184 source_set("test_support") {
186 visibility = [ "//chrome/test:test_support" ]
189 "chrome_mock_render_thread.cc",
190 "chrome_mock_render_thread.h",
191 "safe_browsing/mock_feature_extractor_clock.cc",
192 "safe_browsing/mock_feature_extractor_clock.h",
193 "safe_browsing/test_utils.cc",
194 "safe_browsing/test_utils.h",
199 "//content/test:test_support",
204 if (enable_print_preview) {
205 deps += [ "//chrome/service" ]
210 "media/mock_webrtc_logging_message_filter.cc",
211 "media/mock_webrtc_logging_message_filter.h",