blob: 43c7ea1d69506d7f395a6d66cafad487d08c9582 [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")
[email protected]6b9028ab2014-07-23 17:15:3812import("//tools/grit/repack.gni")
cjhopmancd7694af2014-09-08 00:00:0413import("//tools/grit/grit_rule.gni")
[email protected]6b9028ab2014-07-23 17:15:3814if (is_android) {
15 import("//build/config/android/config.gni")
rsesek20a58a62016-04-15 20:59:2316} else if (is_mac) {
17 import("//build/config/mac/rules.gni")
rsesek7f9d12b2016-04-29 02:45:5618 import("//build_overrides/v8.gni")
rsesek90112aa62016-05-03 17:33:3619 import("//build/mac/tweak_info_plist.gni")
[email protected]6b9028ab2014-07-23 17:15:3820}
21
22declare_args() {
23 content_shell_product_name = "Content Shell"
esprehnb3789092015-11-24 19:46:0324 content_shell_version = "99.77.34.5"
[email protected]6b9028ab2014-07-23 17:15:3825}
26
thakisff2eab9c2015-11-13 00:29:5827config("content_shell_lib_warnings") {
28 if (is_clang) {
29 # TODO(thakis): Remove this once http://crbug.com/383820 is figured out
30 cflags = [ "-Wno-nonnull" ]
31 }
32}
33
[email protected]6b9028ab2014-07-23 17:15:3834static_library("content_shell_lib") {
Brett Wilson8f80ad0b2014-09-08 19:50:2435 testonly = true
[email protected]6b9028ab2014-07-23 17:15:3836 sources = [
dprankec6beb8392015-10-30 23:44:2137 "android/shell_descriptors.h",
[email protected]6b9028ab2014-07-23 17:15:3838 "android/shell_jni_registrar.cc",
39 "android/shell_jni_registrar.h",
40 "android/shell_manager.cc",
41 "android/shell_manager.h",
lukasza88e4b0b42016-02-25 21:42:1042 "app/blink_test_platform_support.h",
43 "app/blink_test_platform_support_android.cc",
44 "app/blink_test_platform_support_linux.cc",
45 "app/blink_test_platform_support_mac.mm",
46 "app/blink_test_platform_support_win.cc",
[email protected]6b9028ab2014-07-23 17:15:3847 "app/paths_mac.h",
48 "app/paths_mac.mm",
rseseka0a7a042014-09-18 23:59:2049 "app/shell_crash_reporter_client.cc",
50 "app/shell_crash_reporter_client.h",
[email protected]6b9028ab2014-07-23 17:15:3851 "app/shell_main_delegate.cc",
52 "app/shell_main_delegate.h",
53 "app/shell_main_delegate_mac.h",
54 "app/shell_main_delegate_mac.mm",
jochen5ce1af92016-02-17 20:39:4555 "browser/layout_test/blink_test_controller.cc",
56 "browser/layout_test/blink_test_controller.h",
mkwstd6805d0d2014-10-16 14:44:3757 "browser/layout_test/layout_test_android.cc",
58 "browser/layout_test/layout_test_android.h",
ortunofd24faa2015-05-20 16:34:3759 "browser/layout_test/layout_test_bluetooth_adapter_provider.cc",
60 "browser/layout_test/layout_test_bluetooth_adapter_provider.h",
jyasskin8057c002015-09-10 19:09:5361 "browser/layout_test/layout_test_bluetooth_chooser_factory.cc",
62 "browser/layout_test/layout_test_bluetooth_chooser_factory.h",
ortunof78c8412016-03-31 18:59:5963 "browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc",
64 "browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h",
mkwstd993d06a2014-10-10 11:44:3865 "browser/layout_test/layout_test_browser_context.cc",
66 "browser/layout_test/layout_test_browser_context.h",
mkwst88e23182014-10-16 12:08:5867 "browser/layout_test/layout_test_browser_main.cc",
68 "browser/layout_test/layout_test_browser_main.h",
mkwst36b11b6f2014-10-15 16:18:5669 "browser/layout_test/layout_test_browser_main_parts.cc",
70 "browser/layout_test/layout_test_browser_main_parts.h",
petercd7abb42014-10-17 13:34:0171 "browser/layout_test/layout_test_content_browser_client.cc",
72 "browser/layout_test/layout_test_content_browser_client.h",
mkwst30d20d52014-10-09 13:33:1473 "browser/layout_test/layout_test_devtools_frontend.cc",
74 "browser/layout_test/layout_test_devtools_frontend.h",
mkwst94388f792014-10-16 07:36:5275 "browser/layout_test/layout_test_download_manager_delegate.cc",
76 "browser/layout_test/layout_test_download_manager_delegate.h",
mkwst6efe7f2e62014-10-08 15:09:0177 "browser/layout_test/layout_test_javascript_dialog_manager.cc",
78 "browser/layout_test/layout_test_javascript_dialog_manager.h",
Peter Beverlooe8f2f9d2014-10-20 16:47:4979 "browser/layout_test/layout_test_message_filter.cc",
80 "browser/layout_test/layout_test_message_filter.h",
petercd7abb42014-10-17 13:34:0181 "browser/layout_test/layout_test_notification_manager.cc",
82 "browser/layout_test/layout_test_notification_manager.h",
mlamouri4e372022015-03-29 14:51:0683 "browser/layout_test/layout_test_permission_manager.cc",
84 "browser/layout_test/layout_test_permission_manager.h",
mvanouwerkerkde895c9c2014-12-06 12:17:3285 "browser/layout_test/layout_test_push_messaging_service.cc",
86 "browser/layout_test/layout_test_push_messaging_service.h",
mkwst002d02902014-10-09 10:17:0087 "browser/layout_test/layout_test_resource_dispatcher_host_delegate.cc",
88 "browser/layout_test/layout_test_resource_dispatcher_host_delegate.h",
mkwst94388f792014-10-16 07:36:5289 "browser/layout_test/layout_test_url_request_context_getter.cc",
90 "browser/layout_test/layout_test_url_request_context_getter.h",
lukasza8e550a02016-04-18 18:34:1791 "browser/layout_test/secondary_test_window_observer.cc",
92 "browser/layout_test/secondary_test_window_observer.h",
jochene9ba6dd2016-02-23 17:20:4993 "browser/layout_test/test_info_extractor.cc",
94 "browser/layout_test/test_info_extractor.h",
peter11d5f562014-10-23 23:12:2595 "browser/shell.cc",
96 "browser/shell.h",
97 "browser/shell_access_token_store.cc",
98 "browser/shell_access_token_store.h",
[email protected]6b9028ab2014-07-23 17:15:3899 "browser/shell_android.cc",
100 "browser/shell_application_mac.h",
101 "browser/shell_application_mac.mm",
102 "browser/shell_browser_context.cc",
103 "browser/shell_browser_context.h",
104 "browser/shell_browser_main.cc",
105 "browser/shell_browser_main.h",
106 "browser/shell_browser_main_parts.cc",
107 "browser/shell_browser_main_parts.h",
108 "browser/shell_browser_main_parts_mac.mm",
[email protected]6b9028ab2014-07-23 17:15:38109 "browser/shell_content_browser_client.cc",
110 "browser/shell_content_browser_client.h",
[email protected]6b9028ab2014-07-23 17:15:38111 "browser/shell_devtools_frontend.cc",
112 "browser/shell_devtools_frontend.h",
satorux7fa9d302015-02-16 00:44:52113 "browser/shell_devtools_manager_delegate.cc",
114 "browser/shell_devtools_manager_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38115 "browser/shell_download_manager_delegate.cc",
116 "browser/shell_download_manager_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38117 "browser/shell_javascript_dialog.h",
118 "browser/shell_javascript_dialog_mac.mm",
119 "browser/shell_javascript_dialog_manager.cc",
120 "browser/shell_javascript_dialog_manager.h",
121 "browser/shell_javascript_dialog_win.cc",
[email protected]6b9028ab2014-07-23 17:15:38122 "browser/shell_login_dialog.cc",
123 "browser/shell_login_dialog.h",
124 "browser/shell_login_dialog_mac.mm",
125 "browser/shell_mac.mm",
satorux7fa9d302015-02-16 00:44:52126 "browser/shell_mojo_test_utils_android.cc",
127 "browser/shell_mojo_test_utils_android.h",
[email protected]6b9028ab2014-07-23 17:15:38128 "browser/shell_net_log.cc",
129 "browser/shell_net_log.h",
130 "browser/shell_network_delegate.cc",
131 "browser/shell_network_delegate.h",
mlamouri4e372022015-03-29 14:51:06132 "browser/shell_permission_manager.cc",
133 "browser/shell_permission_manager.h",
[email protected]6b9028ab2014-07-23 17:15:38134 "browser/shell_platform_data_aura.cc",
135 "browser/shell_platform_data_aura.h",
136 "browser/shell_plugin_service_filter.cc",
137 "browser/shell_plugin_service_filter.h",
138 "browser/shell_quota_permission_context.cc",
139 "browser/shell_quota_permission_context.h",
140 "browser/shell_resource_dispatcher_host_delegate.cc",
141 "browser/shell_resource_dispatcher_host_delegate.h",
142 "browser/shell_speech_recognition_manager_delegate.cc",
143 "browser/shell_speech_recognition_manager_delegate.h",
144 "browser/shell_url_request_context_getter.cc",
145 "browser/shell_url_request_context_getter.h",
satorux7fa9d302015-02-16 00:44:52146 "browser/shell_web_contents_view_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38147 "browser/shell_web_contents_view_delegate_android.cc",
148 "browser/shell_web_contents_view_delegate_creator.h",
[email protected]6b9028ab2014-07-23 17:15:38149 "browser/shell_web_contents_view_delegate_mac.mm",
150 "browser/shell_web_contents_view_delegate_win.cc",
lukasza80f7f602016-03-22 23:13:19151 "common/layout_test/layout_test_content_client.cc",
152 "common/layout_test/layout_test_content_client.h",
petere04203592014-10-27 17:57:35153 "common/layout_test/layout_test_messages.cc",
154 "common/layout_test/layout_test_messages.h",
lukasza381b0492016-03-10 16:48:43155 "common/layout_test/layout_test_switches.cc",
156 "common/layout_test/layout_test_switches.h",
[email protected]6b9028ab2014-07-23 17:15:38157 "common/leak_detection_result.h",
158 "common/shell_content_client.cc",
159 "common/shell_content_client.h",
160 "common/shell_messages.cc",
161 "common/shell_messages.h",
iclelland186a8962016-06-22 16:06:20162 "common/shell_origin_trial_policy.cc",
163 "common/shell_origin_trial_policy.h",
[email protected]6b9028ab2014-07-23 17:15:38164 "common/shell_switches.cc",
165 "common/shell_switches.h",
166 "common/shell_test_configuration.cc",
167 "common/shell_test_configuration.h",
tfarina685c39802015-05-04 22:11:22168 "renderer/layout_test/blink_test_helpers.cc",
169 "renderer/layout_test/blink_test_helpers.h",
tfarina8e08285f2015-05-02 03:17:39170 "renderer/layout_test/blink_test_runner.cc",
171 "renderer/layout_test/blink_test_runner.h",
mkwst02ec0d62014-10-07 22:07:29172 "renderer/layout_test/layout_test_content_renderer_client.cc",
173 "renderer/layout_test/layout_test_content_renderer_client.h",
mkwst3e72c1f2014-10-08 05:02:36174 "renderer/layout_test/layout_test_render_frame_observer.cc",
175 "renderer/layout_test/layout_test_render_frame_observer.h",
tyoshino832a58a2016-04-18 08:14:08176 "renderer/layout_test/layout_test_render_thread_observer.cc",
177 "renderer/layout_test/layout_test_render_thread_observer.h",
mkwst04b72d12014-10-08 15:52:55178 "renderer/layout_test/leak_detector.cc",
179 "renderer/layout_test/leak_detector.h",
jochen51265132015-05-28 07:33:45180 "renderer/layout_test/test_media_stream_renderer_factory.cc",
181 "renderer/layout_test/test_media_stream_renderer_factory.h",
chfremerbcfff0212016-06-06 18:29:41182 "renderer/layout_test/test_media_stream_video_renderer.cc",
183 "renderer/layout_test/test_media_stream_video_renderer.h",
[email protected]6b9028ab2014-07-23 17:15:38184 "renderer/shell_content_renderer_client.cc",
185 "renderer/shell_content_renderer_client.h",
[email protected]6b9028ab2014-07-23 17:15:38186 "renderer/shell_render_view_observer.cc",
187 "renderer/shell_render_view_observer.h",
rockotb814a582015-06-05 00:30:52188 "utility/shell_content_utility_client.cc",
189 "utility/shell_content_utility_client.h",
[email protected]6b9028ab2014-07-23 17:15:38190 ]
191
brettwbc8b2a22015-07-28 18:24:42192 configs += [
thakisff2eab9c2015-11-13 00:29:58193 ":content_shell_lib_warnings",
brettwbc8b2a22015-07-28 18:24:42194 "//build/config:precompiled_headers",
195
196 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
197 "//build/config/compiler:no_size_t_to_int_warning",
kozyatinskiy6adbc802016-01-28 00:16:16198
199 "//third_party/WebKit/public:debug_devtools",
brettwbc8b2a22015-07-28 18:24:42200 ]
brettwd1c719a2015-02-19 23:17:04201
[email protected]6b9028ab2014-07-23 17:15:38202 defines = [ "CONTENT_SHELL_VERSION=\"$content_shell_version\"" ]
203
Brett Wilson0380637c2014-09-19 21:24:40204 public_deps = [
205 # This exposes all public content APIs.
206 "//content/public/app:both",
207 "//content/public/browser",
208 "//content/public/common",
Brett Wilson0380637c2014-09-19 21:24:40209 "//content/public/renderer",
210 "//content/public/utility",
211 ]
[email protected]6b9028ab2014-07-23 17:15:38212 deps = [
ortunof78c8412016-03-31 18:59:59213 ":mojo_bindings",
[email protected]6b9028ab2014-07-23 17:15:38214 ":resources",
215 "//base",
216 "//base:base_static",
[email protected]6b9028ab2014-07-23 17:15:38217 "//base/third_party/dynamic_annotations",
218 "//cc",
scottmgcfa5b01b2015-11-30 23:13:46219 "//components/crash/content/app:app_breakpad_mac_win_to_be_deleted",
dgozmanf7200152015-04-22 17:48:21220 "//components/devtools_discovery",
dgozman102fee92015-04-20 15:45:46221 "//components/devtools_http_handler",
bnc210d6f32016-05-24 07:40:47222 "//components/network_session_configurator:switches",
chrishtr8a377e62015-06-01 19:20:08223 "//components/plugins/renderer",
jochen73e711c2015-06-03 10:01:46224 "//components/test_runner:test_runner",
rsleevi24f64dc22015-08-07 21:39:21225 "//components/url_formatter",
hanxi149b92d2014-09-11 21:57:18226 "//components/web_cache/renderer",
[email protected]6b9028ab2014-07-23 17:15:38227 "//content:resources",
[email protected]a9ca8d52014-08-22 10:21:08228 "//content/app/resources",
[email protected]6586a2e32014-08-09 19:24:12229 "//content/app/strings",
[email protected]6b9028ab2014-07-23 17:15:38230 "//content/gpu",
[email protected]6b9028ab2014-07-23 17:15:38231 "//content/test:layouttest_support",
brettwb78fc9e2016-03-25 21:02:51232 "//content/test:test_support",
dpranke93211fc2015-04-29 04:59:42233 "//device/bluetooth",
ortunofd24faa2015-05-20 16:34:37234 "//device/bluetooth:mocks",
[email protected]6b9028ab2014-07-23 17:15:38235 "//gin",
236 "//gpu",
237 "//ipc",
238 "//media",
239 "//net",
240 "//net:net_resources",
241 "//skia",
pilgrim4af8c212014-09-05 17:30:15242 "//storage/browser",
ortunofd24faa2015-05-20 16:34:37243 "//testing/gmock",
244 "//testing/gtest",
[email protected]6b9028ab2014-07-23 17:15:38245 "//third_party/WebKit/public:blink",
erga3c614c92015-04-03 17:47:51246 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46247 "//third_party/WebKit/public:resources",
[email protected]0e043592014-07-28 19:47:04248 "//third_party/WebKit/public:test_support",
[email protected]4eebe74d2014-08-13 02:54:46249 "//third_party/icu",
[email protected]6b9028ab2014-07-23 17:15:38250 "//ui/base",
spang1c36fac2015-02-05 19:55:12251 "//ui/base/ime",
[email protected]6b9028ab2014-07-23 17:15:38252 "//ui/events:events_base",
253 "//ui/gfx",
254 "//ui/gfx/geometry",
255 "//ui/gfx/ipc",
fsamuel6b98cf92016-04-28 05:42:24256 "//ui/gfx/ipc/geometry",
markdittmer99d77bf2016-03-31 19:03:24257 "//ui/gfx/ipc/skia",
[email protected]6b9028ab2014-07-23 17:15:38258 "//ui/gl",
259 "//url",
260 "//v8",
[email protected]6b9028ab2014-07-23 17:15:38261 ]
jamesr50081742014-09-09 07:52:22262 if (enable_plugins) {
dcheng0d93c1a2015-12-03 02:46:41263 deps += [
264 "//content/ppapi_plugin",
dchengc70b36e2016-03-02 02:36:10265 "//ppapi:blink_deprecated_test_plugin",
dcheng0d93c1a2015-12-03 02:46:41266 "//ppapi:blink_test_plugin",
brettwb78fc9e2016-03-25 21:02:51267 "//ppapi/shared_impl",
dcheng0d93c1a2015-12-03 02:46:41268 ]
jamesr50081742014-09-09 07:52:22269 }
xhwangbe720032016-02-19 18:45:31270 if (mojo_media_host == "browser") {
xhwangd3b5d3f2016-05-18 03:37:59271 deps += [ "//media/mojo/services" ]
alokpaa2fdfb72016-02-03 22:55:54272 }
[email protected]6b9028ab2014-07-23 17:15:38273
274 if (is_win) {
vchigrin61944ae2015-01-30 23:51:32275 sources += [
276 "common/v8_breakpad_support_win.cc",
277 "common/v8_breakpad_support_win.h",
278 ]
[email protected]6b9028ab2014-07-23 17:15:38279 }
280
281 if (is_linux) {
brettwb78fc9e2016-03-25 21:02:51282 deps += [
283 "//build/linux:fontconfig",
284 "//ui/gfx:test_support",
285 ]
[email protected]6b9028ab2014-07-23 17:15:38286 }
287
288 if (use_x11) {
[email protected]c7990dbf2014-07-23 22:35:10289 # Some tests rely on this tool at runtime. Note: it might be better if
290 # the tests that needed it had this as a dep instead of adding it here.
sadrul1f7fa9f2015-10-06 17:14:57291 data_deps = [
292 "//tools/xdisplaycheck",
293 ]
dnicoara78a734702014-11-04 19:54:38294
kylecharad714872016-04-20 16:09:52295 deps += [ "//ui/events/devices/x11" ]
[email protected]6b9028ab2014-07-23 17:15:38296 }
297
298 if (is_android) {
James Robinson060f2e32014-09-10 22:31:37299 deps += [ "//content/shell/android:content_shell_jni_headers" ]
[email protected]6b9028ab2014-07-23 17:15:38300 }
301
torne1b1c9782015-03-30 20:49:00302 if (is_posix && !is_mac) {
brettwb78fc9e2016-03-25 21:02:51303 deps += [
304 "//components/crash/content/app",
305 "//components/crash/content/browser",
306 ]
[email protected]6b9028ab2014-07-23 17:15:38307 }
308
309 if (use_aura) {
310 deps += [
311 "//ui/aura",
312 "//ui/aura:test_support",
313 "//ui/events",
314 "//ui/strings",
315 "//ui/wm",
316 ]
317
318 if (toolkit_views) {
319 sources += [ "browser/shell_views.cc" ]
320 deps += [
321 "//ui/resources",
[email protected]6b9028ab2014-07-23 17:15:38322 "//ui/views",
323 "//ui/views:test_support",
agrieved7a71c882015-11-20 19:53:28324 "//ui/views/controls/webview",
brettwb78fc9e2016-03-25 21:02:51325 "//ui/wm:test_support",
[email protected]6b9028ab2014-07-23 17:15:38326 ]
327 } else {
328 sources += [ "browser/shell_aura.cc" ]
329 }
James Robinson060f2e32014-09-10 22:31:37330 } else {
331 sources -= [
332 "browser/shell_platform_data_aura.cc",
333 "browser/shell_platform_data_aura.h",
334 ]
[email protected]6b9028ab2014-07-23 17:15:38335 }
336
[email protected]6b9028ab2014-07-23 17:15:38337 if (is_chromeos) {
338 deps += [
mukai6ba73552014-10-09 19:05:17339 "//chromeos",
[email protected]6b9028ab2014-07-23 17:15:38340 "//ui/wm:test_support",
[email protected]6b9028ab2014-07-23 17:15:38341 ]
342 }
343
bcf0ddf78a2016-02-02 18:52:21344 if (is_linux) {
[email protected]6b9028ab2014-07-23 17:15:38345 deps += [ "//third_party/freetype2" ]
346 }
347
348 if (!enable_plugins) {
349 sources -= [
350 "browser/shell_plugin_service_filter.cc",
351 "browser/shell_plugin_service_filter.h",
352 ]
353 }
354}
355
356grit("content_shell_resources_grit") {
brettwb78fc9e2016-03-25 21:02:51357 # External code should depend on ":resources" instead.
brettw9af42622014-09-06 21:21:02358 visibility = [ ":*" ]
[email protected]6b9028ab2014-07-23 17:15:38359 source = "shell_resources.grd"
360 outputs = [
361 "grit/shell_resources.h",
362 "shell_resources.pak",
[email protected]6b9028ab2014-07-23 17:15:38363 ]
364}
365
366copy("copy_shell_resources") {
scottmg7afc4092014-12-03 19:22:42367 sources = [
368 "$target_gen_dir/shell_resources.pak",
369 ]
scottmg34fb7e52014-12-03 23:27:24370 outputs = [
371 "$root_out_dir/shell_resources.pak",
372 ]
[email protected]6b9028ab2014-07-23 17:15:38373
scottmg7afc4092014-12-03 19:22:42374 public_deps = [
375 ":content_shell_resources_grit",
376 ]
[email protected]6b9028ab2014-07-23 17:15:38377}
378
[email protected]6b9028ab2014-07-23 17:15:38379group("resources") {
Brett Wilsone53895272014-09-23 23:41:46380 public_deps = [
[email protected]6b9028ab2014-07-23 17:15:38381 ":copy_shell_resources",
382 ]
jochen73e711c2015-06-03 10:01:46383 deps = [
384 "//components/test_runner:resources",
385 ]
[email protected]6b9028ab2014-07-23 17:15:38386}
387
388repack("pak") {
389 sources = [
erga3c614c92015-04-03 17:47:51390 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
391 "$root_gen_dir/blink/public/resources/blink_resources.pak",
[email protected]a9ca8d52014-08-22 10:21:08392 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
[email protected]6586a2e32014-08-09 19:24:12393 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
[email protected]6b9028ab2014-07-23 17:15:38394 "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
[email protected]6586a2e32014-08-09 19:24:12395 "$root_gen_dir/content/content_resources.pak",
[email protected]6b9028ab2014-07-23 17:15:38396 "$root_gen_dir/content/shell/shell_resources.pak",
397 "$root_gen_dir/net/net_resources.pak",
398 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
399 "$root_gen_dir/ui/resources/webui_resources.pak",
400 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
401 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
[email protected]6b9028ab2014-07-23 17:15:38402 ]
403
404 deps = [
405 ":resources",
406 "//content:resources",
[email protected]a9ca8d52014-08-22 10:21:08407 "//content/app/resources",
[email protected]6586a2e32014-08-09 19:24:12408 "//content/app/strings",
[email protected]6b9028ab2014-07-23 17:15:38409 "//content/browser/tracing:resources",
410 "//net:net_resources",
erga3c614c92015-04-03 17:47:51411 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46412 "//third_party/WebKit/public:resources",
[email protected]6b9028ab2014-07-23 17:15:38413 "//ui/resources",
414 "//ui/strings",
[email protected]6b9028ab2014-07-23 17:15:38415 ]
416
sadrul7bd20c92015-06-24 16:45:44417 if (toolkit_views) {
418 deps += [ "//ui/views/resources" ]
419 sources +=
420 [ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ]
421 }
422
vivek.vg77816a12014-12-18 14:28:20423 sources += [ "$root_gen_dir/blink/devtools_resources.pak" ]
cjhopman2fd48fd2014-09-24 00:52:56424 deps += [ "//content/browser/devtools:resources" ]
425 output = "$root_out_dir/content_shell.pak"
[email protected]6b9028ab2014-07-23 17:15:38426}
427
agrieve993374cf2016-04-13 00:05:39428if (is_android) {
429 group("content_shell") {
430 testonly = true
431 deps = [
432 "//content/shell/android:content_shell_apk",
433 ]
434 }
435} else if (is_mac) {
rsesek90112aa62016-05-03 17:33:36436 tweak_info_plist("content_shell_plist") {
437 testonly = true
438 info_plist = "app/app-Info.plist"
439 args = [
440 "--scm=1",
441 "--version",
442 content_shell_version,
443 ]
444 }
rsesek7f9d12b2016-04-29 02:45:56445 mac_app_bundle("content_shell") {
agrieve993374cf2016-04-13 00:05:39446 testonly = true
rsesek7f9d12b2016-04-29 02:45:56447 output_name = content_shell_product_name
448 sources = [
449 "app/shell_main.cc",
agrieve993374cf2016-04-13 00:05:39450 ]
rsesek7f9d12b2016-04-29 02:45:56451 deps = [
452 ":content_shell_framework_bundle_data",
453 ":content_shell_resources_bundle_data",
454
455 # TODO(rsesek): Remove this after GYP is gone, since it only needs to
456 # be here per the comment in blink_test_platform_support_mac.mm about
457 # the bundle structure.
458 "//components/test_runner:resources",
459 ]
rsesek6a8a5d02016-06-21 01:16:18460 ldflags = [
461 # The main app is at Content Shell.app/Contents/MacOS/Content Shell
462 # so set the rpath up to Contents/ so that the loader can find
463 # Framworks/.
464 "-rpath",
465 "@executable_path/../",
466 ]
rsesek90112aa62016-05-03 17:33:36467 info_plist_target = ":content_shell_plist"
agrieve993374cf2016-04-13 00:05:39468 }
469} else {
brettw2e2220c2015-07-21 18:56:35470 # TODO(brettw) when GYP is no longer necessary, delete
471 # content/shell/app/shell.exe.manifest. This file is not used in GN.
scottmg7afc4092014-12-03 19:22:42472 executable("content_shell") {
473 testonly = true
James Robinson060f2e32014-09-10 22:31:37474
scottmg7afc4092014-12-03 19:22:42475 # TODO(GYP) mac resource bundle stuff for this target.
scottmg7afc4092014-12-03 19:22:42476 sources = [
scottmg7afc4092014-12-03 19:22:42477 "app/shell_main.cc",
478 ]
[email protected]6b9028ab2014-07-23 17:15:38479
brucedawsond4fde4c2016-05-02 19:03:58480 if (is_win) {
481 sources += [ "app/shell.rc" ]
482 }
483
skobes502412ae2016-01-19 17:40:43484 defines = []
485
scottmg7afc4092014-12-03 19:22:42486 deps = [
487 ":content_shell_lib",
488 ":pak",
brettwba7a73d2015-08-31 22:17:39489 "//build/config/sanitizers:deps",
brettw2e2220c2015-07-21 18:56:35490 "//build/win:default_exe_manifest",
scottmg7afc4092014-12-03 19:22:42491 ]
[email protected]6b9028ab2014-07-23 17:15:38492
scottmg7afc4092014-12-03 19:22:42493 if (is_win) {
494 deps += [ "//sandbox" ]
brucedawsond4fde4c2016-05-02 19:03:58495
496 # This is a large module that can't do incremental linking in some cases.
497 configs -= [ "//build/config/win:default_incremental_linking" ]
498 configs +=
499 [ "//build/config/win:default_large_module_incremental_linking" ]
skobes502412ae2016-01-19 17:40:43500 if (win_console_app) {
501 defines += [ "WIN_CONSOLE_APP" ]
502 } else {
503 # Set /SUBSYSTEM:WINDOWS unless a console build has been requested.
scottmg7afc4092014-12-03 19:22:42504 configs -= [ "//build/config/win:console" ]
505 configs += [ "//build/config/win:windowed" ]
506 }
507 }
508
wangxianzhu1a34fa32016-03-10 21:03:00509 if (is_linux && !is_component_build) {
510 # Set rpath to find our own libfreetype even in a non-component build.
511 configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
512 }
[email protected]6b9028ab2014-07-23 17:15:38513 }
James Robinson060f2e32014-09-10 22:31:37514}
tfarina10ae51f62015-05-13 03:35:57515
tfarina795e01a2015-05-15 19:29:57516if (is_win) {
517 # GYP version: content/content_shell_and_tests.gyp:content_shell_crash_service
brettw0d3b1df2015-12-03 00:10:01518 executable("content_shell_crash_service") {
tfarina795e01a2015-05-15 19:29:57519 sources = [
520 "tools/content_shell_crash_service.cc",
521 ]
522
523 deps = [
524 "//base",
brettwba7a73d2015-08-31 22:17:39525 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07526 "//build/win:default_exe_manifest",
sdefresne8ba0b88c2015-09-18 10:33:13527 "//components/crash/content/tools:crash_service",
tfarina795e01a2015-05-15 19:29:57528 ]
529
530 configs -= [ "//build/config/win:console" ]
531 configs += [ "//build/config/win:windowed" ]
532 }
533}
brettwe1d40652015-10-23 23:06:10534
535if (is_mac) {
rsesek7f9d12b2016-04-29 02:45:56536 mac_xib_bundle_data("content_shell_framework_xibs") {
537 sources = [
538 "app/English.lproj/HttpAuth.xib",
539 "app/English.lproj/MainMenu.xib",
540 ]
541 output_path = "{{bundle_resources_dir}}/English.lproj"
542 }
543
544 bundle_data("content_shell_framework_resources") {
545 sources = [
546 "$root_out_dir/content_shell.pak",
547 "$root_out_dir/icudtl.dat",
548 "resources/missingImage.png",
549 "resources/textAreaResizeCorner.png",
550 ]
551
552 public_deps = [
553 ":pak",
554 ]
555
556 deps = [
557 "//third_party/icu:icudata",
558 ]
559
560 if (v8_use_external_startup_data) {
561 sources += [
562 "$root_out_dir/natives_blob.bin",
563 "$root_out_dir/snapshot_blob.bin",
564 ]
565 public_deps += [ "//v8" ]
566 }
567
568 outputs = [
569 "{{bundle_resources_dir}}/{{source_file_part}}",
570 ]
571 }
572
573 if (enable_plugins) {
574 bundle_data("content_shell_framework_plugins") {
575 sources = [
576 "$root_out_dir/blink_deprecated_test_plugin.plugin",
577 "$root_out_dir/blink_test_plugin.plugin",
578 ]
579
580 outputs = [
581 "{{bundle_root_dir}}/{{source_file_part}}",
582 ]
583
584 public_deps = [
585 "//ppapi:blink_deprecated_test_plugin",
586 "//ppapi:blink_test_plugin",
587 ]
588 }
589 }
590
591 content_shell_framework_name = "$content_shell_product_name Framework"
592 content_shell_helper_name = "$content_shell_product_name Helper"
593
rsesek90112aa62016-05-03 17:33:36594 tweak_info_plist("content_shell_framework_plist") {
595 testonly = true
596 info_plist = "app/framework-Info.plist"
597 args = [
598 "--breakpad=1",
599 "--keystone=0",
600 "--scm=1",
601 "--version",
602 content_shell_version,
603 "--branding",
604 content_shell_product_name,
605 ]
606 }
607
rsesek7f9d12b2016-04-29 02:45:56608 mac_framework_bundle("content_shell_framework") {
brettwe1d40652015-10-23 23:06:10609 testonly = true
610
rsesek7f9d12b2016-04-29 02:45:56611 output_name = content_shell_framework_name
brettwe1d40652015-10-23 23:06:10612
613 sources = [
tfarinac708f3972015-10-25 17:42:50614 "app/shell_content_main.cc",
615 "app/shell_content_main.h",
brettwe1d40652015-10-23 23:06:10616 ]
617
rsesek7f9d12b2016-04-29 02:45:56618 # TODO(rsesek): Handle these missing pieces:
619 # - crash_inspector
620 # - crash_report_sender.app
621
brettwe1d40652015-10-23 23:06:10622 deps = [
rsesek7f9d12b2016-04-29 02:45:56623 ":content_shell_framework_resources",
624 ":content_shell_framework_xibs",
brettwe1d40652015-10-23 23:06:10625 ":content_shell_lib",
rsesek7f9d12b2016-04-29 02:45:56626 "//third_party/icu:icudata",
brettwe1d40652015-10-23 23:06:10627 ]
rsesek7f9d12b2016-04-29 02:45:56628
629 if (enable_plugins) {
630 deps += [ ":content_shell_framework_plugins" ]
631 }
632
rsesek6a8a5d02016-06-21 01:16:18633 # Both the main :content_shell and :content_shell_helper_app executables
634 # need to link the framework. Because they are at different directory
635 # depths, using @executable_path as the install_name would require using
636 # install_name_tool on one of the executables. However install_name_tool
637 # only operates in-place, which is problematic to express in GN. Instead,
638 # use rpath-based loading.
639 # TODO(rsesek): After GYP is gone, re-write content_shell_main to be like
640 # chrome_main and use dlopen() instead of a linked framework.
641 ldflags = [ "-Wl,-install_name,@rpath/Frameworks/$output_name.framework/$output_name" ]
642
643 if (is_component_build) {
644 # Set up the rpath for the framework so that it can find dylibs in the
645 # root output directory. The framework is at
646 # Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Content Shell Framework
647 # so use loader_path to go back to the root output directory.
648 ldflags += [
649 "-rpath",
650 "@loader_path/../../../..",
651 ]
652 }
rsesek7f9d12b2016-04-29 02:45:56653
rsesek90112aa62016-05-03 17:33:36654 info_plist_target = ":content_shell_framework_plist"
655 }
656
657 tweak_info_plist("content_shell_helper_plist") {
658 testonly = true
659 info_plist = "app/helper-Info.plist"
660 args = [
661 "--breakpad=0",
662 "--keystone=0",
663 "--scm=0",
664 "--version",
665 content_shell_version,
666 ]
brettwe1d40652015-10-23 23:06:10667 }
rsesek20a58a62016-04-15 20:59:23668
669 mac_app_bundle("content_shell_helper_app") {
670 testonly = true
rsesek7f9d12b2016-04-29 02:45:56671 output_name = content_shell_helper_name
rsesek20a58a62016-04-15 20:59:23672 sources = [
673 "app/shell_main.cc",
674 ]
675 deps = [
rsesek7f9d12b2016-04-29 02:45:56676 ":content_shell_framework+link",
rsesek20a58a62016-04-15 20:59:23677 ]
rsesek02aa51c2016-05-11 02:13:57678 ldflags = [
679 # The helper is in Content Shell.app/Contents/Frameworks/Content Shell Helper.app/Contents/MacOS/
rsesek6a8a5d02016-06-21 01:16:18680 # so set rpath up to Contents/ so that the loader can find Frameworks/.
rsesek02aa51c2016-05-11 02:13:57681 "-rpath",
rsesek6a8a5d02016-06-21 01:16:18682 "@executable_path/../../../..",
rsesek02aa51c2016-05-11 02:13:57683 ]
rsesek90112aa62016-05-03 17:33:36684 info_plist_target = ":content_shell_helper_plist"
rsesek20a58a62016-04-15 20:59:23685 }
rsesek7f9d12b2016-04-29 02:45:56686
rsesek7f9d12b2016-04-29 02:45:56687 bundle_data("content_shell_framework_bundle_data") {
688 testonly = true
689 sources = [
690 "$root_out_dir/$content_shell_framework_name.framework",
691 "$root_out_dir/$content_shell_helper_name.app",
692 ]
693 outputs = [
694 "{{bundle_root_dir}}/Frameworks/{{source_file_part}}",
695 ]
696 public_deps = [
697 ":content_shell_framework+link",
rsesek6a8a5d02016-06-21 01:16:18698 ":content_shell_helper_app",
rsesek7f9d12b2016-04-29 02:45:56699 ]
700 }
701
702 bundle_data("content_shell_resources_bundle_data") {
703 testonly = true
704 sources = [
705 "app/app.icns",
706 ]
707 outputs = [
708 "{{bundle_resources_dir}}/{{source_file_part}}",
709 ]
710 }
brettwe1d40652015-10-23 23:06:10711}
ortunof78c8412016-03-31 18:59:59712
713mojom("mojo_bindings") {
714 sources = [
715 "common/layout_test/layout_test_bluetooth_fake_adapter_setter.mojom",
716 ]
717}