Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / renderer / BUILD.gn
blobd2cce4fefbdb3e466c6d46dd55c1ee472a9eb8a5
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:mojo_bindings",
36     "//chrome:resources",
37     "//chrome:strings",
38     "//components/autofill/content/renderer",
39     "//components/content_settings/content/common",
40     "//components/cdm/renderer",
41     "//components/data_reduction_proxy/content/common",
42     "//components/data_reduction_proxy/core/common",
43     "//components/error_page/renderer",
44     "//components/guest_view/renderer",
45     "//components/network_hints/renderer",
46     "//components/omnibox/common",
47     "//components/password_manager/content/renderer",
48     "//components/plugins/renderer",
49     "//components/printing/renderer",
50     "//components/startup_metric_utils",
51     "//components/translate/content/renderer",
52     "//components/translate/core/common",
53     "//components/translate/core/language_detection",
54     "//components/visitedlink/renderer",
55     "//components/web_cache/renderer",
56     "//content/app/resources",
57     "//content/app/strings",
58     "//content/public/renderer",
59     "//net",
60     "//skia",
61     "//storage/common",
62     "//third_party/WebKit/public:blink",
63     "//third_party/WebKit/public:image_resources",
64     "//third_party/WebKit/public:resources",
65     "//third_party/icu",
66     "//third_party/re2",
67     "//third_party/widevine/cdm:version_h",
68     "//ui/surface",
69     "//v8:v8",
70   ]
72   if (!is_ios) {
73     deps += [ "//chrome/common/net" ]
74   }
76   if (enable_nacl) {
77     deps += [
78       "//components/nacl",
79       "//components/nacl:nacl_renderer",
80     ]
81   }
83   if (enable_plugins) {
84     sources +=
85         rebase_path(gypi_values.chrome_renderer_plugin_sources, ".", "..")
86     deps += [
87       "//components/pdf/renderer",
88       "//ppapi/host",
89       "//ppapi/proxy",
90       "//ppapi/proxy:ipc",
91       "//ppapi/shared_impl",
92     ]
93   }
95   if (safe_browsing_mode != 0) {
96     sources +=
97         rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
98                     ".",
99                     "..")
100     if (safe_browsing_mode == 1) {
101       sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
102                              ".",
103                              "..")
104       deps += [
105         "//chrome/common/safe_browsing:proto",
106         "//third_party/smhasher:murmurhash3",
107       ]
108     }
109   }
111   if (enable_extensions) {
112     sources +=
113         rebase_path(gypi_values.chrome_renderer_extensions_sources, ".", "..")
114     deps += [
115       # TODO(hclam): See crbug.com/298380 for details.
116       # We should isolate the APIs needed by the renderer.
117       "//chrome/common/extensions/api",
118       "//extensions:extensions_resources",
119       "//extensions/renderer",
120       "//media/cast:net",
121       "//media/cast:receiver",
122       "//media/cast:sender",
123       "//media/cast/logging/proto",
124     ]
125     if (!enable_webrtc) {
126       sources -= [
127         "media/cast_receiver_session.cc",
128         "media/cast_receiver_session.h",
129         "media/cast_rtp_stream.cc",
130         "media/cast_rtp_stream.h",
131       ]
132     }
133   }
134   if (enable_webrtc) {
135     sources +=
136         rebase_path(gypi_values.chrome_renderer_webrtc_sources, ".", "..")
137   }
138   if (enable_extensions && enable_webrtc) {
139     sources +=
140         rebase_path(gypi_values.chrome_renderer_webrtc_extensions_sources,
141                     ".",
142                     "..")
143   }
144   if (enable_spellcheck) {
145     sources +=
146         rebase_path(gypi_values.chrome_renderer_spellchecker_sources, ".", "..")
147     if (!is_android) {
148       deps += [ "//third_party/hunspell" ]
149     }
150   }
151   if (!use_browser_spellchecker) {
152     sources -= [
153       "spellchecker/platform_spelling_engine.cc",
154       "spellchecker/platform_spelling_engine.h",
155     ]
156   }
157   if (enable_basic_printing || enable_print_preview) {
158     deps += [ "//printing" ]
159     sources +=
160         rebase_path(gypi_values.chrome_renderer_printing_sources, ".", "..")
161     if (enable_print_preview) {
162       sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
163                              ".",
164                              "..")
165     }
166   }
168   if (is_mac) {
169     deps += [ "//third_party/mach_override" ]
170   }
171   if (is_win) {
172     deps += [ "//third_party/wtl" ]
173   }
174   if (is_android) {
175     sources -= [
176       "spellchecker/hunspell_engine.cc",
177       "spellchecker/hunspell_engine.h",
178     ]
179   }
182 # In GYP this is part of test_support_common.
183 source_set("test_support") {
184   testonly = true
185   visibility = [ "//chrome/test:test_support" ]
187   sources = [
188     "chrome_mock_render_thread.cc",
189     "chrome_mock_render_thread.h",
190     "safe_browsing/mock_feature_extractor_clock.cc",
191     "safe_browsing/mock_feature_extractor_clock.h",
192     "safe_browsing/test_utils.cc",
193     "safe_browsing/test_utils.h",
194   ]
196   deps = [
197     ":renderer",
198     "//content/test:test_support",
199     "//testing/gmock",
200     "//testing/gtest",
201   ]
203   if (enable_print_preview) {
204     deps += [ "//chrome/service" ]
205   }
207   if (enable_webrtc) {
208     sources += [
209       "media/mock_webrtc_logging_message_filter.cc",
210       "media/mock_webrtc_logging_message_filter.h",
211     ]
212   }