blob: ee8354b3ea3ac0280f84f5525572261986669505 [file] [log] [blame]
[email protected]6b9028ab2014-07-23 17:15:381# 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.
4
5import("//build/config/features.gni")
brettw4cab0f12015-09-14 21:40:016import("//build/config/sanitizers/sanitizers.gni")
[email protected]6b9028ab2014-07-23 17:15:387import("//build/config/ui.gni")
skobes502412ae2016-01-19 17:40:438import("//build/config/win/console_app.gni")
brettw2e2220c2015-07-21 18:56:359import("//build/config/win/manifest.gni")
alokpaa2fdfb72016-02-03 22:55:5410import("//media/media_options.gni")
ortunof78c8412016-03-31 18:59:5911import("//mojo/public/tools/bindings/mojom.gni")
brettw4b461082016-11-19 18:55:1612import("//ppapi/features/features.gni")
[email protected]6b9028ab2014-07-23 17:15:3813import("//tools/grit/repack.gni")
cjhopmancd7694af2014-09-08 00:00:0414import("//tools/grit/grit_rule.gni")
[email protected]6b9028ab2014-07-23 17:15:3815if (is_android) {
16 import("//build/config/android/config.gni")
rsesek20a58a62016-04-15 20:59:2317} else if (is_mac) {
18 import("//build/config/mac/rules.gni")
rsesek90112aa62016-05-03 17:33:3619 import("//build/mac/tweak_info_plist.gni")
jshin359df9c92016-07-30 06:59:4920 import("//third_party/icu/config.gni")
machenbachd65ec5c2016-07-22 09:05:2321 import("//v8/gni/v8.gni")
sebmarchanda2df3392016-07-13 15:34:5922} else if (is_win) {
23 import("//build/win/syzygy/syzygy.gni")
[email protected]6b9028ab2014-07-23 17:15:3824}
25
26declare_args() {
27 content_shell_product_name = "Content Shell"
esprehnb3789092015-11-24 19:46:0328 content_shell_version = "99.77.34.5"
[email protected]6b9028ab2014-07-23 17:15:3829}
30
thakisff2eab9c2015-11-13 00:29:5831config("content_shell_lib_warnings") {
32 if (is_clang) {
33 # TODO(thakis): Remove this once http://crbug.com/383820 is figured out
34 cflags = [ "-Wno-nonnull" ]
35 }
36}
37
[email protected]6b9028ab2014-07-23 17:15:3838static_library("content_shell_lib") {
Brett Wilson8f80ad0b2014-09-08 19:50:2439 testonly = true
[email protected]6b9028ab2014-07-23 17:15:3840 sources = [
dprankec6beb8392015-10-30 23:44:2141 "android/shell_descriptors.h",
[email protected]6b9028ab2014-07-23 17:15:3842 "android/shell_jni_registrar.cc",
43 "android/shell_jni_registrar.h",
44 "android/shell_manager.cc",
45 "android/shell_manager.h",
lukasza88e4b0b42016-02-25 21:42:1046 "app/blink_test_platform_support.h",
47 "app/blink_test_platform_support_android.cc",
48 "app/blink_test_platform_support_linux.cc",
49 "app/blink_test_platform_support_mac.mm",
50 "app/blink_test_platform_support_win.cc",
[email protected]6b9028ab2014-07-23 17:15:3851 "app/paths_mac.h",
52 "app/paths_mac.mm",
rseseka0a7a042014-09-18 23:59:2053 "app/shell_crash_reporter_client.cc",
54 "app/shell_crash_reporter_client.h",
[email protected]6b9028ab2014-07-23 17:15:3855 "app/shell_main_delegate.cc",
56 "app/shell_main_delegate.h",
57 "app/shell_main_delegate_mac.h",
58 "app/shell_main_delegate_mac.mm",
jochen5ce1af92016-02-17 20:39:4559 "browser/layout_test/blink_test_controller.cc",
60 "browser/layout_test/blink_test_controller.h",
ortunofd24faa2015-05-20 16:34:3761 "browser/layout_test/layout_test_bluetooth_adapter_provider.cc",
62 "browser/layout_test/layout_test_bluetooth_adapter_provider.h",
jyasskin8057c002015-09-10 19:09:5363 "browser/layout_test/layout_test_bluetooth_chooser_factory.cc",
64 "browser/layout_test/layout_test_bluetooth_chooser_factory.h",
ortunof78c8412016-03-31 18:59:5965 "browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc",
66 "browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h",
mkwstd993d06a2014-10-10 11:44:3867 "browser/layout_test/layout_test_browser_context.cc",
68 "browser/layout_test/layout_test_browser_context.h",
mkwst88e23182014-10-16 12:08:5869 "browser/layout_test/layout_test_browser_main.cc",
70 "browser/layout_test/layout_test_browser_main.h",
mkwst36b11b6f2014-10-15 16:18:5671 "browser/layout_test/layout_test_browser_main_parts.cc",
72 "browser/layout_test/layout_test_browser_main_parts.h",
petercd7abb42014-10-17 13:34:0173 "browser/layout_test/layout_test_content_browser_client.cc",
74 "browser/layout_test/layout_test_content_browser_client.h",
mkwst30d20d52014-10-09 13:33:1475 "browser/layout_test/layout_test_devtools_frontend.cc",
76 "browser/layout_test/layout_test_devtools_frontend.h",
mkwst94388f792014-10-16 07:36:5277 "browser/layout_test/layout_test_download_manager_delegate.cc",
78 "browser/layout_test/layout_test_download_manager_delegate.h",
ortuno10455542016-07-01 00:06:4379 "browser/layout_test/layout_test_first_device_bluetooth_chooser.cc",
80 "browser/layout_test/layout_test_first_device_bluetooth_chooser.h",
mkwst6efe7f2e62014-10-08 15:09:0181 "browser/layout_test/layout_test_javascript_dialog_manager.cc",
82 "browser/layout_test/layout_test_javascript_dialog_manager.h",
Peter Beverlooe8f2f9d2014-10-20 16:47:4983 "browser/layout_test/layout_test_message_filter.cc",
84 "browser/layout_test/layout_test_message_filter.h",
petercd7abb42014-10-17 13:34:0185 "browser/layout_test/layout_test_notification_manager.cc",
86 "browser/layout_test/layout_test_notification_manager.h",
mlamouri4e372022015-03-29 14:51:0687 "browser/layout_test/layout_test_permission_manager.cc",
88 "browser/layout_test/layout_test_permission_manager.h",
mvanouwerkerkde895c9c2014-12-06 12:17:3289 "browser/layout_test/layout_test_push_messaging_service.cc",
90 "browser/layout_test/layout_test_push_messaging_service.h",
mkwst002d02902014-10-09 10:17:0091 "browser/layout_test/layout_test_resource_dispatcher_host_delegate.cc",
92 "browser/layout_test/layout_test_resource_dispatcher_host_delegate.h",
mkwst94388f792014-10-16 07:36:5293 "browser/layout_test/layout_test_url_request_context_getter.cc",
94 "browser/layout_test/layout_test_url_request_context_getter.h",
lukasza8e550a02016-04-18 18:34:1795 "browser/layout_test/secondary_test_window_observer.cc",
96 "browser/layout_test/secondary_test_window_observer.h",
jochene9ba6dd2016-02-23 17:20:4997 "browser/layout_test/test_info_extractor.cc",
98 "browser/layout_test/test_info_extractor.h",
peter11d5f562014-10-23 23:12:2599 "browser/shell.cc",
100 "browser/shell.h",
101 "browser/shell_access_token_store.cc",
102 "browser/shell_access_token_store.h",
[email protected]6b9028ab2014-07-23 17:15:38103 "browser/shell_android.cc",
104 "browser/shell_application_mac.h",
105 "browser/shell_application_mac.mm",
106 "browser/shell_browser_context.cc",
107 "browser/shell_browser_context.h",
108 "browser/shell_browser_main.cc",
109 "browser/shell_browser_main.h",
110 "browser/shell_browser_main_parts.cc",
111 "browser/shell_browser_main_parts.h",
112 "browser/shell_browser_main_parts_mac.mm",
[email protected]6b9028ab2014-07-23 17:15:38113 "browser/shell_content_browser_client.cc",
114 "browser/shell_content_browser_client.h",
[email protected]6b9028ab2014-07-23 17:15:38115 "browser/shell_devtools_frontend.cc",
116 "browser/shell_devtools_frontend.h",
satorux7fa9d302015-02-16 00:44:52117 "browser/shell_devtools_manager_delegate.cc",
118 "browser/shell_devtools_manager_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38119 "browser/shell_download_manager_delegate.cc",
120 "browser/shell_download_manager_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38121 "browser/shell_javascript_dialog.h",
122 "browser/shell_javascript_dialog_mac.mm",
123 "browser/shell_javascript_dialog_manager.cc",
124 "browser/shell_javascript_dialog_manager.h",
125 "browser/shell_javascript_dialog_win.cc",
[email protected]6b9028ab2014-07-23 17:15:38126 "browser/shell_login_dialog.cc",
127 "browser/shell_login_dialog.h",
128 "browser/shell_login_dialog_mac.mm",
129 "browser/shell_mac.mm",
[email protected]6b9028ab2014-07-23 17:15:38130 "browser/shell_net_log.cc",
131 "browser/shell_net_log.h",
132 "browser/shell_network_delegate.cc",
133 "browser/shell_network_delegate.h",
mlamouri4e372022015-03-29 14:51:06134 "browser/shell_permission_manager.cc",
135 "browser/shell_permission_manager.h",
[email protected]6b9028ab2014-07-23 17:15:38136 "browser/shell_platform_data_aura.cc",
137 "browser/shell_platform_data_aura.h",
138 "browser/shell_plugin_service_filter.cc",
139 "browser/shell_plugin_service_filter.h",
140 "browser/shell_quota_permission_context.cc",
141 "browser/shell_quota_permission_context.h",
142 "browser/shell_resource_dispatcher_host_delegate.cc",
143 "browser/shell_resource_dispatcher_host_delegate.h",
144 "browser/shell_speech_recognition_manager_delegate.cc",
145 "browser/shell_speech_recognition_manager_delegate.h",
146 "browser/shell_url_request_context_getter.cc",
147 "browser/shell_url_request_context_getter.h",
satorux7fa9d302015-02-16 00:44:52148 "browser/shell_web_contents_view_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38149 "browser/shell_web_contents_view_delegate_android.cc",
150 "browser/shell_web_contents_view_delegate_creator.h",
[email protected]6b9028ab2014-07-23 17:15:38151 "browser/shell_web_contents_view_delegate_mac.mm",
lukasza80f7f602016-03-22 23:13:19152 "common/layout_test/layout_test_content_client.cc",
153 "common/layout_test/layout_test_content_client.h",
petere04203592014-10-27 17:57:35154 "common/layout_test/layout_test_messages.cc",
155 "common/layout_test/layout_test_messages.h",
lukasza381b0492016-03-10 16:48:43156 "common/layout_test/layout_test_switches.cc",
157 "common/layout_test/layout_test_switches.h",
[email protected]6b9028ab2014-07-23 17:15:38158 "common/leak_detection_result.h",
159 "common/shell_content_client.cc",
160 "common/shell_content_client.h",
161 "common/shell_messages.cc",
162 "common/shell_messages.h",
iclelland186a8962016-06-22 16:06:20163 "common/shell_origin_trial_policy.cc",
164 "common/shell_origin_trial_policy.h",
[email protected]6b9028ab2014-07-23 17:15:38165 "common/shell_switches.cc",
166 "common/shell_switches.h",
tfarina685c39802015-05-04 22:11:22167 "renderer/layout_test/blink_test_helpers.cc",
168 "renderer/layout_test/blink_test_helpers.h",
tfarina8e08285f2015-05-02 03:17:39169 "renderer/layout_test/blink_test_runner.cc",
170 "renderer/layout_test/blink_test_runner.h",
sammc9b9e5b42016-10-12 12:32:32171 "renderer/layout_test/interface_registry_js_wrapper.cc",
172 "renderer/layout_test/interface_registry_js_wrapper.h",
mkwst02ec0d62014-10-07 22:07:29173 "renderer/layout_test/layout_test_content_renderer_client.cc",
174 "renderer/layout_test/layout_test_content_renderer_client.h",
mkwst3e72c1f2014-10-08 05:02:36175 "renderer/layout_test/layout_test_render_frame_observer.cc",
176 "renderer/layout_test/layout_test_render_frame_observer.h",
tyoshino832a58a2016-04-18 08:14:08177 "renderer/layout_test/layout_test_render_thread_observer.cc",
178 "renderer/layout_test/layout_test_render_thread_observer.h",
mkwst04b72d12014-10-08 15:52:55179 "renderer/layout_test/leak_detector.cc",
180 "renderer/layout_test/leak_detector.h",
jochen51265132015-05-28 07:33:45181 "renderer/layout_test/test_media_stream_renderer_factory.cc",
182 "renderer/layout_test/test_media_stream_renderer_factory.h",
chfremerbcfff0212016-06-06 18:29:41183 "renderer/layout_test/test_media_stream_video_renderer.cc",
184 "renderer/layout_test/test_media_stream_video_renderer.h",
[email protected]6b9028ab2014-07-23 17:15:38185 "renderer/shell_content_renderer_client.cc",
186 "renderer/shell_content_renderer_client.h",
[email protected]6b9028ab2014-07-23 17:15:38187 "renderer/shell_render_view_observer.cc",
188 "renderer/shell_render_view_observer.h",
rockotb814a582015-06-05 00:30:52189 "utility/shell_content_utility_client.cc",
190 "utility/shell_content_utility_client.h",
[email protected]6b9028ab2014-07-23 17:15:38191 ]
192
brettwbc8b2a22015-07-28 18:24:42193 configs += [
thakisff2eab9c2015-11-13 00:29:58194 ":content_shell_lib_warnings",
brettwbc8b2a22015-07-28 18:24:42195 "//build/config:precompiled_headers",
196
197 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
198 "//build/config/compiler:no_size_t_to_int_warning",
199 ]
brettwd1c719a2015-02-19 23:17:04200
xhwang41f1d0e2016-11-11 08:16:36201 if (enable_mojo_media) {
202 configs += [ "//media/mojo/services:mojo_media_config" ]
203 }
204
[email protected]6b9028ab2014-07-23 17:15:38205 defines = [ "CONTENT_SHELL_VERSION=\"$content_shell_version\"" ]
206
Brett Wilson0380637c2014-09-19 21:24:40207 public_deps = [
208 # This exposes all public content APIs.
209 "//content/public/app:both",
210 "//content/public/browser",
211 "//content/public/common",
Brett Wilson0380637c2014-09-19 21:24:40212 "//content/public/renderer",
213 "//content/public/utility",
214 ]
[email protected]6b9028ab2014-07-23 17:15:38215 deps = [
ortunof78c8412016-03-31 18:59:59216 ":mojo_bindings",
[email protected]6b9028ab2014-07-23 17:15:38217 ":resources",
218 "//base",
219 "//base:base_static",
[email protected]6b9028ab2014-07-23 17:15:38220 "//base/third_party/dynamic_annotations",
221 "//cc",
xhwangbcd685812016-09-22 23:35:55222 "//components/cdm/renderer",
scottmgcfa5b01b2015-11-30 23:13:46223 "//components/crash/content/app:app_breakpad_mac_win_to_be_deleted",
juliatuttleca57a11b2016-11-15 19:07:53224 "//components/keyed_service/content",
chrishtr8a377e62015-06-01 19:20:08225 "//components/plugins/renderer",
rsleevi24f64dc22015-08-07 21:39:21226 "//components/url_formatter",
hanxi149b92d2014-09-11 21:57:18227 "//components/web_cache/renderer",
[email protected]6b9028ab2014-07-23 17:15:38228 "//content:resources",
[email protected]a9ca8d52014-08-22 10:21:08229 "//content/app/resources",
[email protected]6586a2e32014-08-09 19:24:12230 "//content/app/strings",
[email protected]6b9028ab2014-07-23 17:15:38231 "//content/gpu",
ben51bb6c62016-11-17 20:15:57232 "//content/public/common:service_names",
dcheng59826e32017-02-22 10:31:36233 "//content/shell/test_runner:test_runner",
brettw6b0712a2016-07-15 17:48:20234 "//content/test:content_test_mojo_bindings",
[email protected]6b9028ab2014-07-23 17:15:38235 "//content/test:layouttest_support",
brettwb78fc9e2016-03-25 21:02:51236 "//content/test:test_support",
dpranke93211fc2015-04-29 04:59:42237 "//device/bluetooth",
ortunofd24faa2015-05-20 16:34:37238 "//device/bluetooth:mocks",
lethalantidote893681c2016-09-13 19:36:31239 "//device/geolocation",
[email protected]6b9028ab2014-07-23 17:15:38240 "//gin",
241 "//gpu",
242 "//ipc",
243 "//media",
chfremerb689c2a2016-10-27 23:04:46244 "//media/capture",
sammc9b9e5b42016-10-12 12:32:32245 "//mojo/edk/js",
[email protected]6b9028ab2014-07-23 17:15:38246 "//net",
247 "//net:net_resources",
brettw4b461082016-11-19 18:55:16248 "//ppapi/features",
brettw6b0712a2016-07-15 17:48:20249 "//sandbox",
rockot734fb662016-10-15 16:41:30250 "//services/service_manager/public/cpp",
[email protected]6b9028ab2014-07-23 17:15:38251 "//skia",
pilgrim4af8c212014-09-05 17:30:15252 "//storage/browser",
ortunofd24faa2015-05-20 16:34:37253 "//testing/gmock",
254 "//testing/gtest",
[email protected]6b9028ab2014-07-23 17:15:38255 "//third_party/WebKit/public:blink",
brettwcb4ab75a2016-11-02 19:25:59256 "//third_party/WebKit/public:features",
erga3c614c92015-04-03 17:47:51257 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46258 "//third_party/WebKit/public:resources",
[email protected]0e043592014-07-28 19:47:04259 "//third_party/WebKit/public:test_support",
[email protected]4eebe74d2014-08-13 02:54:46260 "//third_party/icu",
[email protected]6b9028ab2014-07-23 17:15:38261 "//ui/base",
spang1c36fac2015-02-05 19:55:12262 "//ui/base/ime",
brettw6b0712a2016-07-15 17:48:20263 "//ui/display",
[email protected]6b9028ab2014-07-23 17:15:38264 "//ui/events:events_base",
265 "//ui/gfx",
266 "//ui/gfx/geometry",
267 "//ui/gfx/ipc",
fsamuel6b98cf92016-04-28 05:42:24268 "//ui/gfx/ipc/geometry",
markdittmer99d77bf2016-03-31 19:03:24269 "//ui/gfx/ipc/skia",
[email protected]6b9028ab2014-07-23 17:15:38270 "//ui/gl",
271 "//url",
272 "//v8",
[email protected]6b9028ab2014-07-23 17:15:38273 ]
brettw6b0712a2016-07-15 17:48:20274
275 # Annoyingly, this target and layouttest_support have circular includes.
276 allow_circular_includes_from = [ "//content/test:layouttest_support" ]
277
jamesr50081742014-09-09 07:52:22278 if (enable_plugins) {
dcheng0d93c1a2015-12-03 02:46:41279 deps += [
enne7b64edf32017-02-16 20:10:02280 "//cc/paint",
dcheng0d93c1a2015-12-03 02:46:41281 "//content/ppapi_plugin",
dchengc70b36e2016-03-02 02:36:10282 "//ppapi:blink_deprecated_test_plugin",
dcheng0d93c1a2015-12-03 02:46:41283 "//ppapi:blink_test_plugin",
brettwb78fc9e2016-03-25 21:02:51284 "//ppapi/shared_impl",
dcheng0d93c1a2015-12-03 02:46:41285 ]
jamesr50081742014-09-09 07:52:22286 }
xhwangbe720032016-02-19 18:45:31287 if (mojo_media_host == "browser") {
xhwangd3b5d3f2016-05-18 03:37:59288 deps += [ "//media/mojo/services" ]
alokpaa2fdfb72016-02-03 22:55:54289 }
[email protected]6b9028ab2014-07-23 17:15:38290
291 if (is_win) {
vchigrin61944ae2015-01-30 23:51:32292 sources += [
293 "common/v8_breakpad_support_win.cc",
294 "common/v8_breakpad_support_win.h",
295 ]
[email protected]6b9028ab2014-07-23 17:15:38296 }
297
298 if (is_linux) {
brettwb78fc9e2016-03-25 21:02:51299 deps += [
300 "//build/linux:fontconfig",
301 "//ui/gfx:test_support",
302 ]
[email protected]6b9028ab2014-07-23 17:15:38303 }
304
305 if (use_x11) {
[email protected]c7990dbf2014-07-23 22:35:10306 # Some tests rely on this tool at runtime. Note: it might be better if
307 # the tests that needed it had this as a dep instead of adding it here.
kylecharad714872016-04-20 16:09:52308 deps += [ "//ui/events/devices/x11" ]
[email protected]6b9028ab2014-07-23 17:15:38309 }
310
311 if (is_android) {
jbudorick2d40c48d2017-01-09 21:05:00312 sources += [
313 "browser/layout_test/scoped_android_configuration.cc",
314 "browser/layout_test/scoped_android_configuration.h",
315 ]
316 deps += [
317 "//base/test:test_support",
318 "//content/shell/android:content_shell_jni_headers",
319 ]
[email protected]6b9028ab2014-07-23 17:15:38320 }
321
torne1b1c9782015-03-30 20:49:00322 if (is_posix && !is_mac) {
brettwb78fc9e2016-03-25 21:02:51323 deps += [
324 "//components/crash/content/app",
325 "//components/crash/content/browser",
326 ]
[email protected]6b9028ab2014-07-23 17:15:38327 }
328
329 if (use_aura) {
330 deps += [
bend9063072016-11-12 01:32:51331 "//services/navigation",
[email protected]6b9028ab2014-07-23 17:15:38332 "//ui/aura",
333 "//ui/aura:test_support",
334 "//ui/events",
335 "//ui/strings",
336 "//ui/wm",
337 ]
338
339 if (toolkit_views) {
mohsen6eb57fb2016-07-22 03:14:08340 sources += [
341 "browser/shell_views.cc",
342 "browser/shell_web_contents_view_delegate_views.cc",
343 ]
[email protected]6b9028ab2014-07-23 17:15:38344 deps += [
345 "//ui/resources",
[email protected]6b9028ab2014-07-23 17:15:38346 "//ui/views",
347 "//ui/views:test_support",
agrieved7a71c882015-11-20 19:53:28348 "//ui/views/controls/webview",
brettwb78fc9e2016-03-25 21:02:51349 "//ui/wm:test_support",
[email protected]6b9028ab2014-07-23 17:15:38350 ]
351 } else {
mohsen6eb57fb2016-07-22 03:14:08352 sources += [
353 "browser/shell_aura.cc",
354 "browser/shell_web_contents_view_delegate_aura.cc",
355 ]
[email protected]6b9028ab2014-07-23 17:15:38356 }
James Robinson060f2e32014-09-10 22:31:37357 } else {
358 sources -= [
359 "browser/shell_platform_data_aura.cc",
360 "browser/shell_platform_data_aura.h",
361 ]
[email protected]6b9028ab2014-07-23 17:15:38362 }
363
[email protected]6b9028ab2014-07-23 17:15:38364 if (is_chromeos) {
365 deps += [
mukai6ba73552014-10-09 19:05:17366 "//chromeos",
[email protected]6b9028ab2014-07-23 17:15:38367 "//ui/wm:test_support",
[email protected]6b9028ab2014-07-23 17:15:38368 ]
369 }
370
bcf0ddf78a2016-02-02 18:52:21371 if (is_linux) {
drottfe896a82017-03-06 12:12:54372 deps += [ "//third_party/freetype" ]
[email protected]6b9028ab2014-07-23 17:15:38373 }
374
375 if (!enable_plugins) {
376 sources -= [
377 "browser/shell_plugin_service_filter.cc",
378 "browser/shell_plugin_service_filter.h",
379 ]
380 }
381}
382
383grit("content_shell_resources_grit") {
brettwb78fc9e2016-03-25 21:02:51384 # External code should depend on ":resources" instead.
brettw9af42622014-09-06 21:21:02385 visibility = [ ":*" ]
[email protected]6b9028ab2014-07-23 17:15:38386 source = "shell_resources.grd"
387 outputs = [
388 "grit/shell_resources.h",
389 "shell_resources.pak",
[email protected]6b9028ab2014-07-23 17:15:38390 ]
391}
392
393copy("copy_shell_resources") {
scottmg7afc4092014-12-03 19:22:42394 sources = [
395 "$target_gen_dir/shell_resources.pak",
396 ]
scottmg34fb7e52014-12-03 23:27:24397 outputs = [
398 "$root_out_dir/shell_resources.pak",
399 ]
[email protected]6b9028ab2014-07-23 17:15:38400
scottmg7afc4092014-12-03 19:22:42401 public_deps = [
402 ":content_shell_resources_grit",
403 ]
[email protected]6b9028ab2014-07-23 17:15:38404}
405
[email protected]6b9028ab2014-07-23 17:15:38406group("resources") {
Brett Wilsone53895272014-09-23 23:41:46407 public_deps = [
[email protected]6b9028ab2014-07-23 17:15:38408 ":copy_shell_resources",
409 ]
tansellfa690732016-11-26 07:06:32410 deps = [
dcheng59826e32017-02-22 10:31:36411 "//content/shell/test_runner:resources",
tansellfa690732016-11-26 07:06:32412 ]
tansell08c74c92016-11-02 05:45:47413 data_deps = [
dcheng59826e32017-02-22 10:31:36414 "//content/shell/test_runner:resources",
tansell08c74c92016-11-02 05:45:47415 ]
[email protected]6b9028ab2014-07-23 17:15:38416}
417
418repack("pak") {
419 sources = [
erga3c614c92015-04-03 17:47:51420 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
421 "$root_gen_dir/blink/public/resources/blink_resources.pak",
[email protected]a9ca8d52014-08-22 10:21:08422 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
[email protected]6586a2e32014-08-09 19:24:12423 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
[email protected]6b9028ab2014-07-23 17:15:38424 "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
[email protected]6586a2e32014-08-09 19:24:12425 "$root_gen_dir/content/content_resources.pak",
[email protected]6b9028ab2014-07-23 17:15:38426 "$root_gen_dir/content/shell/shell_resources.pak",
427 "$root_gen_dir/net/net_resources.pak",
428 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
429 "$root_gen_dir/ui/resources/webui_resources.pak",
430 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
431 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
[email protected]6b9028ab2014-07-23 17:15:38432 ]
433
434 deps = [
435 ":resources",
436 "//content:resources",
[email protected]a9ca8d52014-08-22 10:21:08437 "//content/app/resources",
[email protected]6586a2e32014-08-09 19:24:12438 "//content/app/strings",
[email protected]6b9028ab2014-07-23 17:15:38439 "//content/browser/tracing:resources",
440 "//net:net_resources",
erga3c614c92015-04-03 17:47:51441 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46442 "//third_party/WebKit/public:resources",
[email protected]6b9028ab2014-07-23 17:15:38443 "//ui/resources",
444 "//ui/strings",
[email protected]6b9028ab2014-07-23 17:15:38445 ]
446
sadrul7bd20c92015-06-24 16:45:44447 if (toolkit_views) {
448 deps += [ "//ui/views/resources" ]
449 sources +=
450 [ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ]
451 }
452
thakis300faa72017-02-28 23:59:43453 sources += [ "$root_gen_dir/content/browser/devtools/devtools_resources.pak" ]
cjhopman2fd48fd2014-09-24 00:52:56454 deps += [ "//content/browser/devtools:resources" ]
455 output = "$root_out_dir/content_shell.pak"
[email protected]6b9028ab2014-07-23 17:15:38456}
457
agrieve993374cf2016-04-13 00:05:39458if (is_android) {
459 group("content_shell") {
460 testonly = true
461 deps = [
462 "//content/shell/android:content_shell_apk",
463 ]
464 }
465} else if (is_mac) {
rsesek90112aa62016-05-03 17:33:36466 tweak_info_plist("content_shell_plist") {
467 testonly = true
468 info_plist = "app/app-Info.plist"
469 args = [
470 "--scm=1",
471 "--version",
472 content_shell_version,
473 ]
474 }
rsesek7f9d12b2016-04-29 02:45:56475 mac_app_bundle("content_shell") {
agrieve993374cf2016-04-13 00:05:39476 testonly = true
rsesek7f9d12b2016-04-29 02:45:56477 output_name = content_shell_product_name
478 sources = [
479 "app/shell_main.cc",
agrieve993374cf2016-04-13 00:05:39480 ]
rsesek7f9d12b2016-04-29 02:45:56481 deps = [
482 ":content_shell_framework_bundle_data",
483 ":content_shell_resources_bundle_data",
rsesek1cfe20c32016-07-27 17:44:51484 "//build/config/sanitizers:deps",
rsesek7f9d12b2016-04-29 02:45:56485
486 # TODO(rsesek): Remove this after GYP is gone, since it only needs to
487 # be here per the comment in blink_test_platform_support_mac.mm about
488 # the bundle structure.
dcheng59826e32017-02-22 10:31:36489 "//content/shell/test_runner:resources",
rsesek7f9d12b2016-04-29 02:45:56490 ]
rsesek6a8a5d02016-06-21 01:16:18491 ldflags = [
492 # The main app is at Content Shell.app/Contents/MacOS/Content Shell
493 # so set the rpath up to Contents/ so that the loader can find
494 # Framworks/.
495 "-rpath",
496 "@executable_path/../",
497 ]
rsesek90112aa62016-05-03 17:33:36498 info_plist_target = ":content_shell_plist"
agrieve993374cf2016-04-13 00:05:39499 }
500} else {
scottmg7afc4092014-12-03 19:22:42501 executable("content_shell") {
502 testonly = true
James Robinson060f2e32014-09-10 22:31:37503
scottmg7afc4092014-12-03 19:22:42504 sources = [
scottmg7afc4092014-12-03 19:22:42505 "app/shell_main.cc",
506 ]
[email protected]6b9028ab2014-07-23 17:15:38507
brucedawsond4fde4c2016-05-02 19:03:58508 if (is_win) {
509 sources += [ "app/shell.rc" ]
510 }
511
skobes502412ae2016-01-19 17:40:43512 defines = []
513
scottmg7afc4092014-12-03 19:22:42514 deps = [
515 ":content_shell_lib",
tansellfa690732016-11-26 07:06:32516 ":pak",
brettwba7a73d2015-08-31 22:17:39517 "//build/config/sanitizers:deps",
brettw2e2220c2015-07-21 18:56:35518 "//build/win:default_exe_manifest",
scottmg7afc4092014-12-03 19:22:42519 ]
[email protected]6b9028ab2014-07-23 17:15:38520
tansell08c74c92016-11-02 05:45:47521 data_deps = [
522 ":pak",
523 ]
524
scottmg7afc4092014-12-03 19:22:42525 if (is_win) {
526 deps += [ "//sandbox" ]
brucedawsond4fde4c2016-05-02 19:03:58527
528 # This is a large module that can't do incremental linking in some cases.
529 configs -= [ "//build/config/win:default_incremental_linking" ]
530 configs +=
531 [ "//build/config/win:default_large_module_incremental_linking" ]
skobes502412ae2016-01-19 17:40:43532 if (win_console_app) {
533 defines += [ "WIN_CONSOLE_APP" ]
534 } else {
535 # Set /SUBSYSTEM:WINDOWS unless a console build has been requested.
scottmg7afc4092014-12-03 19:22:42536 configs -= [ "//build/config/win:console" ]
537 configs += [ "//build/config/win:windowed" ]
538 }
539 }
540
wangxianzhu1a34fa32016-03-10 21:03:00541 if (is_linux && !is_component_build) {
542 # Set rpath to find our own libfreetype even in a non-component build.
543 configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
544 }
[email protected]6b9028ab2014-07-23 17:15:38545 }
James Robinson060f2e32014-09-10 22:31:37546}
tfarina10ae51f62015-05-13 03:35:57547
tfarina795e01a2015-05-15 19:29:57548if (is_win) {
brettw0d3b1df2015-12-03 00:10:01549 executable("content_shell_crash_service") {
tfarina795e01a2015-05-15 19:29:57550 sources = [
551 "tools/content_shell_crash_service.cc",
552 ]
553
554 deps = [
555 "//base",
brettwba7a73d2015-08-31 22:17:39556 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07557 "//build/win:default_exe_manifest",
sdefresne8ba0b88c2015-09-18 10:33:13558 "//components/crash/content/tools:crash_service",
tfarina795e01a2015-05-15 19:29:57559 ]
560
561 configs -= [ "//build/config/win:console" ]
562 configs += [ "//build/config/win:windowed" ]
563 }
sebmarchanda2df3392016-07-13 15:34:59564
565 if (is_syzyasan) {
566 syzygy_asan("content_shell_syzyasan") {
567 binary_name = "content_shell.exe"
568 dest_dir = "$root_out_dir/syzygy"
569 deps = [
570 "//content/shell:content_shell",
571 ]
572 testonly = true
573 }
574 }
tfarina795e01a2015-05-15 19:29:57575}
brettwe1d40652015-10-23 23:06:10576
577if (is_mac) {
rsesek7f9d12b2016-04-29 02:45:56578 mac_xib_bundle_data("content_shell_framework_xibs") {
579 sources = [
580 "app/English.lproj/HttpAuth.xib",
581 "app/English.lproj/MainMenu.xib",
582 ]
583 output_path = "{{bundle_resources_dir}}/English.lproj"
584 }
585
586 bundle_data("content_shell_framework_resources") {
587 sources = [
588 "$root_out_dir/content_shell.pak",
rsesek7f9d12b2016-04-29 02:45:56589 "resources/missingImage.png",
590 "resources/textAreaResizeCorner.png",
591 ]
592
593 public_deps = [
594 ":pak",
595 ]
596
jshin359df9c92016-07-30 06:59:49597 if (icu_use_data_file) {
598 sources += [ "$root_out_dir/icudtl.dat" ]
599 deps = [
600 "//third_party/icu:icudata",
601 ]
602 }
rsesek7f9d12b2016-04-29 02:45:56603
604 if (v8_use_external_startup_data) {
605 sources += [
606 "$root_out_dir/natives_blob.bin",
607 "$root_out_dir/snapshot_blob.bin",
608 ]
609 public_deps += [ "//v8" ]
610 }
611
612 outputs = [
613 "{{bundle_resources_dir}}/{{source_file_part}}",
614 ]
615 }
616
617 if (enable_plugins) {
618 bundle_data("content_shell_framework_plugins") {
619 sources = [
620 "$root_out_dir/blink_deprecated_test_plugin.plugin",
621 "$root_out_dir/blink_test_plugin.plugin",
622 ]
623
624 outputs = [
625 "{{bundle_root_dir}}/{{source_file_part}}",
626 ]
627
628 public_deps = [
629 "//ppapi:blink_deprecated_test_plugin",
630 "//ppapi:blink_test_plugin",
631 ]
632 }
633 }
634
635 content_shell_framework_name = "$content_shell_product_name Framework"
636 content_shell_helper_name = "$content_shell_product_name Helper"
637
rsesek90112aa62016-05-03 17:33:36638 tweak_info_plist("content_shell_framework_plist") {
639 testonly = true
640 info_plist = "app/framework-Info.plist"
641 args = [
mark8ecf7882016-08-02 17:46:32642 "--breakpad=0",
rsesek90112aa62016-05-03 17:33:36643 "--keystone=0",
644 "--scm=1",
645 "--version",
646 content_shell_version,
647 "--branding",
648 content_shell_product_name,
649 ]
650 }
651
rsesek7f9d12b2016-04-29 02:45:56652 mac_framework_bundle("content_shell_framework") {
brettwe1d40652015-10-23 23:06:10653 testonly = true
654
rsesek7f9d12b2016-04-29 02:45:56655 output_name = content_shell_framework_name
brettwe1d40652015-10-23 23:06:10656
657 sources = [
tfarinac708f3972015-10-25 17:42:50658 "app/shell_content_main.cc",
659 "app/shell_content_main.h",
brettwe1d40652015-10-23 23:06:10660 ]
661
rsesek7f9d12b2016-04-29 02:45:56662 # TODO(rsesek): Handle these missing pieces:
663 # - crash_inspector
664 # - crash_report_sender.app
665
brettw6b0712a2016-07-15 17:48:20666 public_deps = [
667 ":content_shell_lib",
668 ]
brettwe1d40652015-10-23 23:06:10669 deps = [
rsesek7f9d12b2016-04-29 02:45:56670 ":content_shell_framework_resources",
671 ":content_shell_framework_xibs",
rsesek7f9d12b2016-04-29 02:45:56672 "//third_party/icu:icudata",
brettwe1d40652015-10-23 23:06:10673 ]
rsesek7f9d12b2016-04-29 02:45:56674
675 if (enable_plugins) {
676 deps += [ ":content_shell_framework_plugins" ]
677 }
678
rsesek6a8a5d02016-06-21 01:16:18679 # Both the main :content_shell and :content_shell_helper_app executables
680 # need to link the framework. Because they are at different directory
681 # depths, using @executable_path as the install_name would require using
682 # install_name_tool on one of the executables. However install_name_tool
683 # only operates in-place, which is problematic to express in GN. Instead,
684 # use rpath-based loading.
685 # TODO(rsesek): After GYP is gone, re-write content_shell_main to be like
686 # chrome_main and use dlopen() instead of a linked framework.
687 ldflags = [ "-Wl,-install_name,@rpath/Frameworks/$output_name.framework/$output_name" ]
688
689 if (is_component_build) {
690 # Set up the rpath for the framework so that it can find dylibs in the
691 # root output directory. The framework is at
692 # Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Content Shell Framework
693 # so use loader_path to go back to the root output directory.
694 ldflags += [
695 "-rpath",
696 "@loader_path/../../../..",
697 ]
698 }
rsesek7f9d12b2016-04-29 02:45:56699
rsesek90112aa62016-05-03 17:33:36700 info_plist_target = ":content_shell_framework_plist"
701 }
702
703 tweak_info_plist("content_shell_helper_plist") {
704 testonly = true
705 info_plist = "app/helper-Info.plist"
706 args = [
707 "--breakpad=0",
708 "--keystone=0",
709 "--scm=0",
710 "--version",
711 content_shell_version,
712 ]
brettwe1d40652015-10-23 23:06:10713 }
rsesek20a58a62016-04-15 20:59:23714
715 mac_app_bundle("content_shell_helper_app") {
716 testonly = true
rsesek7f9d12b2016-04-29 02:45:56717 output_name = content_shell_helper_name
rsesek20a58a62016-04-15 20:59:23718 sources = [
719 "app/shell_main.cc",
720 ]
721 deps = [
rsesek7f9d12b2016-04-29 02:45:56722 ":content_shell_framework+link",
rsesek1cfe20c32016-07-27 17:44:51723 "//build/config/sanitizers:deps",
rsesek20a58a62016-04-15 20:59:23724 ]
rsesek02aa51c2016-05-11 02:13:57725 ldflags = [
726 # The helper is in Content Shell.app/Contents/Frameworks/Content Shell Helper.app/Contents/MacOS/
rsesek6a8a5d02016-06-21 01:16:18727 # so set rpath up to Contents/ so that the loader can find Frameworks/.
rsesek02aa51c2016-05-11 02:13:57728 "-rpath",
rsesek6a8a5d02016-06-21 01:16:18729 "@executable_path/../../../..",
rsesek02aa51c2016-05-11 02:13:57730 ]
rsesek90112aa62016-05-03 17:33:36731 info_plist_target = ":content_shell_helper_plist"
rsesek20a58a62016-04-15 20:59:23732 }
rsesek7f9d12b2016-04-29 02:45:56733
rsesek7f9d12b2016-04-29 02:45:56734 bundle_data("content_shell_framework_bundle_data") {
735 testonly = true
736 sources = [
737 "$root_out_dir/$content_shell_framework_name.framework",
738 "$root_out_dir/$content_shell_helper_name.app",
739 ]
740 outputs = [
741 "{{bundle_root_dir}}/Frameworks/{{source_file_part}}",
742 ]
743 public_deps = [
744 ":content_shell_framework+link",
rsesek6a8a5d02016-06-21 01:16:18745 ":content_shell_helper_app",
rsesek7f9d12b2016-04-29 02:45:56746 ]
747 }
748
749 bundle_data("content_shell_resources_bundle_data") {
750 testonly = true
751 sources = [
752 "app/app.icns",
753 ]
754 outputs = [
755 "{{bundle_resources_dir}}/{{source_file_part}}",
756 ]
757 }
brettwe1d40652015-10-23 23:06:10758}
ortunof78c8412016-03-31 18:59:59759
760mojom("mojo_bindings") {
761 sources = [
jiamengd5186432017-02-08 01:48:22762 "common/layout_test.mojom",
ortunof78c8412016-03-31 18:59:59763 "common/layout_test/layout_test_bluetooth_fake_adapter_setter.mojom",
764 ]
jiamengd5186432017-02-08 01:48:22765 public_deps = [
766 "//mojo/common:common_custom_types",
767 "//ui/gfx/geometry/mojo",
768 "//url/mojo:url_mojom_gurl",
769 ]
ortunof78c8412016-03-31 18:59:59770}
jochen0426747e2017-02-09 17:01:19771
772group("content_shell_crash_test") {
773 testonly = true
774 data_deps = [
775 ":content_shell",
776 "//third_party/mesa:osmesa",
777 ]
778 data = [
779 "//content/shell/tools/breakpad_integration_test.py",
780 "//testing/scripts/common.py",
781 "//testing/scripts/content_shell_crash_test.py",
782 "//testing/xvfb.py",
783 ]
784 if (is_posix) {
785 data += [
786 "//components/crash/content/tools/generate_breakpad_symbols.py",
787 "//components/crash/content/tools/dmp2minidump.py",
788 ]
789 }
790 if (is_win) {
791 data_deps += [ ":content_shell_crash_service" ]
792 }
793 if (is_posix && !is_android) {
794 data_deps += [
795 "//breakpad:dump_syms($host_toolchain)",
796 "//breakpad:minidump_stackwalk($host_toolchain)",
797 ]
798 }
799 if (is_android) {
800 data_deps += [
801 "//breakpad:dump_syms",
802 "//breakpad:microdump_stackwalk",
803 "//breakpad:minidump_dump",
804 "//breakpad:minidump_stackwalk",
805 "//breakpad:symupload",
806 "//tools/android/forwarder2",
807 ]
808 }
809}