blob: 3fc34d237e2b464411c137b8b6a6f9c44d697021 [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")
rsesek90112aa62016-05-03 17:33:3618 import("//build/mac/tweak_info_plist.gni")
jshin359df9c92016-07-30 06:59:4919 import("//third_party/icu/config.gni")
machenbachd65ec5c2016-07-22 09:05:2320 import("//v8/gni/v8.gni")
sebmarchanda2df3392016-07-13 15:34:5921} else if (is_win) {
22 import("//build/win/syzygy/syzygy.gni")
[email protected]6b9028ab2014-07-23 17:15:3823}
24
25declare_args() {
26 content_shell_product_name = "Content Shell"
esprehnb3789092015-11-24 19:46:0327 content_shell_version = "99.77.34.5"
[email protected]6b9028ab2014-07-23 17:15:3828}
29
thakisff2eab9c2015-11-13 00:29:5830config("content_shell_lib_warnings") {
31 if (is_clang) {
32 # TODO(thakis): Remove this once http://crbug.com/383820 is figured out
33 cflags = [ "-Wno-nonnull" ]
34 }
35}
36
[email protected]6b9028ab2014-07-23 17:15:3837static_library("content_shell_lib") {
Brett Wilson8f80ad0b2014-09-08 19:50:2438 testonly = true
[email protected]6b9028ab2014-07-23 17:15:3839 sources = [
dprankec6beb8392015-10-30 23:44:2140 "android/shell_descriptors.h",
[email protected]6b9028ab2014-07-23 17:15:3841 "android/shell_jni_registrar.cc",
42 "android/shell_jni_registrar.h",
43 "android/shell_manager.cc",
44 "android/shell_manager.h",
lukasza88e4b0b42016-02-25 21:42:1045 "app/blink_test_platform_support.h",
46 "app/blink_test_platform_support_android.cc",
47 "app/blink_test_platform_support_linux.cc",
48 "app/blink_test_platform_support_mac.mm",
49 "app/blink_test_platform_support_win.cc",
[email protected]6b9028ab2014-07-23 17:15:3850 "app/paths_mac.h",
51 "app/paths_mac.mm",
rseseka0a7a042014-09-18 23:59:2052 "app/shell_crash_reporter_client.cc",
53 "app/shell_crash_reporter_client.h",
[email protected]6b9028ab2014-07-23 17:15:3854 "app/shell_main_delegate.cc",
55 "app/shell_main_delegate.h",
56 "app/shell_main_delegate_mac.h",
57 "app/shell_main_delegate_mac.mm",
jochen5ce1af92016-02-17 20:39:4558 "browser/layout_test/blink_test_controller.cc",
59 "browser/layout_test/blink_test_controller.h",
mkwstd6805d0d2014-10-16 14:44:3760 "browser/layout_test/layout_test_android.cc",
61 "browser/layout_test/layout_test_android.h",
ortunofd24faa2015-05-20 16:34:3762 "browser/layout_test/layout_test_bluetooth_adapter_provider.cc",
63 "browser/layout_test/layout_test_bluetooth_adapter_provider.h",
jyasskin8057c002015-09-10 19:09:5364 "browser/layout_test/layout_test_bluetooth_chooser_factory.cc",
65 "browser/layout_test/layout_test_bluetooth_chooser_factory.h",
ortunof78c8412016-03-31 18:59:5966 "browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc",
67 "browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h",
mkwstd993d06a2014-10-10 11:44:3868 "browser/layout_test/layout_test_browser_context.cc",
69 "browser/layout_test/layout_test_browser_context.h",
mkwst88e23182014-10-16 12:08:5870 "browser/layout_test/layout_test_browser_main.cc",
71 "browser/layout_test/layout_test_browser_main.h",
mkwst36b11b6f2014-10-15 16:18:5672 "browser/layout_test/layout_test_browser_main_parts.cc",
73 "browser/layout_test/layout_test_browser_main_parts.h",
petercd7abb42014-10-17 13:34:0174 "browser/layout_test/layout_test_content_browser_client.cc",
75 "browser/layout_test/layout_test_content_browser_client.h",
mkwst30d20d52014-10-09 13:33:1476 "browser/layout_test/layout_test_devtools_frontend.cc",
77 "browser/layout_test/layout_test_devtools_frontend.h",
mkwst94388f792014-10-16 07:36:5278 "browser/layout_test/layout_test_download_manager_delegate.cc",
79 "browser/layout_test/layout_test_download_manager_delegate.h",
ortuno10455542016-07-01 00:06:4380 "browser/layout_test/layout_test_first_device_bluetooth_chooser.cc",
81 "browser/layout_test/layout_test_first_device_bluetooth_chooser.h",
mkwst6efe7f2e62014-10-08 15:09:0182 "browser/layout_test/layout_test_javascript_dialog_manager.cc",
83 "browser/layout_test/layout_test_javascript_dialog_manager.h",
Peter Beverlooe8f2f9d2014-10-20 16:47:4984 "browser/layout_test/layout_test_message_filter.cc",
85 "browser/layout_test/layout_test_message_filter.h",
petercd7abb42014-10-17 13:34:0186 "browser/layout_test/layout_test_notification_manager.cc",
87 "browser/layout_test/layout_test_notification_manager.h",
mlamouri4e372022015-03-29 14:51:0688 "browser/layout_test/layout_test_permission_manager.cc",
89 "browser/layout_test/layout_test_permission_manager.h",
mvanouwerkerkde895c9c2014-12-06 12:17:3290 "browser/layout_test/layout_test_push_messaging_service.cc",
91 "browser/layout_test/layout_test_push_messaging_service.h",
mkwst002d02902014-10-09 10:17:0092 "browser/layout_test/layout_test_resource_dispatcher_host_delegate.cc",
93 "browser/layout_test/layout_test_resource_dispatcher_host_delegate.h",
mkwst94388f792014-10-16 07:36:5294 "browser/layout_test/layout_test_url_request_context_getter.cc",
95 "browser/layout_test/layout_test_url_request_context_getter.h",
lukasza8e550a02016-04-18 18:34:1796 "browser/layout_test/secondary_test_window_observer.cc",
97 "browser/layout_test/secondary_test_window_observer.h",
jochene9ba6dd2016-02-23 17:20:4998 "browser/layout_test/test_info_extractor.cc",
99 "browser/layout_test/test_info_extractor.h",
peter11d5f562014-10-23 23:12:25100 "browser/shell.cc",
101 "browser/shell.h",
102 "browser/shell_access_token_store.cc",
103 "browser/shell_access_token_store.h",
[email protected]6b9028ab2014-07-23 17:15:38104 "browser/shell_android.cc",
105 "browser/shell_application_mac.h",
106 "browser/shell_application_mac.mm",
107 "browser/shell_browser_context.cc",
108 "browser/shell_browser_context.h",
109 "browser/shell_browser_main.cc",
110 "browser/shell_browser_main.h",
111 "browser/shell_browser_main_parts.cc",
112 "browser/shell_browser_main_parts.h",
113 "browser/shell_browser_main_parts_mac.mm",
[email protected]6b9028ab2014-07-23 17:15:38114 "browser/shell_content_browser_client.cc",
115 "browser/shell_content_browser_client.h",
[email protected]6b9028ab2014-07-23 17:15:38116 "browser/shell_devtools_frontend.cc",
117 "browser/shell_devtools_frontend.h",
satorux7fa9d302015-02-16 00:44:52118 "browser/shell_devtools_manager_delegate.cc",
119 "browser/shell_devtools_manager_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38120 "browser/shell_download_manager_delegate.cc",
121 "browser/shell_download_manager_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38122 "browser/shell_javascript_dialog.h",
123 "browser/shell_javascript_dialog_mac.mm",
124 "browser/shell_javascript_dialog_manager.cc",
125 "browser/shell_javascript_dialog_manager.h",
126 "browser/shell_javascript_dialog_win.cc",
[email protected]6b9028ab2014-07-23 17:15:38127 "browser/shell_login_dialog.cc",
128 "browser/shell_login_dialog.h",
129 "browser/shell_login_dialog_mac.mm",
130 "browser/shell_mac.mm",
[email protected]6b9028ab2014-07-23 17:15:38131 "browser/shell_net_log.cc",
132 "browser/shell_net_log.h",
133 "browser/shell_network_delegate.cc",
134 "browser/shell_network_delegate.h",
mlamouri4e372022015-03-29 14:51:06135 "browser/shell_permission_manager.cc",
136 "browser/shell_permission_manager.h",
[email protected]6b9028ab2014-07-23 17:15:38137 "browser/shell_platform_data_aura.cc",
138 "browser/shell_platform_data_aura.h",
139 "browser/shell_plugin_service_filter.cc",
140 "browser/shell_plugin_service_filter.h",
141 "browser/shell_quota_permission_context.cc",
142 "browser/shell_quota_permission_context.h",
143 "browser/shell_resource_dispatcher_host_delegate.cc",
144 "browser/shell_resource_dispatcher_host_delegate.h",
145 "browser/shell_speech_recognition_manager_delegate.cc",
146 "browser/shell_speech_recognition_manager_delegate.h",
147 "browser/shell_url_request_context_getter.cc",
148 "browser/shell_url_request_context_getter.h",
satorux7fa9d302015-02-16 00:44:52149 "browser/shell_web_contents_view_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38150 "browser/shell_web_contents_view_delegate_android.cc",
151 "browser/shell_web_contents_view_delegate_creator.h",
[email protected]6b9028ab2014-07-23 17:15:38152 "browser/shell_web_contents_view_delegate_mac.mm",
lukasza80f7f602016-03-22 23:13:19153 "common/layout_test/layout_test_content_client.cc",
154 "common/layout_test/layout_test_content_client.h",
petere04203592014-10-27 17:57:35155 "common/layout_test/layout_test_messages.cc",
156 "common/layout_test/layout_test_messages.h",
lukasza381b0492016-03-10 16:48:43157 "common/layout_test/layout_test_switches.cc",
158 "common/layout_test/layout_test_switches.h",
[email protected]6b9028ab2014-07-23 17:15:38159 "common/leak_detection_result.h",
160 "common/shell_content_client.cc",
161 "common/shell_content_client.h",
162 "common/shell_messages.cc",
163 "common/shell_messages.h",
iclelland186a8962016-06-22 16:06:20164 "common/shell_origin_trial_policy.cc",
165 "common/shell_origin_trial_policy.h",
[email protected]6b9028ab2014-07-23 17:15:38166 "common/shell_switches.cc",
167 "common/shell_switches.h",
168 "common/shell_test_configuration.cc",
169 "common/shell_test_configuration.h",
tfarina685c39802015-05-04 22:11:22170 "renderer/layout_test/blink_test_helpers.cc",
171 "renderer/layout_test/blink_test_helpers.h",
tfarina8e08285f2015-05-02 03:17:39172 "renderer/layout_test/blink_test_runner.cc",
173 "renderer/layout_test/blink_test_runner.h",
sammc9b9e5b42016-10-12 12:32:32174 "renderer/layout_test/interface_registry_js_wrapper.cc",
175 "renderer/layout_test/interface_registry_js_wrapper.h",
mkwst02ec0d62014-10-07 22:07:29176 "renderer/layout_test/layout_test_content_renderer_client.cc",
177 "renderer/layout_test/layout_test_content_renderer_client.h",
mkwst3e72c1f2014-10-08 05:02:36178 "renderer/layout_test/layout_test_render_frame_observer.cc",
179 "renderer/layout_test/layout_test_render_frame_observer.h",
tyoshino832a58a2016-04-18 08:14:08180 "renderer/layout_test/layout_test_render_thread_observer.cc",
181 "renderer/layout_test/layout_test_render_thread_observer.h",
mkwst04b72d12014-10-08 15:52:55182 "renderer/layout_test/leak_detector.cc",
183 "renderer/layout_test/leak_detector.h",
jochen51265132015-05-28 07:33:45184 "renderer/layout_test/test_media_stream_renderer_factory.cc",
185 "renderer/layout_test/test_media_stream_renderer_factory.h",
chfremerbcfff0212016-06-06 18:29:41186 "renderer/layout_test/test_media_stream_video_renderer.cc",
187 "renderer/layout_test/test_media_stream_video_renderer.h",
[email protected]6b9028ab2014-07-23 17:15:38188 "renderer/shell_content_renderer_client.cc",
189 "renderer/shell_content_renderer_client.h",
[email protected]6b9028ab2014-07-23 17:15:38190 "renderer/shell_render_view_observer.cc",
191 "renderer/shell_render_view_observer.h",
rockotb814a582015-06-05 00:30:52192 "utility/shell_content_utility_client.cc",
193 "utility/shell_content_utility_client.h",
[email protected]6b9028ab2014-07-23 17:15:38194 ]
195
brettwbc8b2a22015-07-28 18:24:42196 configs += [
thakisff2eab9c2015-11-13 00:29:58197 ":content_shell_lib_warnings",
brettwbc8b2a22015-07-28 18:24:42198 "//build/config:precompiled_headers",
199
200 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
201 "//build/config/compiler:no_size_t_to_int_warning",
kozyatinskiy6adbc802016-01-28 00:16:16202
203 "//third_party/WebKit/public:debug_devtools",
brettwbc8b2a22015-07-28 18:24:42204 ]
brettwd1c719a2015-02-19 23:17:04205
[email protected]6b9028ab2014-07-23 17:15:38206 defines = [ "CONTENT_SHELL_VERSION=\"$content_shell_version\"" ]
207
Brett Wilson0380637c2014-09-19 21:24:40208 public_deps = [
209 # This exposes all public content APIs.
210 "//content/public/app:both",
211 "//content/public/browser",
212 "//content/public/common",
Brett Wilson0380637c2014-09-19 21:24:40213 "//content/public/renderer",
214 "//content/public/utility",
215 ]
[email protected]6b9028ab2014-07-23 17:15:38216 deps = [
ortunof78c8412016-03-31 18:59:59217 ":mojo_bindings",
[email protected]6b9028ab2014-07-23 17:15:38218 ":resources",
219 "//base",
220 "//base:base_static",
[email protected]6b9028ab2014-07-23 17:15:38221 "//base/third_party/dynamic_annotations",
222 "//cc",
xhwangbcd685812016-09-22 23:35:55223 "//components/cdm/renderer",
scottmgcfa5b01b2015-11-30 23:13:46224 "//components/crash/content/app:app_breakpad_mac_win_to_be_deleted",
chrishtr8a377e62015-06-01 19:20:08225 "//components/plugins/renderer",
jochen73e711c2015-06-03 10:01:46226 "//components/test_runner:test_runner",
rsleevi24f64dc22015-08-07 21:39:21227 "//components/url_formatter",
hanxi149b92d2014-09-11 21:57:18228 "//components/web_cache/renderer",
[email protected]6b9028ab2014-07-23 17:15:38229 "//content:resources",
[email protected]a9ca8d52014-08-22 10:21:08230 "//content/app/resources",
[email protected]6586a2e32014-08-09 19:24:12231 "//content/app/strings",
[email protected]6b9028ab2014-07-23 17:15:38232 "//content/gpu",
brettw6b0712a2016-07-15 17:48:20233 "//content/test:content_test_mojo_bindings",
[email protected]6b9028ab2014-07-23 17:15:38234 "//content/test:layouttest_support",
brettwb78fc9e2016-03-25 21:02:51235 "//content/test:test_support",
dpranke93211fc2015-04-29 04:59:42236 "//device/bluetooth",
ortunofd24faa2015-05-20 16:34:37237 "//device/bluetooth:mocks",
lethalantidote893681c2016-09-13 19:36:31238 "//device/geolocation",
[email protected]6b9028ab2014-07-23 17:15:38239 "//gin",
240 "//gpu",
241 "//ipc",
242 "//media",
chfremerb689c2a2016-10-27 23:04:46243 "//media/capture",
sammc9b9e5b42016-10-12 12:32:32244 "//mojo/edk/js",
[email protected]6b9028ab2014-07-23 17:15:38245 "//net",
246 "//net:net_resources",
brettw6b0712a2016-07-15 17:48:20247 "//sandbox",
rockot734fb662016-10-15 16:41:30248 "//services/service_manager/public/cpp",
[email protected]6b9028ab2014-07-23 17:15:38249 "//skia",
pilgrim4af8c212014-09-05 17:30:15250 "//storage/browser",
ortunofd24faa2015-05-20 16:34:37251 "//testing/gmock",
252 "//testing/gtest",
[email protected]6b9028ab2014-07-23 17:15:38253 "//third_party/WebKit/public:blink",
erga3c614c92015-04-03 17:47:51254 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46255 "//third_party/WebKit/public:resources",
[email protected]0e043592014-07-28 19:47:04256 "//third_party/WebKit/public:test_support",
[email protected]4eebe74d2014-08-13 02:54:46257 "//third_party/icu",
[email protected]6b9028ab2014-07-23 17:15:38258 "//ui/base",
spang1c36fac2015-02-05 19:55:12259 "//ui/base/ime",
brettw6b0712a2016-07-15 17:48:20260 "//ui/display",
[email protected]6b9028ab2014-07-23 17:15:38261 "//ui/events:events_base",
262 "//ui/gfx",
263 "//ui/gfx/geometry",
264 "//ui/gfx/ipc",
fsamuel6b98cf92016-04-28 05:42:24265 "//ui/gfx/ipc/geometry",
markdittmer99d77bf2016-03-31 19:03:24266 "//ui/gfx/ipc/skia",
[email protected]6b9028ab2014-07-23 17:15:38267 "//ui/gl",
268 "//url",
269 "//v8",
[email protected]6b9028ab2014-07-23 17:15:38270 ]
brettw6b0712a2016-07-15 17:48:20271
272 # Annoyingly, this target and layouttest_support have circular includes.
273 allow_circular_includes_from = [ "//content/test:layouttest_support" ]
274
jamesr50081742014-09-09 07:52:22275 if (enable_plugins) {
dcheng0d93c1a2015-12-03 02:46:41276 deps += [
277 "//content/ppapi_plugin",
dchengc70b36e2016-03-02 02:36:10278 "//ppapi:blink_deprecated_test_plugin",
dcheng0d93c1a2015-12-03 02:46:41279 "//ppapi:blink_test_plugin",
brettwb78fc9e2016-03-25 21:02:51280 "//ppapi/shared_impl",
dcheng0d93c1a2015-12-03 02:46:41281 ]
jamesr50081742014-09-09 07:52:22282 }
xhwangbe720032016-02-19 18:45:31283 if (mojo_media_host == "browser") {
xhwangd3b5d3f2016-05-18 03:37:59284 deps += [ "//media/mojo/services" ]
alokpaa2fdfb72016-02-03 22:55:54285 }
[email protected]6b9028ab2014-07-23 17:15:38286
287 if (is_win) {
vchigrin61944ae2015-01-30 23:51:32288 sources += [
289 "common/v8_breakpad_support_win.cc",
290 "common/v8_breakpad_support_win.h",
291 ]
[email protected]6b9028ab2014-07-23 17:15:38292 }
293
294 if (is_linux) {
brettwb78fc9e2016-03-25 21:02:51295 deps += [
296 "//build/linux:fontconfig",
297 "//ui/gfx:test_support",
298 ]
[email protected]6b9028ab2014-07-23 17:15:38299 }
300
301 if (use_x11) {
[email protected]c7990dbf2014-07-23 22:35:10302 # Some tests rely on this tool at runtime. Note: it might be better if
303 # the tests that needed it had this as a dep instead of adding it here.
sadrul1f7fa9f2015-10-06 17:14:57304 data_deps = [
305 "//tools/xdisplaycheck",
306 ]
dnicoara78a734702014-11-04 19:54:38307
kylecharad714872016-04-20 16:09:52308 deps += [ "//ui/events/devices/x11" ]
[email protected]6b9028ab2014-07-23 17:15:38309 }
310
311 if (is_android) {
James Robinson060f2e32014-09-10 22:31:37312 deps += [ "//content/shell/android:content_shell_jni_headers" ]
[email protected]6b9028ab2014-07-23 17:15:38313 }
314
torne1b1c9782015-03-30 20:49:00315 if (is_posix && !is_mac) {
brettwb78fc9e2016-03-25 21:02:51316 deps += [
317 "//components/crash/content/app",
318 "//components/crash/content/browser",
319 ]
[email protected]6b9028ab2014-07-23 17:15:38320 }
321
322 if (use_aura) {
323 deps += [
324 "//ui/aura",
325 "//ui/aura:test_support",
326 "//ui/events",
327 "//ui/strings",
328 "//ui/wm",
329 ]
330
331 if (toolkit_views) {
mohsen6eb57fb2016-07-22 03:14:08332 sources += [
333 "browser/shell_views.cc",
334 "browser/shell_web_contents_view_delegate_views.cc",
335 ]
[email protected]6b9028ab2014-07-23 17:15:38336 deps += [
337 "//ui/resources",
[email protected]6b9028ab2014-07-23 17:15:38338 "//ui/views",
339 "//ui/views:test_support",
agrieved7a71c882015-11-20 19:53:28340 "//ui/views/controls/webview",
brettwb78fc9e2016-03-25 21:02:51341 "//ui/wm:test_support",
[email protected]6b9028ab2014-07-23 17:15:38342 ]
343 } else {
mohsen6eb57fb2016-07-22 03:14:08344 sources += [
345 "browser/shell_aura.cc",
346 "browser/shell_web_contents_view_delegate_aura.cc",
347 ]
[email protected]6b9028ab2014-07-23 17:15:38348 }
James Robinson060f2e32014-09-10 22:31:37349 } else {
350 sources -= [
351 "browser/shell_platform_data_aura.cc",
352 "browser/shell_platform_data_aura.h",
353 ]
[email protected]6b9028ab2014-07-23 17:15:38354 }
355
[email protected]6b9028ab2014-07-23 17:15:38356 if (is_chromeos) {
357 deps += [
mukai6ba73552014-10-09 19:05:17358 "//chromeos",
[email protected]6b9028ab2014-07-23 17:15:38359 "//ui/wm:test_support",
[email protected]6b9028ab2014-07-23 17:15:38360 ]
361 }
362
bcf0ddf78a2016-02-02 18:52:21363 if (is_linux) {
[email protected]6b9028ab2014-07-23 17:15:38364 deps += [ "//third_party/freetype2" ]
365 }
366
367 if (!enable_plugins) {
368 sources -= [
369 "browser/shell_plugin_service_filter.cc",
370 "browser/shell_plugin_service_filter.h",
371 ]
372 }
373}
374
375grit("content_shell_resources_grit") {
brettwb78fc9e2016-03-25 21:02:51376 # External code should depend on ":resources" instead.
brettw9af42622014-09-06 21:21:02377 visibility = [ ":*" ]
[email protected]6b9028ab2014-07-23 17:15:38378 source = "shell_resources.grd"
379 outputs = [
380 "grit/shell_resources.h",
381 "shell_resources.pak",
[email protected]6b9028ab2014-07-23 17:15:38382 ]
383}
384
385copy("copy_shell_resources") {
scottmg7afc4092014-12-03 19:22:42386 sources = [
387 "$target_gen_dir/shell_resources.pak",
388 ]
scottmg34fb7e52014-12-03 23:27:24389 outputs = [
390 "$root_out_dir/shell_resources.pak",
391 ]
[email protected]6b9028ab2014-07-23 17:15:38392
scottmg7afc4092014-12-03 19:22:42393 public_deps = [
394 ":content_shell_resources_grit",
395 ]
[email protected]6b9028ab2014-07-23 17:15:38396}
397
[email protected]6b9028ab2014-07-23 17:15:38398group("resources") {
Brett Wilsone53895272014-09-23 23:41:46399 public_deps = [
[email protected]6b9028ab2014-07-23 17:15:38400 ":copy_shell_resources",
401 ]
jochen73e711c2015-06-03 10:01:46402 deps = [
403 "//components/test_runner:resources",
404 ]
tansell08c74c92016-11-02 05:45:47405 data_deps = [
406 "//components/test_runner:resources",
407 ]
[email protected]6b9028ab2014-07-23 17:15:38408}
409
410repack("pak") {
411 sources = [
erga3c614c92015-04-03 17:47:51412 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
413 "$root_gen_dir/blink/public/resources/blink_resources.pak",
[email protected]a9ca8d52014-08-22 10:21:08414 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
[email protected]6586a2e32014-08-09 19:24:12415 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
[email protected]6b9028ab2014-07-23 17:15:38416 "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
[email protected]6586a2e32014-08-09 19:24:12417 "$root_gen_dir/content/content_resources.pak",
[email protected]6b9028ab2014-07-23 17:15:38418 "$root_gen_dir/content/shell/shell_resources.pak",
419 "$root_gen_dir/net/net_resources.pak",
420 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
421 "$root_gen_dir/ui/resources/webui_resources.pak",
422 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
423 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
[email protected]6b9028ab2014-07-23 17:15:38424 ]
425
426 deps = [
427 ":resources",
428 "//content:resources",
[email protected]a9ca8d52014-08-22 10:21:08429 "//content/app/resources",
[email protected]6586a2e32014-08-09 19:24:12430 "//content/app/strings",
[email protected]6b9028ab2014-07-23 17:15:38431 "//content/browser/tracing:resources",
432 "//net:net_resources",
erga3c614c92015-04-03 17:47:51433 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46434 "//third_party/WebKit/public:resources",
[email protected]6b9028ab2014-07-23 17:15:38435 "//ui/resources",
436 "//ui/strings",
[email protected]6b9028ab2014-07-23 17:15:38437 ]
438
sadrul7bd20c92015-06-24 16:45:44439 if (toolkit_views) {
440 deps += [ "//ui/views/resources" ]
441 sources +=
442 [ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ]
443 }
444
vivek.vg77816a12014-12-18 14:28:20445 sources += [ "$root_gen_dir/blink/devtools_resources.pak" ]
cjhopman2fd48fd2014-09-24 00:52:56446 deps += [ "//content/browser/devtools:resources" ]
447 output = "$root_out_dir/content_shell.pak"
[email protected]6b9028ab2014-07-23 17:15:38448}
449
agrieve993374cf2016-04-13 00:05:39450if (is_android) {
451 group("content_shell") {
452 testonly = true
453 deps = [
454 "//content/shell/android:content_shell_apk",
455 ]
456 }
457} else if (is_mac) {
rsesek90112aa62016-05-03 17:33:36458 tweak_info_plist("content_shell_plist") {
459 testonly = true
460 info_plist = "app/app-Info.plist"
461 args = [
462 "--scm=1",
463 "--version",
464 content_shell_version,
465 ]
466 }
rsesek7f9d12b2016-04-29 02:45:56467 mac_app_bundle("content_shell") {
agrieve993374cf2016-04-13 00:05:39468 testonly = true
rsesek7f9d12b2016-04-29 02:45:56469 output_name = content_shell_product_name
470 sources = [
471 "app/shell_main.cc",
agrieve993374cf2016-04-13 00:05:39472 ]
rsesek7f9d12b2016-04-29 02:45:56473 deps = [
474 ":content_shell_framework_bundle_data",
475 ":content_shell_resources_bundle_data",
rsesek1cfe20c32016-07-27 17:44:51476 "//build/config/sanitizers:deps",
rsesek7f9d12b2016-04-29 02:45:56477
478 # TODO(rsesek): Remove this after GYP is gone, since it only needs to
479 # be here per the comment in blink_test_platform_support_mac.mm about
480 # the bundle structure.
481 "//components/test_runner:resources",
482 ]
rsesek6a8a5d02016-06-21 01:16:18483 ldflags = [
484 # The main app is at Content Shell.app/Contents/MacOS/Content Shell
485 # so set the rpath up to Contents/ so that the loader can find
486 # Framworks/.
487 "-rpath",
488 "@executable_path/../",
489 ]
rsesek90112aa62016-05-03 17:33:36490 info_plist_target = ":content_shell_plist"
agrieve993374cf2016-04-13 00:05:39491 }
492} else {
scottmg7afc4092014-12-03 19:22:42493 executable("content_shell") {
494 testonly = true
James Robinson060f2e32014-09-10 22:31:37495
scottmg7afc4092014-12-03 19:22:42496 sources = [
scottmg7afc4092014-12-03 19:22:42497 "app/shell_main.cc",
498 ]
[email protected]6b9028ab2014-07-23 17:15:38499
brucedawsond4fde4c2016-05-02 19:03:58500 if (is_win) {
501 sources += [ "app/shell.rc" ]
502 }
503
skobes502412ae2016-01-19 17:40:43504 defines = []
505
scottmg7afc4092014-12-03 19:22:42506 deps = [
507 ":content_shell_lib",
508 ":pak",
brettwba7a73d2015-08-31 22:17:39509 "//build/config/sanitizers:deps",
brettw2e2220c2015-07-21 18:56:35510 "//build/win:default_exe_manifest",
scottmg7afc4092014-12-03 19:22:42511 ]
[email protected]6b9028ab2014-07-23 17:15:38512
tansell08c74c92016-11-02 05:45:47513 data_deps = [
514 ":pak",
515 ]
516
scottmg7afc4092014-12-03 19:22:42517 if (is_win) {
518 deps += [ "//sandbox" ]
brucedawsond4fde4c2016-05-02 19:03:58519
520 # This is a large module that can't do incremental linking in some cases.
521 configs -= [ "//build/config/win:default_incremental_linking" ]
522 configs +=
523 [ "//build/config/win:default_large_module_incremental_linking" ]
skobes502412ae2016-01-19 17:40:43524 if (win_console_app) {
525 defines += [ "WIN_CONSOLE_APP" ]
526 } else {
527 # Set /SUBSYSTEM:WINDOWS unless a console build has been requested.
scottmg7afc4092014-12-03 19:22:42528 configs -= [ "//build/config/win:console" ]
529 configs += [ "//build/config/win:windowed" ]
530 }
531 }
532
wangxianzhu1a34fa32016-03-10 21:03:00533 if (is_linux && !is_component_build) {
534 # Set rpath to find our own libfreetype even in a non-component build.
535 configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
536 }
[email protected]6b9028ab2014-07-23 17:15:38537 }
James Robinson060f2e32014-09-10 22:31:37538}
tfarina10ae51f62015-05-13 03:35:57539
tfarina795e01a2015-05-15 19:29:57540if (is_win) {
brettw0d3b1df2015-12-03 00:10:01541 executable("content_shell_crash_service") {
tfarina795e01a2015-05-15 19:29:57542 sources = [
543 "tools/content_shell_crash_service.cc",
544 ]
545
546 deps = [
547 "//base",
brettwba7a73d2015-08-31 22:17:39548 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07549 "//build/win:default_exe_manifest",
sdefresne8ba0b88c2015-09-18 10:33:13550 "//components/crash/content/tools:crash_service",
tfarina795e01a2015-05-15 19:29:57551 ]
552
553 configs -= [ "//build/config/win:console" ]
554 configs += [ "//build/config/win:windowed" ]
555 }
sebmarchanda2df3392016-07-13 15:34:59556
557 if (is_syzyasan) {
558 syzygy_asan("content_shell_syzyasan") {
559 binary_name = "content_shell.exe"
560 dest_dir = "$root_out_dir/syzygy"
561 deps = [
562 "//content/shell:content_shell",
563 ]
564 testonly = true
565 }
566 }
tfarina795e01a2015-05-15 19:29:57567}
brettwe1d40652015-10-23 23:06:10568
569if (is_mac) {
rsesek7f9d12b2016-04-29 02:45:56570 mac_xib_bundle_data("content_shell_framework_xibs") {
571 sources = [
572 "app/English.lproj/HttpAuth.xib",
573 "app/English.lproj/MainMenu.xib",
574 ]
575 output_path = "{{bundle_resources_dir}}/English.lproj"
576 }
577
578 bundle_data("content_shell_framework_resources") {
579 sources = [
580 "$root_out_dir/content_shell.pak",
rsesek7f9d12b2016-04-29 02:45:56581 "resources/missingImage.png",
582 "resources/textAreaResizeCorner.png",
583 ]
584
585 public_deps = [
586 ":pak",
587 ]
588
jshin359df9c92016-07-30 06:59:49589 if (icu_use_data_file) {
590 sources += [ "$root_out_dir/icudtl.dat" ]
591 deps = [
592 "//third_party/icu:icudata",
593 ]
594 }
rsesek7f9d12b2016-04-29 02:45:56595
596 if (v8_use_external_startup_data) {
597 sources += [
598 "$root_out_dir/natives_blob.bin",
599 "$root_out_dir/snapshot_blob.bin",
600 ]
601 public_deps += [ "//v8" ]
602 }
603
604 outputs = [
605 "{{bundle_resources_dir}}/{{source_file_part}}",
606 ]
607 }
608
609 if (enable_plugins) {
610 bundle_data("content_shell_framework_plugins") {
611 sources = [
612 "$root_out_dir/blink_deprecated_test_plugin.plugin",
613 "$root_out_dir/blink_test_plugin.plugin",
614 ]
615
616 outputs = [
617 "{{bundle_root_dir}}/{{source_file_part}}",
618 ]
619
620 public_deps = [
621 "//ppapi:blink_deprecated_test_plugin",
622 "//ppapi:blink_test_plugin",
623 ]
624 }
625 }
626
627 content_shell_framework_name = "$content_shell_product_name Framework"
628 content_shell_helper_name = "$content_shell_product_name Helper"
629
rsesek90112aa62016-05-03 17:33:36630 tweak_info_plist("content_shell_framework_plist") {
631 testonly = true
632 info_plist = "app/framework-Info.plist"
633 args = [
mark8ecf7882016-08-02 17:46:32634 "--breakpad=0",
rsesek90112aa62016-05-03 17:33:36635 "--keystone=0",
636 "--scm=1",
637 "--version",
638 content_shell_version,
639 "--branding",
640 content_shell_product_name,
641 ]
642 }
643
rsesek7f9d12b2016-04-29 02:45:56644 mac_framework_bundle("content_shell_framework") {
brettwe1d40652015-10-23 23:06:10645 testonly = true
646
rsesek7f9d12b2016-04-29 02:45:56647 output_name = content_shell_framework_name
brettwe1d40652015-10-23 23:06:10648
649 sources = [
tfarinac708f3972015-10-25 17:42:50650 "app/shell_content_main.cc",
651 "app/shell_content_main.h",
brettwe1d40652015-10-23 23:06:10652 ]
653
rsesek7f9d12b2016-04-29 02:45:56654 # TODO(rsesek): Handle these missing pieces:
655 # - crash_inspector
656 # - crash_report_sender.app
657
brettw6b0712a2016-07-15 17:48:20658 public_deps = [
659 ":content_shell_lib",
660 ]
brettwe1d40652015-10-23 23:06:10661 deps = [
rsesek7f9d12b2016-04-29 02:45:56662 ":content_shell_framework_resources",
663 ":content_shell_framework_xibs",
rsesek7f9d12b2016-04-29 02:45:56664 "//third_party/icu:icudata",
brettwe1d40652015-10-23 23:06:10665 ]
rsesek7f9d12b2016-04-29 02:45:56666
667 if (enable_plugins) {
668 deps += [ ":content_shell_framework_plugins" ]
669 }
670
rsesek6a8a5d02016-06-21 01:16:18671 # Both the main :content_shell and :content_shell_helper_app executables
672 # need to link the framework. Because they are at different directory
673 # depths, using @executable_path as the install_name would require using
674 # install_name_tool on one of the executables. However install_name_tool
675 # only operates in-place, which is problematic to express in GN. Instead,
676 # use rpath-based loading.
677 # TODO(rsesek): After GYP is gone, re-write content_shell_main to be like
678 # chrome_main and use dlopen() instead of a linked framework.
679 ldflags = [ "-Wl,-install_name,@rpath/Frameworks/$output_name.framework/$output_name" ]
680
681 if (is_component_build) {
682 # Set up the rpath for the framework so that it can find dylibs in the
683 # root output directory. The framework is at
684 # Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Content Shell Framework
685 # so use loader_path to go back to the root output directory.
686 ldflags += [
687 "-rpath",
688 "@loader_path/../../../..",
689 ]
690 }
rsesek7f9d12b2016-04-29 02:45:56691
rsesek90112aa62016-05-03 17:33:36692 info_plist_target = ":content_shell_framework_plist"
693 }
694
695 tweak_info_plist("content_shell_helper_plist") {
696 testonly = true
697 info_plist = "app/helper-Info.plist"
698 args = [
699 "--breakpad=0",
700 "--keystone=0",
701 "--scm=0",
702 "--version",
703 content_shell_version,
704 ]
brettwe1d40652015-10-23 23:06:10705 }
rsesek20a58a62016-04-15 20:59:23706
707 mac_app_bundle("content_shell_helper_app") {
708 testonly = true
rsesek7f9d12b2016-04-29 02:45:56709 output_name = content_shell_helper_name
rsesek20a58a62016-04-15 20:59:23710 sources = [
711 "app/shell_main.cc",
712 ]
713 deps = [
rsesek7f9d12b2016-04-29 02:45:56714 ":content_shell_framework+link",
rsesek1cfe20c32016-07-27 17:44:51715 "//build/config/sanitizers:deps",
rsesek20a58a62016-04-15 20:59:23716 ]
rsesek02aa51c2016-05-11 02:13:57717 ldflags = [
718 # The helper is in Content Shell.app/Contents/Frameworks/Content Shell Helper.app/Contents/MacOS/
rsesek6a8a5d02016-06-21 01:16:18719 # so set rpath up to Contents/ so that the loader can find Frameworks/.
rsesek02aa51c2016-05-11 02:13:57720 "-rpath",
rsesek6a8a5d02016-06-21 01:16:18721 "@executable_path/../../../..",
rsesek02aa51c2016-05-11 02:13:57722 ]
rsesek90112aa62016-05-03 17:33:36723 info_plist_target = ":content_shell_helper_plist"
rsesek20a58a62016-04-15 20:59:23724 }
rsesek7f9d12b2016-04-29 02:45:56725
rsesek7f9d12b2016-04-29 02:45:56726 bundle_data("content_shell_framework_bundle_data") {
727 testonly = true
728 sources = [
729 "$root_out_dir/$content_shell_framework_name.framework",
730 "$root_out_dir/$content_shell_helper_name.app",
731 ]
732 outputs = [
733 "{{bundle_root_dir}}/Frameworks/{{source_file_part}}",
734 ]
735 public_deps = [
736 ":content_shell_framework+link",
rsesek6a8a5d02016-06-21 01:16:18737 ":content_shell_helper_app",
rsesek7f9d12b2016-04-29 02:45:56738 ]
739 }
740
741 bundle_data("content_shell_resources_bundle_data") {
742 testonly = true
743 sources = [
744 "app/app.icns",
745 ]
746 outputs = [
747 "{{bundle_resources_dir}}/{{source_file_part}}",
748 ]
749 }
brettwe1d40652015-10-23 23:06:10750}
ortunof78c8412016-03-31 18:59:59751
752mojom("mojo_bindings") {
753 sources = [
754 "common/layout_test/layout_test_bluetooth_fake_adapter_setter.mojom",
755 ]
756}