blob: 855fa20cc91f199c0b8fdd9184705e3e26c5573d [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")
[email protected]6b9028ab2014-07-23 17:15:3819}
20
21declare_args() {
22 content_shell_product_name = "Content Shell"
esprehnb3789092015-11-24 19:46:0323 content_shell_version = "99.77.34.5"
[email protected]6b9028ab2014-07-23 17:15:3824}
25
thakisff2eab9c2015-11-13 00:29:5826config("content_shell_lib_warnings") {
27 if (is_clang) {
28 # TODO(thakis): Remove this once http://crbug.com/383820 is figured out
29 cflags = [ "-Wno-nonnull" ]
30 }
31}
32
[email protected]6b9028ab2014-07-23 17:15:3833static_library("content_shell_lib") {
Brett Wilson8f80ad0b2014-09-08 19:50:2434 testonly = true
[email protected]6b9028ab2014-07-23 17:15:3835 sources = [
dprankec6beb8392015-10-30 23:44:2136 "android/shell_descriptors.h",
[email protected]6b9028ab2014-07-23 17:15:3837 "android/shell_jni_registrar.cc",
38 "android/shell_jni_registrar.h",
39 "android/shell_manager.cc",
40 "android/shell_manager.h",
lukasza88e4b0b42016-02-25 21:42:1041 "app/blink_test_platform_support.h",
42 "app/blink_test_platform_support_android.cc",
43 "app/blink_test_platform_support_linux.cc",
44 "app/blink_test_platform_support_mac.mm",
45 "app/blink_test_platform_support_win.cc",
[email protected]6b9028ab2014-07-23 17:15:3846 "app/paths_mac.h",
47 "app/paths_mac.mm",
rseseka0a7a042014-09-18 23:59:2048 "app/shell_crash_reporter_client.cc",
49 "app/shell_crash_reporter_client.h",
[email protected]6b9028ab2014-07-23 17:15:3850 "app/shell_main_delegate.cc",
51 "app/shell_main_delegate.h",
52 "app/shell_main_delegate_mac.h",
53 "app/shell_main_delegate_mac.mm",
jochen5ce1af92016-02-17 20:39:4554 "browser/layout_test/blink_test_controller.cc",
55 "browser/layout_test/blink_test_controller.h",
mkwstd6805d0d2014-10-16 14:44:3756 "browser/layout_test/layout_test_android.cc",
57 "browser/layout_test/layout_test_android.h",
ortunofd24faa2015-05-20 16:34:3758 "browser/layout_test/layout_test_bluetooth_adapter_provider.cc",
59 "browser/layout_test/layout_test_bluetooth_adapter_provider.h",
jyasskin8057c002015-09-10 19:09:5360 "browser/layout_test/layout_test_bluetooth_chooser_factory.cc",
61 "browser/layout_test/layout_test_bluetooth_chooser_factory.h",
ortunof78c8412016-03-31 18:59:5962 "browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.cc",
63 "browser/layout_test/layout_test_bluetooth_fake_adapter_setter_impl.h",
mkwstd993d06a2014-10-10 11:44:3864 "browser/layout_test/layout_test_browser_context.cc",
65 "browser/layout_test/layout_test_browser_context.h",
mkwst88e23182014-10-16 12:08:5866 "browser/layout_test/layout_test_browser_main.cc",
67 "browser/layout_test/layout_test_browser_main.h",
mkwst36b11b6f2014-10-15 16:18:5668 "browser/layout_test/layout_test_browser_main_parts.cc",
69 "browser/layout_test/layout_test_browser_main_parts.h",
petercd7abb42014-10-17 13:34:0170 "browser/layout_test/layout_test_content_browser_client.cc",
71 "browser/layout_test/layout_test_content_browser_client.h",
mkwst30d20d52014-10-09 13:33:1472 "browser/layout_test/layout_test_devtools_frontend.cc",
73 "browser/layout_test/layout_test_devtools_frontend.h",
mkwst94388f792014-10-16 07:36:5274 "browser/layout_test/layout_test_download_manager_delegate.cc",
75 "browser/layout_test/layout_test_download_manager_delegate.h",
mkwst6efe7f2e62014-10-08 15:09:0176 "browser/layout_test/layout_test_javascript_dialog_manager.cc",
77 "browser/layout_test/layout_test_javascript_dialog_manager.h",
Peter Beverlooe8f2f9d2014-10-20 16:47:4978 "browser/layout_test/layout_test_message_filter.cc",
79 "browser/layout_test/layout_test_message_filter.h",
petercd7abb42014-10-17 13:34:0180 "browser/layout_test/layout_test_notification_manager.cc",
81 "browser/layout_test/layout_test_notification_manager.h",
mlamouri4e372022015-03-29 14:51:0682 "browser/layout_test/layout_test_permission_manager.cc",
83 "browser/layout_test/layout_test_permission_manager.h",
mvanouwerkerkde895c9c2014-12-06 12:17:3284 "browser/layout_test/layout_test_push_messaging_service.cc",
85 "browser/layout_test/layout_test_push_messaging_service.h",
mkwst002d02902014-10-09 10:17:0086 "browser/layout_test/layout_test_resource_dispatcher_host_delegate.cc",
87 "browser/layout_test/layout_test_resource_dispatcher_host_delegate.h",
mkwst94388f792014-10-16 07:36:5288 "browser/layout_test/layout_test_url_request_context_getter.cc",
89 "browser/layout_test/layout_test_url_request_context_getter.h",
lukasza8e550a02016-04-18 18:34:1790 "browser/layout_test/secondary_test_window_observer.cc",
91 "browser/layout_test/secondary_test_window_observer.h",
jochene9ba6dd2016-02-23 17:20:4992 "browser/layout_test/test_info_extractor.cc",
93 "browser/layout_test/test_info_extractor.h",
peter11d5f562014-10-23 23:12:2594 "browser/shell.cc",
95 "browser/shell.h",
96 "browser/shell_access_token_store.cc",
97 "browser/shell_access_token_store.h",
[email protected]6b9028ab2014-07-23 17:15:3898 "browser/shell_android.cc",
99 "browser/shell_application_mac.h",
100 "browser/shell_application_mac.mm",
101 "browser/shell_browser_context.cc",
102 "browser/shell_browser_context.h",
103 "browser/shell_browser_main.cc",
104 "browser/shell_browser_main.h",
105 "browser/shell_browser_main_parts.cc",
106 "browser/shell_browser_main_parts.h",
107 "browser/shell_browser_main_parts_mac.mm",
[email protected]6b9028ab2014-07-23 17:15:38108 "browser/shell_content_browser_client.cc",
109 "browser/shell_content_browser_client.h",
[email protected]6b9028ab2014-07-23 17:15:38110 "browser/shell_devtools_frontend.cc",
111 "browser/shell_devtools_frontend.h",
satorux7fa9d302015-02-16 00:44:52112 "browser/shell_devtools_manager_delegate.cc",
113 "browser/shell_devtools_manager_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38114 "browser/shell_download_manager_delegate.cc",
115 "browser/shell_download_manager_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38116 "browser/shell_javascript_dialog.h",
117 "browser/shell_javascript_dialog_mac.mm",
118 "browser/shell_javascript_dialog_manager.cc",
119 "browser/shell_javascript_dialog_manager.h",
120 "browser/shell_javascript_dialog_win.cc",
[email protected]6b9028ab2014-07-23 17:15:38121 "browser/shell_login_dialog.cc",
122 "browser/shell_login_dialog.h",
123 "browser/shell_login_dialog_mac.mm",
124 "browser/shell_mac.mm",
satorux7fa9d302015-02-16 00:44:52125 "browser/shell_mojo_test_utils_android.cc",
126 "browser/shell_mojo_test_utils_android.h",
[email protected]6b9028ab2014-07-23 17:15:38127 "browser/shell_net_log.cc",
128 "browser/shell_net_log.h",
129 "browser/shell_network_delegate.cc",
130 "browser/shell_network_delegate.h",
mlamouri4e372022015-03-29 14:51:06131 "browser/shell_permission_manager.cc",
132 "browser/shell_permission_manager.h",
[email protected]6b9028ab2014-07-23 17:15:38133 "browser/shell_platform_data_aura.cc",
134 "browser/shell_platform_data_aura.h",
135 "browser/shell_plugin_service_filter.cc",
136 "browser/shell_plugin_service_filter.h",
137 "browser/shell_quota_permission_context.cc",
138 "browser/shell_quota_permission_context.h",
139 "browser/shell_resource_dispatcher_host_delegate.cc",
140 "browser/shell_resource_dispatcher_host_delegate.h",
141 "browser/shell_speech_recognition_manager_delegate.cc",
142 "browser/shell_speech_recognition_manager_delegate.h",
143 "browser/shell_url_request_context_getter.cc",
144 "browser/shell_url_request_context_getter.h",
satorux7fa9d302015-02-16 00:44:52145 "browser/shell_web_contents_view_delegate.h",
[email protected]6b9028ab2014-07-23 17:15:38146 "browser/shell_web_contents_view_delegate_android.cc",
147 "browser/shell_web_contents_view_delegate_creator.h",
[email protected]6b9028ab2014-07-23 17:15:38148 "browser/shell_web_contents_view_delegate_mac.mm",
149 "browser/shell_web_contents_view_delegate_win.cc",
lukasza80f7f602016-03-22 23:13:19150 "common/layout_test/layout_test_content_client.cc",
151 "common/layout_test/layout_test_content_client.h",
petere04203592014-10-27 17:57:35152 "common/layout_test/layout_test_messages.cc",
153 "common/layout_test/layout_test_messages.h",
lukasza381b0492016-03-10 16:48:43154 "common/layout_test/layout_test_switches.cc",
155 "common/layout_test/layout_test_switches.h",
[email protected]6b9028ab2014-07-23 17:15:38156 "common/leak_detection_result.h",
157 "common/shell_content_client.cc",
158 "common/shell_content_client.h",
159 "common/shell_messages.cc",
160 "common/shell_messages.h",
161 "common/shell_switches.cc",
162 "common/shell_switches.h",
163 "common/shell_test_configuration.cc",
164 "common/shell_test_configuration.h",
tfarina685c39802015-05-04 22:11:22165 "renderer/layout_test/blink_test_helpers.cc",
166 "renderer/layout_test/blink_test_helpers.h",
tfarina8e08285f2015-05-02 03:17:39167 "renderer/layout_test/blink_test_runner.cc",
168 "renderer/layout_test/blink_test_runner.h",
mkwst02ec0d62014-10-07 22:07:29169 "renderer/layout_test/layout_test_content_renderer_client.cc",
170 "renderer/layout_test/layout_test_content_renderer_client.h",
mkwst3e72c1f2014-10-08 05:02:36171 "renderer/layout_test/layout_test_render_frame_observer.cc",
172 "renderer/layout_test/layout_test_render_frame_observer.h",
tyoshino832a58a2016-04-18 08:14:08173 "renderer/layout_test/layout_test_render_thread_observer.cc",
174 "renderer/layout_test/layout_test_render_thread_observer.h",
mkwst04b72d12014-10-08 15:52:55175 "renderer/layout_test/leak_detector.cc",
176 "renderer/layout_test/leak_detector.h",
jochen51265132015-05-28 07:33:45177 "renderer/layout_test/test_media_stream_renderer_factory.cc",
178 "renderer/layout_test/test_media_stream_renderer_factory.h",
179 "renderer/layout_test/test_video_frame_provider.cc",
180 "renderer/layout_test/test_video_frame_provider.h",
[email protected]6b9028ab2014-07-23 17:15:38181 "renderer/shell_content_renderer_client.cc",
182 "renderer/shell_content_renderer_client.h",
[email protected]6b9028ab2014-07-23 17:15:38183 "renderer/shell_render_view_observer.cc",
184 "renderer/shell_render_view_observer.h",
rockotb814a582015-06-05 00:30:52185 "utility/shell_content_utility_client.cc",
186 "utility/shell_content_utility_client.h",
[email protected]6b9028ab2014-07-23 17:15:38187 ]
188
brettwbc8b2a22015-07-28 18:24:42189 configs += [
thakisff2eab9c2015-11-13 00:29:58190 ":content_shell_lib_warnings",
brettwbc8b2a22015-07-28 18:24:42191 "//build/config:precompiled_headers",
192
193 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
194 "//build/config/compiler:no_size_t_to_int_warning",
kozyatinskiy6adbc802016-01-28 00:16:16195
196 "//third_party/WebKit/public:debug_devtools",
brettwbc8b2a22015-07-28 18:24:42197 ]
brettwd1c719a2015-02-19 23:17:04198
[email protected]6b9028ab2014-07-23 17:15:38199 defines = [ "CONTENT_SHELL_VERSION=\"$content_shell_version\"" ]
200
Brett Wilson0380637c2014-09-19 21:24:40201 public_deps = [
202 # This exposes all public content APIs.
203 "//content/public/app:both",
204 "//content/public/browser",
205 "//content/public/common",
Brett Wilson0380637c2014-09-19 21:24:40206 "//content/public/renderer",
207 "//content/public/utility",
208 ]
[email protected]6b9028ab2014-07-23 17:15:38209 deps = [
ortunof78c8412016-03-31 18:59:59210 ":mojo_bindings",
[email protected]6b9028ab2014-07-23 17:15:38211 ":resources",
212 "//base",
213 "//base:base_static",
[email protected]6b9028ab2014-07-23 17:15:38214 "//base/third_party/dynamic_annotations",
215 "//cc",
scottmgcfa5b01b2015-11-30 23:13:46216 "//components/crash/content/app:app_breakpad_mac_win_to_be_deleted",
dgozmanf7200152015-04-22 17:48:21217 "//components/devtools_discovery",
dgozman102fee92015-04-20 15:45:46218 "//components/devtools_http_handler",
chrishtr8a377e62015-06-01 19:20:08219 "//components/plugins/renderer",
jochen73e711c2015-06-03 10:01:46220 "//components/test_runner:test_runner",
rsleevi24f64dc22015-08-07 21:39:21221 "//components/url_formatter",
hanxi149b92d2014-09-11 21:57:18222 "//components/web_cache/renderer",
[email protected]6b9028ab2014-07-23 17:15:38223 "//content:resources",
[email protected]a9ca8d52014-08-22 10:21:08224 "//content/app/resources",
[email protected]6586a2e32014-08-09 19:24:12225 "//content/app/strings",
[email protected]6b9028ab2014-07-23 17:15:38226 "//content/gpu",
[email protected]6b9028ab2014-07-23 17:15:38227 "//content/test:layouttest_support",
brettwb78fc9e2016-03-25 21:02:51228 "//content/test:test_support",
dpranke93211fc2015-04-29 04:59:42229 "//device/bluetooth",
ortunofd24faa2015-05-20 16:34:37230 "//device/bluetooth:mocks",
[email protected]6b9028ab2014-07-23 17:15:38231 "//gin",
232 "//gpu",
233 "//ipc",
234 "//media",
brettwb78fc9e2016-03-25 21:02:51235 "//media/mojo/services:application_factory",
[email protected]6b9028ab2014-07-23 17:15:38236 "//net",
237 "//net:net_resources",
238 "//skia",
pilgrim4af8c212014-09-05 17:30:15239 "//storage/browser",
ortunofd24faa2015-05-20 16:34:37240 "//testing/gmock",
241 "//testing/gtest",
[email protected]6b9028ab2014-07-23 17:15:38242 "//third_party/WebKit/public:blink",
erga3c614c92015-04-03 17:47:51243 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46244 "//third_party/WebKit/public:resources",
[email protected]0e043592014-07-28 19:47:04245 "//third_party/WebKit/public:test_support",
[email protected]4eebe74d2014-08-13 02:54:46246 "//third_party/icu",
[email protected]6b9028ab2014-07-23 17:15:38247 "//ui/base",
spang1c36fac2015-02-05 19:55:12248 "//ui/base/ime",
[email protected]6b9028ab2014-07-23 17:15:38249 "//ui/events:events_base",
250 "//ui/gfx",
251 "//ui/gfx/geometry",
252 "//ui/gfx/ipc",
fsamuel6b98cf92016-04-28 05:42:24253 "//ui/gfx/ipc/geometry",
markdittmer99d77bf2016-03-31 19:03:24254 "//ui/gfx/ipc/skia",
[email protected]6b9028ab2014-07-23 17:15:38255 "//ui/gl",
256 "//url",
257 "//v8",
[email protected]6b9028ab2014-07-23 17:15:38258 ]
jamesr50081742014-09-09 07:52:22259 if (enable_plugins) {
dcheng0d93c1a2015-12-03 02:46:41260 deps += [
261 "//content/ppapi_plugin",
dchengc70b36e2016-03-02 02:36:10262 "//ppapi:blink_deprecated_test_plugin",
dcheng0d93c1a2015-12-03 02:46:41263 "//ppapi:blink_test_plugin",
brettwb78fc9e2016-03-25 21:02:51264 "//ppapi/shared_impl",
dcheng0d93c1a2015-12-03 02:46:41265 ]
jamesr50081742014-09-09 07:52:22266 }
xhwangbe720032016-02-19 18:45:31267 if (mojo_media_host == "browser") {
xhwang755165d2016-02-18 17:29:58268 deps += [ "//media/mojo/services:application_factory" ]
alokpaa2fdfb72016-02-03 22:55:54269 }
[email protected]6b9028ab2014-07-23 17:15:38270
271 if (is_win) {
[email protected]6b9028ab2014-07-23 17:15:38272 #'LinkIncremental': '<(msvs_large_module_debug_link_mode)', TODO(GYP)
vchigrin61944ae2015-01-30 23:51:32273 sources += [
274 "common/v8_breakpad_support_win.cc",
275 "common/v8_breakpad_support_win.h",
276 ]
[email protected]6b9028ab2014-07-23 17:15:38277 }
278
279 if (is_linux) {
brettwb78fc9e2016-03-25 21:02:51280 deps += [
281 "//build/linux:fontconfig",
282 "//ui/gfx:test_support",
283 ]
[email protected]6b9028ab2014-07-23 17:15:38284 }
285
286 if (use_x11) {
[email protected]c7990dbf2014-07-23 22:35:10287 # Some tests rely on this tool at runtime. Note: it might be better if
288 # the tests that needed it had this as a dep instead of adding it here.
sadrul1f7fa9f2015-10-06 17:14:57289 data_deps = [
290 "//tools/xdisplaycheck",
291 ]
dnicoara78a734702014-11-04 19:54:38292
kylecharad714872016-04-20 16:09:52293 deps += [ "//ui/events/devices/x11" ]
[email protected]6b9028ab2014-07-23 17:15:38294 }
295
296 if (is_android) {
James Robinson060f2e32014-09-10 22:31:37297 deps += [ "//content/shell/android:content_shell_jni_headers" ]
[email protected]6b9028ab2014-07-23 17:15:38298 }
299
torne1b1c9782015-03-30 20:49:00300 if (is_posix && !is_mac) {
brettwb78fc9e2016-03-25 21:02:51301 deps += [
302 "//components/crash/content/app",
303 "//components/crash/content/browser",
304 ]
[email protected]6b9028ab2014-07-23 17:15:38305 }
306
307 if (use_aura) {
308 deps += [
309 "//ui/aura",
310 "//ui/aura:test_support",
311 "//ui/events",
312 "//ui/strings",
313 "//ui/wm",
314 ]
315
316 if (toolkit_views) {
317 sources += [ "browser/shell_views.cc" ]
318 deps += [
319 "//ui/resources",
[email protected]6b9028ab2014-07-23 17:15:38320 "//ui/views",
321 "//ui/views:test_support",
agrieved7a71c882015-11-20 19:53:28322 "//ui/views/controls/webview",
brettwb78fc9e2016-03-25 21:02:51323 "//ui/wm:test_support",
[email protected]6b9028ab2014-07-23 17:15:38324 ]
325 } else {
326 sources += [ "browser/shell_aura.cc" ]
327 }
James Robinson060f2e32014-09-10 22:31:37328 } else {
329 sources -= [
330 "browser/shell_platform_data_aura.cc",
331 "browser/shell_platform_data_aura.h",
332 ]
[email protected]6b9028ab2014-07-23 17:15:38333 }
334
[email protected]6b9028ab2014-07-23 17:15:38335 if (is_chromeos) {
336 deps += [
mukai6ba73552014-10-09 19:05:17337 "//chromeos",
[email protected]6b9028ab2014-07-23 17:15:38338 "//ui/wm:test_support",
[email protected]6b9028ab2014-07-23 17:15:38339 ]
340 }
341
bcf0ddf78a2016-02-02 18:52:21342 if (is_linux) {
[email protected]6b9028ab2014-07-23 17:15:38343 deps += [ "//third_party/freetype2" ]
344 }
345
346 if (!enable_plugins) {
347 sources -= [
348 "browser/shell_plugin_service_filter.cc",
349 "browser/shell_plugin_service_filter.h",
350 ]
351 }
352}
353
354grit("content_shell_resources_grit") {
brettwb78fc9e2016-03-25 21:02:51355 # External code should depend on ":resources" instead.
brettw9af42622014-09-06 21:21:02356 visibility = [ ":*" ]
[email protected]6b9028ab2014-07-23 17:15:38357 source = "shell_resources.grd"
358 outputs = [
359 "grit/shell_resources.h",
360 "shell_resources.pak",
[email protected]6b9028ab2014-07-23 17:15:38361 ]
362}
363
364copy("copy_shell_resources") {
scottmg7afc4092014-12-03 19:22:42365 sources = [
366 "$target_gen_dir/shell_resources.pak",
367 ]
scottmg34fb7e52014-12-03 23:27:24368 outputs = [
369 "$root_out_dir/shell_resources.pak",
370 ]
[email protected]6b9028ab2014-07-23 17:15:38371
scottmg7afc4092014-12-03 19:22:42372 public_deps = [
373 ":content_shell_resources_grit",
374 ]
[email protected]6b9028ab2014-07-23 17:15:38375}
376
[email protected]6b9028ab2014-07-23 17:15:38377group("resources") {
Brett Wilsone53895272014-09-23 23:41:46378 public_deps = [
[email protected]6b9028ab2014-07-23 17:15:38379 ":copy_shell_resources",
380 ]
jochen73e711c2015-06-03 10:01:46381 deps = [
382 "//components/test_runner:resources",
383 ]
[email protected]6b9028ab2014-07-23 17:15:38384}
385
386repack("pak") {
387 sources = [
erga3c614c92015-04-03 17:47:51388 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
389 "$root_gen_dir/blink/public/resources/blink_resources.pak",
[email protected]a9ca8d52014-08-22 10:21:08390 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
[email protected]6586a2e32014-08-09 19:24:12391 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
[email protected]6b9028ab2014-07-23 17:15:38392 "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
[email protected]6586a2e32014-08-09 19:24:12393 "$root_gen_dir/content/content_resources.pak",
[email protected]6b9028ab2014-07-23 17:15:38394 "$root_gen_dir/content/shell/shell_resources.pak",
395 "$root_gen_dir/net/net_resources.pak",
396 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
397 "$root_gen_dir/ui/resources/webui_resources.pak",
398 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
399 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
[email protected]6b9028ab2014-07-23 17:15:38400 ]
401
402 deps = [
403 ":resources",
404 "//content:resources",
[email protected]a9ca8d52014-08-22 10:21:08405 "//content/app/resources",
[email protected]6586a2e32014-08-09 19:24:12406 "//content/app/strings",
[email protected]6b9028ab2014-07-23 17:15:38407 "//content/browser/tracing:resources",
408 "//net:net_resources",
erga3c614c92015-04-03 17:47:51409 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46410 "//third_party/WebKit/public:resources",
[email protected]6b9028ab2014-07-23 17:15:38411 "//ui/resources",
412 "//ui/strings",
[email protected]6b9028ab2014-07-23 17:15:38413 ]
414
sadrul7bd20c92015-06-24 16:45:44415 if (toolkit_views) {
416 deps += [ "//ui/views/resources" ]
417 sources +=
418 [ "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak" ]
419 }
420
vivek.vg77816a12014-12-18 14:28:20421 sources += [ "$root_gen_dir/blink/devtools_resources.pak" ]
cjhopman2fd48fd2014-09-24 00:52:56422 deps += [ "//content/browser/devtools:resources" ]
423 output = "$root_out_dir/content_shell.pak"
[email protected]6b9028ab2014-07-23 17:15:38424}
425
agrieve993374cf2016-04-13 00:05:39426if (is_android) {
427 group("content_shell") {
428 testonly = true
429 deps = [
430 "//content/shell/android:content_shell_apk",
431 ]
432 }
433} else if (is_mac) {
rsesek7f9d12b2016-04-29 02:45:56434 mac_app_bundle("content_shell") {
agrieve993374cf2016-04-13 00:05:39435 testonly = true
rsesek7f9d12b2016-04-29 02:45:56436 output_name = content_shell_product_name
437 sources = [
438 "app/shell_main.cc",
agrieve993374cf2016-04-13 00:05:39439 ]
rsesek7f9d12b2016-04-29 02:45:56440 deps = [
441 ":content_shell_framework_bundle_data",
442 ":content_shell_resources_bundle_data",
443
444 # TODO(rsesek): Remove this after GYP is gone, since it only needs to
445 # be here per the comment in blink_test_platform_support_mac.mm about
446 # the bundle structure.
447 "//components/test_runner:resources",
448 ]
449 info_plist = "app/app-Info.plist"
agrieve993374cf2016-04-13 00:05:39450 }
451} else {
brettw2e2220c2015-07-21 18:56:35452 # TODO(brettw) when GYP is no longer necessary, delete
453 # content/shell/app/shell.exe.manifest. This file is not used in GN.
scottmg7afc4092014-12-03 19:22:42454 executable("content_shell") {
455 testonly = true
James Robinson060f2e32014-09-10 22:31:37456
scottmg7afc4092014-12-03 19:22:42457 # TODO(GYP) mac resource bundle stuff for this target.
458 # TODO(GYP) Windows content shell settings:
scottmg7afc4092014-12-03 19:22:42459 # - RC file.
460 # - 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
461 sources = [
scottmg7afc4092014-12-03 19:22:42462 "app/shell_main.cc",
463 ]
[email protected]6b9028ab2014-07-23 17:15:38464
skobes502412ae2016-01-19 17:40:43465 defines = []
466
scottmg7afc4092014-12-03 19:22:42467 deps = [
468 ":content_shell_lib",
469 ":pak",
brettwba7a73d2015-08-31 22:17:39470 "//build/config/sanitizers:deps",
brettw2e2220c2015-07-21 18:56:35471 "//build/win:default_exe_manifest",
scottmg7afc4092014-12-03 19:22:42472 ]
[email protected]6b9028ab2014-07-23 17:15:38473
scottmg7afc4092014-12-03 19:22:42474 if (is_win) {
475 deps += [ "//sandbox" ]
skobes502412ae2016-01-19 17:40:43476 if (win_console_app) {
477 defines += [ "WIN_CONSOLE_APP" ]
478 } else {
479 # Set /SUBSYSTEM:WINDOWS unless a console build has been requested.
scottmg7afc4092014-12-03 19:22:42480 configs -= [ "//build/config/win:console" ]
481 configs += [ "//build/config/win:windowed" ]
482 }
483 }
484
wangxianzhu1a34fa32016-03-10 21:03:00485 if (is_linux && !is_component_build) {
486 # Set rpath to find our own libfreetype even in a non-component build.
487 configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
488 }
[email protected]6b9028ab2014-07-23 17:15:38489 }
James Robinson060f2e32014-09-10 22:31:37490}
tfarina10ae51f62015-05-13 03:35:57491
tfarina795e01a2015-05-15 19:29:57492if (is_win) {
493 # GYP version: content/content_shell_and_tests.gyp:content_shell_crash_service
brettw0d3b1df2015-12-03 00:10:01494 executable("content_shell_crash_service") {
tfarina795e01a2015-05-15 19:29:57495 sources = [
496 "tools/content_shell_crash_service.cc",
497 ]
498
499 deps = [
500 "//base",
brettwba7a73d2015-08-31 22:17:39501 "//build/config/sanitizers:deps",
brucedawsonf9f7d6292016-04-27 19:11:07502 "//build/win:default_exe_manifest",
sdefresne8ba0b88c2015-09-18 10:33:13503 "//components/crash/content/tools:crash_service",
tfarina795e01a2015-05-15 19:29:57504 ]
505
506 configs -= [ "//build/config/win:console" ]
507 configs += [ "//build/config/win:windowed" ]
508 }
509}
brettwe1d40652015-10-23 23:06:10510
511if (is_mac) {
rsesek7f9d12b2016-04-29 02:45:56512 mac_xib_bundle_data("content_shell_framework_xibs") {
513 sources = [
514 "app/English.lproj/HttpAuth.xib",
515 "app/English.lproj/MainMenu.xib",
516 ]
517 output_path = "{{bundle_resources_dir}}/English.lproj"
518 }
519
520 bundle_data("content_shell_framework_resources") {
521 sources = [
522 "$root_out_dir/content_shell.pak",
523 "$root_out_dir/icudtl.dat",
524 "resources/missingImage.png",
525 "resources/textAreaResizeCorner.png",
526 ]
527
528 public_deps = [
529 ":pak",
530 ]
531
532 deps = [
533 "//third_party/icu:icudata",
534 ]
535
536 if (v8_use_external_startup_data) {
537 sources += [
538 "$root_out_dir/natives_blob.bin",
539 "$root_out_dir/snapshot_blob.bin",
540 ]
541 public_deps += [ "//v8" ]
542 }
543
544 outputs = [
545 "{{bundle_resources_dir}}/{{source_file_part}}",
546 ]
547 }
548
549 if (enable_plugins) {
550 bundle_data("content_shell_framework_plugins") {
551 sources = [
552 "$root_out_dir/blink_deprecated_test_plugin.plugin",
553 "$root_out_dir/blink_test_plugin.plugin",
554 ]
555
556 outputs = [
557 "{{bundle_root_dir}}/{{source_file_part}}",
558 ]
559
560 public_deps = [
561 "//ppapi:blink_deprecated_test_plugin",
562 "//ppapi:blink_test_plugin",
563 ]
564 }
565 }
566
567 content_shell_framework_name = "$content_shell_product_name Framework"
568 content_shell_helper_name = "$content_shell_product_name Helper"
569
570 mac_framework_bundle("content_shell_framework") {
brettwe1d40652015-10-23 23:06:10571 testonly = true
572
rsesek7f9d12b2016-04-29 02:45:56573 output_name = content_shell_framework_name
brettwe1d40652015-10-23 23:06:10574
575 sources = [
tfarinac708f3972015-10-25 17:42:50576 "app/shell_content_main.cc",
577 "app/shell_content_main.h",
brettwe1d40652015-10-23 23:06:10578 ]
579
rsesek7f9d12b2016-04-29 02:45:56580 # TODO(rsesek): Handle these missing pieces:
581 # - crash_inspector
582 # - crash_report_sender.app
583
brettwe1d40652015-10-23 23:06:10584 deps = [
rsesek7f9d12b2016-04-29 02:45:56585 ":content_shell_framework_resources",
586 ":content_shell_framework_xibs",
brettwe1d40652015-10-23 23:06:10587 ":content_shell_lib",
rsesek7f9d12b2016-04-29 02:45:56588 "//third_party/icu:icudata",
brettwe1d40652015-10-23 23:06:10589 ]
rsesek7f9d12b2016-04-29 02:45:56590
591 if (enable_plugins) {
592 deps += [ ":content_shell_framework_plugins" ]
593 }
594
595 ldflags = [
596 "-install_name",
597 "@executable_path/../Frameworks/$output_name.framework/$output_name",
598 ]
599
600 info_plist = "app/framework-Info.plist"
brettwe1d40652015-10-23 23:06:10601 }
rsesek20a58a62016-04-15 20:59:23602
603 mac_app_bundle("content_shell_helper_app") {
604 testonly = true
rsesek7f9d12b2016-04-29 02:45:56605 output_name = content_shell_helper_name
rsesek20a58a62016-04-15 20:59:23606 sources = [
607 "app/shell_main.cc",
608 ]
609 deps = [
rsesek7f9d12b2016-04-29 02:45:56610 ":content_shell_framework+link",
rsesek20a58a62016-04-15 20:59:23611 ]
612 info_plist = "app/helper-Info.plist"
613 }
rsesek7f9d12b2016-04-29 02:45:56614
615 # The install_name_tool can only operate in-place, rather than producing a
616 # unique output. Use the xcrun wrapper script to write a fake stamp output
617 # file. After :content_shell_helper_app has been built and bundled, this
618 # will run, modifying the executable in the bundle and writing out the
619 # --stamp specified. This will change the mtime on the executable, but
620 # because the stamp will also be updated, the
621 # :content_shell_framework_bundle_data will re-copy the output. This only
622 # works because nothing else depends on the output of
623 # :content_shell_helper_app.
624 # TODO(rsesek): After GYP is gone, re-write content_shell_main to be like
625 # chrome_main and use dlopen() instead of a linked framework.
626 action("fix_helper_link_framework") {
627 testonly = true
628 script = "//build/config/mac/xcrun.py"
629 inputs = [
630 "$root_out_dir/$content_shell_helper_name.app/Contents/MacOS/$content_shell_helper_name",
631 ]
632
633 stamp_file = "$target_out_dir/xcrun_$target_name.stamp"
634 outputs = [
635 stamp_file,
636 ]
637
638 # TODO(rsesek): Figure out something like GYP's postbuilds to allow
639 # install_name_tool to operate in-place <https://crbug.com/607292>.
640 args = [
641 "--stamp",
642 rebase_path(stamp_file, root_build_dir),
643
644 # xcrun arguments:
645 "install_name_tool",
646 "-change",
647 "@executable_path/../Frameworks/$content_shell_framework_name.framework/$content_shell_framework_name",
648 "@executable_path/../../../$content_shell_framework_name.framework/$content_shell_framework_name",
649 ] + rebase_path(inputs, root_build_dir)
650 public_deps = [
651 ":content_shell_helper_app",
652 ]
653 }
654
655 bundle_data("content_shell_framework_bundle_data") {
656 testonly = true
657 sources = [
658 "$root_out_dir/$content_shell_framework_name.framework",
659 "$root_out_dir/$content_shell_helper_name.app",
660 ]
661 outputs = [
662 "{{bundle_root_dir}}/Frameworks/{{source_file_part}}",
663 ]
664 public_deps = [
665 ":content_shell_framework+link",
666 ":fix_helper_link_framework",
667 ]
668 }
669
670 bundle_data("content_shell_resources_bundle_data") {
671 testonly = true
672 sources = [
673 "app/app.icns",
674 ]
675 outputs = [
676 "{{bundle_resources_dir}}/{{source_file_part}}",
677 ]
678 }
brettwe1d40652015-10-23 23:06:10679}
ortunof78c8412016-03-31 18:59:59680
681mojom("mojo_bindings") {
682 sources = [
683 "common/layout_test/layout_test_bluetooth_fake_adapter_setter.mojom",
684 ]
685}