Use multiline attribute to check for IA2_STATE_MULTILINE.
[chromium-blink-merge.git] / chrome / renderer / BUILD.gn
blob25dc37c7903f235d9f5f3c3bd44ce8c977a8998c
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") ],
10                           "scope",
11                           [ "../chrome_renderer.gypi" ])
13 # GYP version: chrome/chrome_resources.gyp:chrome_resources
14 # (generate_renderer_resources action)
15 grit("resources") {
16   source = "resources/renderer_resources.grd"
17   output_dir = "$root_gen_dir/chrome"
18   output_name = "renderer_resources"
19   outputs = [
20     "grit/renderer_resources.h",
21     "renderer_resources_100_percent.pak",
22     "renderer_resources_200_percent.pak",
23     "renderer_resources_300_percent.pak",
24   ]
27 static_library("renderer") {
28   sources = rebase_path(gypi_values.chrome_renderer_sources, ".", "..")
30   defines = []
32   deps = [
33     "//base/allocator",
34     "//chrome/common",
35     "//chrome/common/net",
36     "//chrome:resources",
37     "//chrome:strings",
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",
55     "//net",
56     "//skia",
57     "//storage/common",
58     "//third_party/WebKit/public:blink",
59     "//third_party/WebKit/public:image_resources",
60     "//third_party/WebKit/public:resources",
61     "//third_party/icu",
62     "//third_party/npapi",
63     "//third_party/re2",
64     "//third_party/widevine/cdm:version_h",
65     "//ui/surface",
66     "//v8:v8",
67   ]
69   if (enable_nacl) {
70     deps += [
71       "//components/nacl",
72       "//components/nacl:nacl_renderer",
73     ]
74   }
76   if (enable_plugins) {
77     sources +=
78         rebase_path(gypi_values.chrome_renderer_plugin_sources, ".", "..")
79     deps += [
80       "//components/pdf/renderer",
81       "//ppapi/host",
82       "//ppapi/proxy",
83       "//ppapi/proxy:ipc",
84       "//ppapi/shared_impl",
85     ]
86   }
88   if (safe_browsing_mode == 1) {
89     sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
90                            ".",
91                            "..")
92     sources +=
93         rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
94                     ".",
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 +=
104         rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
105                     ".",
106                     "..")
107     defines += [ "MOBILE_SAFE_BROWSING" ]
108   }
110   if (enable_extensions) {
111     sources +=
112         rebase_path(gypi_values.chrome_renderer_extensions_sources, ".", "..")
113     deps += [
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",
119       "//media/cast:net",
120       "//media/cast:receiver",
121       "//media/cast:sender",
122       "//media/cast/logging/proto",
123     ]
124     if (!enable_webrtc) {
125       sources -= [
126         "media/cast_receiver_session.cc",
127         "media/cast_receiver_session.h",
128         "media/cast_rtp_stream.cc",
129         "media/cast_rtp_stream.h",
130       ]
131     }
132   }
133   if (enable_webrtc) {
134     sources +=
135         rebase_path(gypi_values.chrome_renderer_webrtc_sources, ".", "..")
136   }
137   if (enable_extensions && enable_webrtc) {
138     sources +=
139         rebase_path(gypi_values.chrome_renderer_webrtc_extensions_sources,
140                     ".",
141                     "..")
142   }
143   if (enable_spellcheck) {
144     sources +=
145         rebase_path(gypi_values.chrome_renderer_spellchecker_sources, ".", "..")
146     deps += [ "//third_party/hunspell" ]
147   }
149   if (enable_basic_printing || enable_print_preview) {
150     deps += [ "//printing" ]
151     sources +=
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,
155                              ".",
156                              "..")
157     }
158   }
160   if (is_mac) {
161     deps += [ "//third_party/mach_override" ]
162   }
163   if (is_win) {
164     deps += [
165       "//chrome_elf",
166       "//third_party/wtl",
167     ]
168   }
169   if (!is_android) {
170     sources +=
171         rebase_path(gypi_values.chrome_renderer_non_android_sources, ".", "..")
172   }
175 # In GYP this is part of test_support_common.
176 source_set("test_support") {
177   testonly = true
178   visibility = [ "//chrome/test:test_support" ]
180   sources = [
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",
187   ]
189   deps = [
190     ":renderer",
191     "//content/test:test_support",
192     "//testing/gmock",
193     "//testing/gtest",
194   ]
196   if (enable_print_preview) {
197     deps += [ "//chrome/service" ]
198   }
200   if (enable_webrtc) {
201     sources += [
202       "media/mock_webrtc_logging_message_filter.cc",
203       "media/mock_webrtc_logging_message_filter.h",
204     ]
205   }