Explicitly add python-numpy dependency to install-build-deps.
[chromium-blink-merge.git] / chrome / renderer / BUILD.gn
blobb242988220185fde61b91333171eeae0c40de216
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") ],
11     "scope",
12     [ "../chrome_renderer.gypi" ])
14 # GYP version: chrome/chrome_resources.gyp:chrome_resources
15 # (generate_renderer_resources action)
16 grit("resources") {
17   source = "resources/renderer_resources.grd"
18   output_dir = "$root_gen_dir/chrome"
19   output_name = "renderer_resources"
20   outputs = [
21     "grit/renderer_resources.h",
22     "renderer_resources_100_percent.pak",
23     "renderer_resources_200_percent.pak",
24     "renderer_resources_300_percent.pak",
25   ]
28 static_library("renderer") {
29   sources = rebase_path(gypi_values.chrome_renderer_sources, ".", "..")
31   defines = []
33   deps = [
34     "//base/allocator",
35     "//chrome/common",
36     "//chrome/common/net",
37     "//chrome:resources",
38     "//chrome:strings",
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",
55     "//media/cast:net",
56     "//media/cast:sender",
57     "//media/cast/logging/proto",
58     "//net",
59     "//skia",
60     "//storage/common",
61     "//third_party/WebKit/public:blink",
62     "//third_party/WebKit/public:resources",
63     "//third_party/icu",
64     "//third_party/npapi",
65     "//third_party/re2",
66     "//third_party/widevine/cdm:version_h",
67     "//ui/surface",
68     "//v8:v8",
69   ]
71   if (enable_nacl) {
72     deps += [
73       #'../components/nacl.gyp:nacl',  TODO(GYP)
74       #'../components/nacl.gyp:nacl_renderer',  TODO(GYP)
75     ]
76   }
78   if (enable_plugins) {
79     sources += rebase_path(gypi_values.chrome_renderer_plugin_sources,
80                            ".", "..")
81     deps += [
82       "//components/pdf/renderer",
83       "//ppapi:ppapi_host",
84       "//ppapi:ppapi_ipc",
85       "//ppapi:ppapi_proxy",
86       "//ppapi:ppapi_shared",
87     ]
88   }
90   if (safe_browsing_mode == 1) {
91     sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
92                            ".", "..")
93     sources += rebase_path(
94         gypi_values.chrome_renderer_basic_safe_browsing_sources,
95         ".", "..")
96     defines += [ "FULL_SAFE_BROWSING" ]
97     deps += [
98       "//chrome/common/safe_browsing:proto",
99       "//third_party/smhasher:murmurhash3",
100     ]
101   }
102   if (safe_browsing_mode == 2) {
103     sources += rebase_path(
104         gypi_values.chrome_renderer_basic_safe_browsing_sources,
105         ".", "..")
106     defines += [ "MOBILE_SAFE_BROWSING" ]
107   }
109   if (enable_extensions) {
110     sources += rebase_path(gypi_values.chrome_renderer_extensions_sources,
111                            ".", "..")
112     deps += [
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",
118     ]
119   }
120   if (enable_webrtc) {
121     sources += rebase_path(gypi_values.chrome_renderer_webrtc_sources,
122                            ".", "..")
123   }
124   if (enable_extensions && enable_webrtc) {
125     sources += rebase_path(
126         gypi_values.chrome_renderer_webrtc_extensions_sources, ".", "..")
127   }
128   if (enable_spellcheck) {
129     sources += rebase_path(gypi_values.chrome_renderer_spellchecker_sources,
130                            ".", "..")
131     deps += [ "//third_party/hunspell" ]
132   }
134   if (enable_basic_printing || enable_print_preview) {
135     deps += [ "//printing" ]
136     sources += rebase_path(gypi_values.chrome_renderer_printing_sources,
137                            ".", "..")
138     if (enable_print_preview) {
139       sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
140                              ".", "..")
141     }
142   }
144   if (is_mac) {
145     deps += [ "//third_party/mach_override" ]
146   }
147   if (is_win) {
148     deps += [
149       #'../chrome_elf/chrome_elf.gyp:chrome_elf',  TODO(GYP)
150       "//third_party/wtl",
151     ]
152   }
153   if (!is_android) {
154     sources += rebase_path(gypi_values.chrome_renderer_non_android_sources,
155                            ".", "..")
156   }
158   # TODO(GYP)
159   #       'sources': [
160   #         'renderer/printing/print_web_view_helper_pdf_win.cc',
161   #       ],
164 # In GYP this is part of test_support_common.
165 source_set("test_support") {
166   testonly = true
167   visibility = [ "//chrome/test:test_support" ]
169   sources = [
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",
176   ]
178   deps = [
179     ":renderer",
180     "//content/test:test_support",
181     "//testing/gmock",
182     "//testing/gtest",
183   ]
185   if (enable_print_preview) {
186     deps += [ "//chrome/service" ]
187   }
188   if (enable_basic_printing || enable_print_preview) {
189     sources += [
190       "printing/mock_printer.cc",
191       "printing/mock_printer.h",
192     ]
193   }
195   if (enable_webrtc) {
196     sources += [
197       "media/mock_webrtc_logging_message_filter.cc",
198       "media/mock_webrtc_logging_message_filter.h",
199     ]
200   }