blob: 40dd295b01647827924aed86ee4c21998b162138 [file] [log] [blame]
[email protected]77ce8022014-06-16 19:29:561# 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
[email protected]dffd8a912014-06-30 23:24:315import("//build/config/crypto.gni")
6import("//build/config/features.gni")
7import("//build/config/ui.gni")
[email protected]449ceab2014-07-29 22:43:518import("//components/nacl/nacl_defines.gni")
James Robinson2ed4d692014-09-17 05:20:589# //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which
10# produces a conflict for the "grit" template so we have to only include one.
11if (is_android) {
12 import("//build/config/android/rules.gni")
13} else {
14 import("//tools/grit/grit_rule.gni")
15}
cmasone0a9e4ca2014-10-16 16:40:4916if (is_desktop_linux) {
17 import("//build/config/linux/pkg_config.gni")
18}
[email protected]77ce8022014-06-16 19:29:5619
20about_credits_file = "$target_gen_dir/about_credits.html"
21additional_modules_list_file =
22 "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"
23
[email protected]797b25042014-07-01 23:54:1724gypi_values = exec_script(
25 "//build/gypi_to_gn.py",
26 [ rebase_path("../chrome_browser.gypi") ],
27 "scope",
28 [ "../chrome_browser.gypi" ])
[email protected]dffd8a912014-06-30 23:24:3129
cmasone0a9e4ca2014-10-16 16:40:4930if (is_desktop_linux) {
31 pkg_config("gnome_keyring") {
32 packages = [ "gnome-keyring-1" ]
33 }
34}
35
[email protected]dffd8a912014-06-30 23:24:3136static_library("browser") {
apavlove749bca2014-09-30 11:07:4137 configs += [
38 "//build/config/compiler:wexit_time_destructors",
39 "//third_party/WebKit/public:debug_devtools",
40 ]
[email protected]dffd8a912014-06-30 23:24:3141 defines = []
42 sources = []
43 libs = []
44 ldflags = []
45
46 # iOS/non-iOS shared deps. New dependencies should generally be added in the
47 # non-iOS deps below.
Brett Wilsone53895272014-09-23 23:41:4648 public_deps = [
49 "//components/autofill/core/browser",
50 "//content/public/browser",
51 "//sql",
52 "//sync",
53 ]
[email protected]dffd8a912014-06-30 23:24:3154 deps = [
55 "//base/allocator",
56 "//chrome:extra_resources",
57 "//chrome:resources",
58 "//chrome:strings",
[email protected]797b25042014-07-01 23:54:1759 "//chrome/app:generated_resources_map",
[email protected]855b7de2014-07-08 21:02:4560 "//chrome/app/resources:platform_locale_settings",
[email protected]797b25042014-07-01 23:54:1761 "//chrome/app/theme:theme_resources",
[email protected]855b7de2014-07-08 21:02:4562 "//chrome/browser/history:in_memory_url_index_cache_proto",
[email protected]855b7de2014-07-08 21:02:4563 "//chrome/browser/net:cert_logger_proto",
[email protected]797b25042014-07-01 23:54:1764 "//chrome/browser/net:probe_message_proto",
[email protected]abd4b682014-07-16 20:26:3065 "//chrome/browser/ui",
[email protected]dffd8a912014-06-30 23:24:3166 "//chrome/common",
67 "//chrome/common/net",
[email protected]604828c2014-07-02 20:39:1268 "//components/autofill/core/browser",
Brett Wilson1c693992014-08-25 19:10:0169 "//components/bookmarks/browser",
[email protected]b9f4c682014-07-10 22:00:3770 "//components/captive_portal",
[email protected]fca567b2014-07-02 17:37:3471 "//components/cloud_devices/common",
Brett Wilson1c693992014-08-25 19:10:0172 "//components/component_updater",
vasiliiac461392014-09-18 11:35:1773 "//components/content_settings/core/browser",
[email protected]08f71012014-07-25 10:27:5474 "//components/content_settings/core/common",
[email protected]478ed232014-08-19 02:10:5575 "//components/crx_file",
megjablon3476e042014-10-14 19:21:5976 "//components/data_reduction_proxy/core/browser",
[email protected]273ae5ab2014-07-09 21:10:2577 "//components/domain_reliability",
noyaudaaac3a2014-10-08 11:11:1178 "//components/enhanced_bookmarks",
[email protected]273ae5ab2014-07-09 21:10:2579 "//components/favicon_base",
80 "//components/favicon/core",
[email protected]abd4b682014-07-16 20:26:3081 "//components/feedback",
82 "//components/gcm_driver",
Brett Wilson1c693992014-08-25 19:10:0183 "//components/google/core/browser",
[email protected]273ae5ab2014-07-09 21:10:2584 "//components/history/core/browser",
85 "//components/history/core/common",
Brett Wilson1c693992014-08-25 19:10:0186 "//components/infobars/core",
87 "//components/invalidation",
gunsch1afc65172014-09-16 00:03:3288 "//components/metrics:gpu",
[email protected]fca567b2014-07-02 17:37:3489 "//components/metrics:net",
gunsch840bc412014-09-18 19:38:0690 "//components/metrics:profiler",
Brett Wilson1c693992014-08-25 19:10:0191 "//components/metrics/proto:proto",
[email protected]fca567b2014-07-02 17:37:3492 "//components/navigation_metrics",
Brett Wilson1c693992014-08-25 19:10:0193 "//components/network_time",
94 "//components/omaha_query_params",
[email protected]b1c5ab682014-08-07 11:53:1795 "//components/omnibox",
[email protected]fca567b2014-07-02 17:37:3496 "//components/os_crypt",
Brett Wilson1c693992014-08-25 19:10:0197 "//components/password_manager/core/browser",
98 "//components/password_manager/core/common",
[email protected]fca567b2014-07-02 17:37:3499 "//components/policy:policy_component",
Brett Wilson1c693992014-08-25 19:10:01100 "//components/precache/core",
[email protected]fca567b2014-07-02 17:37:34101 "//components/query_parser",
[email protected]b9f4c682014-07-10 22:00:37102 "//components/rappor",
Brett Wilson1c693992014-08-25 19:10:01103 "//components/renderer_context_menu",
[email protected]720b10492014-07-23 08:48:40104 "//components/search",
Brett Wilson1c693992014-08-25 19:10:01105 "//components/search_engines",
106 "//components/search_provider_logos",
[email protected]abd4b682014-07-16 20:26:30107 "//components/signin/core/browser",
108 "//components/startup_metric_utils",
[email protected]797b25042014-07-01 23:54:17109 "//components/strings",
mathp60143a32014-10-08 14:52:45110 "//components/suggestions",
Brett Wilson1c693992014-08-25 19:10:01111 "//components/sync_driver",
[email protected]b9f4c682014-07-10 22:00:37112 "//components/translate/core/browser",
113 "//components/translate/core/common",
[email protected]273ae5ab2014-07-09 21:10:25114 "//components/url_fixer",
[email protected]fca567b2014-07-02 17:37:34115 "//components/user_prefs",
[email protected]bf4545f2014-07-11 19:49:46116 "//components/webdata/common",
[email protected]dffd8a912014-06-30 23:24:31117 "//content/public/browser",
118 "//content/public/common",
[email protected]604828c2014-07-02 20:39:12119 "//courgette:courgette_lib",
[email protected]dffd8a912014-06-30 23:24:31120 "//crypto",
[email protected]604828c2014-07-02 20:39:12121 "//google_apis",
Brett Wilson8f1323042014-09-11 16:58:56122 "//gpu/config",
ajwongf7b1cb692014-08-23 21:36:22123 "//jingle:notifier",
[email protected]dffd8a912014-06-30 23:24:31124 "//skia",
125 "//sql",
126 "//sync",
[email protected]797b25042014-07-01 23:54:17127 "//third_party/cacheinvalidation",
[email protected]dffd8a912014-06-30 23:24:31128 "//third_party/icu",
129 "//third_party/libxml",
ajwongf7b1cb692014-08-23 21:36:22130 "//third_party/libjingle",
[email protected]dffd8a912014-06-30 23:24:31131 "//third_party/widevine/cdm:version_h",
132 "//third_party/zlib",
133 "//third_party/zlib:minizip",
134 "//third_party/zlib:zip",
135 "//ui/base",
136 "//ui/events",
137 "//ui/gfx",
138 "//ui/gfx/geometry",
[email protected]a1d7d4f2014-07-16 21:33:36139 "//ui/message_center",
140 "//ui/shell_dialogs",
[email protected]dffd8a912014-06-30 23:24:31141 "//ui/strings",
[email protected]797b25042014-07-01 23:54:17142 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31143 ]
144
danduongd81789642014-09-23 02:50:00145 sources += rebase_path(gypi_values.chrome_browser_undo_sources,
146 ".", "//chrome")
147
[email protected]dffd8a912014-06-30 23:24:31148 if (!is_ios) {
149 sources += rebase_path(gypi_values.chrome_browser_non_ios_sources,
150 ".", "//chrome")
151 #TODO(GYP) Add these sources:
152 # # These files are generated by GRIT.
153 # '<(grit_out_dir)/grit/component_extension_resources_map.cc',
154 # '<(grit_out_dir)/grit/theme_resources_map.cc',
[email protected]a3c134352014-07-11 19:23:19155 # '<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/ui_resources_map.cc',
[email protected]dffd8a912014-06-30 23:24:31156 #
157 # # This file is generated by
158 # # chrome/browser/metrics/variations/generate_resources_map.py
159 # '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc',
160
[email protected]1bb1a6002014-07-24 23:58:56161 defines = nacl_defines
[email protected]797b25042014-07-01 23:54:17162
[email protected]dffd8a912014-06-30 23:24:31163 deps += [
Brett Wilson1c693992014-08-25 19:10:01164 "//apps",
[email protected]dffd8a912014-06-30 23:24:31165 "//cc",
[email protected]55699f392014-08-20 22:16:30166 "//chrome/browser/devtools",
[email protected]55699f392014-08-20 22:16:30167 "//chrome/installer/util",
[email protected]b9f4c682014-07-10 22:00:37168 "//components/autofill/content/browser",
169 "//components/dom_distiller/content",
[email protected]fca567b2014-07-02 17:37:34170 "//components/keyed_service/content",
[email protected]55699f392014-08-20 22:16:30171 "//components/navigation_interception",
172 "//components/password_manager/content/browser",
173 "//components/precache/content",
174 "//components/sessions",
[email protected]abd4b682014-07-16 20:26:30175 "//components/storage_monitor",
[email protected]b9f4c682014-07-10 22:00:37176 "//components/translate/content/browser",
[email protected]fca567b2014-07-02 17:37:34177 "//components/url_matcher",
[email protected]dffd8a912014-06-30 23:24:31178 "//components/visitedlink/browser",
179 "//components/visitedlink/common",
hanxi149b92d2014-09-11 21:57:18180 "//components/web_cache/browser",
[email protected]b9f4c682014-07-10 22:00:37181 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:08182 "//content/app/resources",
[email protected]55699f392014-08-20 22:16:30183 "//media",
184 "//media/cast:net",
jamesra03ae492014-10-03 04:26:48185 "//mojo/edk/system",
[email protected]604828c2014-07-02 20:39:12186 "//mojo/environment:chromium",
187 "//mojo/public/cpp/bindings",
188 "//mojo/public/js/bindings",
Brett Wilson83fd4242014-09-02 19:45:33189 "//net:extras",
[email protected]dffd8a912014-06-30 23:24:31190 "//net:net_with_v8",
pilgrim4af8c212014-09-05 17:30:15191 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:24192 "//storage/common",
[email protected]4eebe74d2014-08-13 02:54:46193 "//third_party/WebKit/public:resources",
[email protected]dffd8a912014-06-30 23:24:31194 "//third_party/expat",
195 "//third_party/leveldatabase",
[email protected]fca567b2014-07-02 17:37:34196 "//third_party/libaddressinput",
[email protected]dffd8a912014-06-30 23:24:31197 "//third_party/libyuv",
198 "//third_party/npapi",
199 "//third_party/re2",
200 "//third_party/smhasher:cityhash",
Brett Wilson83fd4242014-09-02 19:45:33201 "//third_party/webrtc/modules/desktop_capture",
[email protected]dffd8a912014-06-30 23:24:31202 "//ui/gl",
203 "//ui/surface",
[email protected]604828c2014-07-02 20:39:12204 "//ui/web_dialogs",
[email protected]fca567b2014-07-02 17:37:34205 "//v8",
[email protected]dffd8a912014-06-30 23:24:31206 ## TODO(tonyg): Remove this dependency (crbug.com/280157).
[email protected]55699f392014-08-20 22:16:30207 #"../testing/perf/perf_test.gyp:*", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31208 ]
209 } else { # iOS
210 sources += rebase_path(gypi_values.chrome_browser_ios_sources,
211 ".", "//chrome")
212 deps += [
213 "//net",
214 ]
215 libs += [
216 "CoreTelephony.framework",
217 "CoreText.framework",
218 "MobileCoreServices.framework",
219 "QuartzCore.framework",
220 ]
221 ldflags += [ "-weak_framework", "CoreImage" ]
222 }
223
224 if (is_win || is_mac) {
225 sources += rebase_path(gypi_values.chrome_browser_win_mac_sources,
226 ".", "//chrome")
227 }
228 if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) {
229 sources += [
230 "net/disk_cache_dir_policy_handler.cc",
231 "net/disk_cache_dir_policy_handler.h",
232 ]
233 }
234 if (!is_android && !is_ios && enable_configuration_policy) {
235 sources += [
236 "download/download_dir_policy_handler.cc",
237 "download/download_dir_policy_handler.h",
238 ]
239 }
240 if (is_mac) {
241 sources += rebase_path(gypi_values.chrome_browser_mac_sources,
242 ".", "//chrome")
243 deps += [
244 #"app_shim" TODO(GYP)
tapted63829f72014-09-24 23:50:50245 #"browser_app_shim" TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31246 ]
247 }
248 if (cld2_data_source == "component") {
249 sources += [
250 "component_updater/cld_component_installer.cc",
251 "component_updater/cld_component_installer.h",
252 ]
253 }
254 if (enable_extensions) {
Brett Wilsone53895272014-09-23 23:41:46255 public_deps += [ "//chrome/browser/extensions" ]
[email protected]cc5b3be2014-08-15 23:24:52256 deps += [
[email protected]cc5b3be2014-08-15 23:24:52257 "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
thestige33aa2422014-09-22 22:16:30258 "//chrome/common/extensions/api",
259 "//chrome/common/extensions/api:api_registration",
[email protected]cc5b3be2014-08-15 23:24:52260 ]
[email protected]dffd8a912014-06-30 23:24:31261 sources += rebase_path(gypi_values.chrome_browser_extensions_sources,
262 ".", "//chrome")
263 }
264 if (enable_background) {
265 sources += rebase_path(gypi_values.chrome_browser_background_sources,
266 ".", "//chrome")
jamesr29ea2d122014-10-23 10:30:27267 if (!use_aura || is_win || is_chromeos) {
[email protected]dffd8a912014-06-30 23:24:31268 sources -= [ "background/background_mode_manager_aura.cc" ]
269 }
270 }
271 if (enable_task_manager) {
272 sources += rebase_path(gypi_values.chrome_browser_task_manager_sources,
273 ".", "//chrome")
274 }
275 if (enable_spellcheck) {
276 sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources,
277 ".", "//chrome")
278 deps += [ "//third_party/hunspell" ]
279 }
280 if (enable_nacl) {
281 sources += rebase_path(gypi_values.chrome_browser_nacl_sources,
282 ".", "//chrome")
283 #deps += [ "//components/nacl:nacl_browser" ] TODO(GYP)
284 }
apavlove749bca2014-09-30 11:07:41285
[email protected]dffd8a912014-06-30 23:24:31286 if (enable_configuration_policy) {
287 sources += rebase_path(
288 gypi_values.chrome_browser_policy_shared_with_ios_sources,
289 ".", "//chrome")
290 deps += [
[email protected]604828c2014-07-02 20:39:12291 "//components/policy",
[email protected]797b25042014-07-01 23:54:17292 "//components/policy/proto",
[email protected]dffd8a912014-06-30 23:24:31293 ]
294 if (!is_ios) {
295 sources += rebase_path(
296 gypi_values.chrome_browser_policy_non_ios_sources,
297 ".", "//chrome")
298 }
299 if (!is_chromeos) {
300 sources += rebase_path(
301 gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources,
302 ".", "//chrome")
303 }
304 if (is_win || is_mac || is_desktop_linux) {
305 sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
306 ".", "//chrome")
307 }
James Robinson2ed4d692014-09-17 05:20:58308 if (!is_android && !is_ios) { # Non-mobile
[email protected]dffd8a912014-06-30 23:24:31309 deps += [
Brett Wilson642752142014-08-26 19:05:21310 "//chrome/browser/policy:path_parser",
[email protected]dffd8a912014-06-30 23:24:31311 ]
312 }
313 } else {
314 # Configuration policy disabled.
315 sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources,
316 ".", "//chrome")
317 }
318
319 if (enable_plugins) {
320 sources += rebase_path(gypi_values.chrome_browser_plugins_sources,
321 ".", "//chrome")
322 deps += [
James Robinson2ed4d692014-09-17 05:20:58323 "//components/pdf/browser",
[email protected]dffd8a912014-06-30 23:24:31324 "//ppapi:ppapi_ipc",
thestig11b815e92014-08-26 00:32:14325 "//third_party/adobe/flash:flapper_version_h",
[email protected]dffd8a912014-06-30 23:24:31326 ]
327 }
328 if (safe_browsing_mode != 0) {
329 sources += rebase_path(
330 gypi_values.chrome_browser_basic_safe_browsing_sources,
331 ".", "//chrome")
332 deps += [
[email protected]fca567b2014-07-02 17:37:34333 "//chrome/browser/safe_browsing:chunk_proto",
mattm022138b52014-09-23 01:05:45334 "//chrome/browser/safe_browsing:metadata_proto",
[email protected]fca567b2014-07-02 17:37:34335 "//chrome/browser/safe_browsing:report_proto",
[email protected]dffd8a912014-06-30 23:24:31336 ]
337 if (safe_browsing_mode == 1) {
338 sources += rebase_path(
339 gypi_values.chrome_browser_full_safe_browsing_sources,
340 ".", "//chrome")
341 defines += [ "FULL_SAFE_BROWSING" ]
342 deps += [
[email protected]fca567b2014-07-02 17:37:34343 "//chrome/common/safe_browsing:proto",
[email protected]dffd8a912014-06-30 23:24:31344 ]
345 } else if (safe_browsing_mode == 2) {
346 defines += [ "MOBILE_SAFE_BROWSING" ]
347 }
348 }
349
350 if (is_linux) {
[email protected]797b25042014-07-01 23:54:17351 configs += [ "//build/config/linux:udev" ]
352 deps += [ "//device/media_transfer_protocol" ]
[email protected]dffd8a912014-06-30 23:24:31353 }
354 if (is_linux && !is_chromeos) {
[email protected]fd98b612014-07-09 22:11:47355 deps += [ "//third_party/speech-dispatcher" ]
[email protected]dffd8a912014-06-30 23:24:31356 }
357
358 if (is_chromeos) {
359 sources += rebase_path(gypi_values.chrome_browser_chromeos_sources,
360 ".", "//chrome")
361 deps += [
mukai8c99b882014-10-15 03:07:59362 "//chrome/browser/chromeos",
[email protected]dffd8a912014-06-30 23:24:31363 ]
364 } else {
365 # Non-ChromeOS.
366 sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources,
367 ".", "//chrome")
368 }
369
mukai8c99b882014-10-15 03:07:59370 if (is_chromeos || is_ios) {
371 sources -= [
372 "metrics/signin_status_metrics_provider.cc",
373 "metrics/signin_status_metrics_provider.h",
374 ]
375 }
376
[email protected]dffd8a912014-06-30 23:24:31377 if (use_cups) {
[email protected]604828c2014-07-02 20:39:12378 configs += [ "//printing:cups" ]
[email protected]dffd8a912014-06-30 23:24:31379 }
380 if (is_desktop_linux) {
381 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources,
382 ".", "//chrome")
cmasone0a9e4ca2014-10-16 16:40:49383 configs += [ ":gnome_keyring" ]
[email protected]dffd8a912014-06-30 23:24:31384 }
385 if (use_aura) {
386 sources += rebase_path(gypi_values.chrome_browser_aura_sources,
387 ".", "//chrome")
388 deps += [
[email protected]fca567b2014-07-02 17:37:34389 "//ui/aura",
390 "//ui/compositor",
[email protected]604828c2014-07-02 20:39:12391 "//ui/keyboard",
[email protected]dffd8a912014-06-30 23:24:31392 ]
393 }
394 if (ui_compositor_image_transport) {
395 deps += [ "//ui/gl" ]
396 }
397
[email protected]855b7de2014-07-08 21:02:45398 if (use_ash) {
399 sources += rebase_path(gypi_values.chrome_browser_ash_sources,
400 ".", "//chrome")
401 }
402
[email protected]dffd8a912014-06-30 23:24:31403 if (use_x11) {
404 sources += rebase_path(gypi_values.chrome_browser_x11_sources,
405 ".", "//chrome")
406 if (!is_chromeos) {
[email protected]fca567b2014-07-02 17:37:34407 configs += [ "//build/config/linux:xscrnsaver" ]
[email protected]dffd8a912014-06-30 23:24:31408 }
409 }
410 if (is_posix && !is_mac && !is_ios) {
411 sources += [
rseseka0a7a042014-09-18 23:59:20412 "//chrome/app/chrome_crash_reporter_client.cc",
413 "//chrome/app/chrome_crash_reporter_client.h",
[email protected]dffd8a912014-06-30 23:24:31414 ]
415 deps += [
Robert Sesekabcd8102014-08-27 16:12:44416 "//components/crash/app",
417 "//components/crash/browser",
[email protected]dffd8a912014-06-30 23:24:31418 ]
419 }
420 if (use_nss_certs) {
421 sources += rebase_path(gypi_values.chrome_browser_nss_sources,
422 ".", "//chrome")
mukai8c99b882014-10-15 03:07:59423 if (is_chromeos) {
424 sources -= [ "net/nss_context_linux.cc" ]
425 }
[email protected]dffd8a912014-06-30 23:24:31426 }
427 if (enable_notifications) {
428 sources += rebase_path(gypi_values.chrome_browser_notifications_sources,
429 ".", "//chrome")
430 if (!is_android) {
431 sources += rebase_path(
432 gypi_values.chrome_browser_non_android_notifications_sources,
433 ".", "//chrome")
434 }
435 }
436 if (enable_themes) {
437 sources += rebase_path(gypi_values.chrome_browser_themes_sources,
438 ".", "//chrome")
439 }
440
[email protected]b46e7e92014-07-22 21:49:52441 if (printing_mode != 0) {
[email protected]dffd8a912014-06-30 23:24:31442 # Some form of printing support.
443 sources += rebase_path(gypi_values.chrome_browser_basic_printing_sources,
444 ".", "//chrome")
445 deps += [
[email protected]55699f392014-08-20 22:16:30446 "//printing",
[email protected]dffd8a912014-06-30 23:24:31447 ]
vitalybuka36259ca2014-08-28 23:42:24448 if (is_win) {
[email protected]dffd8a912014-06-30 23:24:31449 sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources,
450 ".", "//chrome")
451 }
[email protected]b46e7e92014-07-22 21:49:52452 if (printing_mode == 1) {
[email protected]dffd8a912014-06-30 23:24:31453 # Full printing on top of the above.
454 sources += rebase_path(gypi_values.chrome_browser_full_printing_sources,
455 ".", "//chrome")
[email protected]b46e7e92014-07-22 21:49:52456 } else if (printing_mode == 2) {
[email protected]dffd8a912014-06-30 23:24:31457 # Partial-only printing support.
458 sources += rebase_path(
459 gypi_values.chrome_browser_basic_only_printing_sources,
460 ".", "//chrome")
461 }
462 }
463 if (enable_captive_portal_detection) {
464 sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources,
465 ".", "//chrome")
466 }
467 if (enable_session_service) {
468 sources += rebase_path(gypi_values.chrome_browser_session_service_sources,
469 ".", "//chrome")
470 }
471
472 if (is_android || is_ios) {
473 # Mobile.
474 sources += rebase_path(gypi_values.chrome_browser_mobile_sources,
475 ".", "//chrome")
476 } else {
477 # Non-mobile.
478 sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
479 ".", "//chrome")
reillyge471fab2014-08-29 01:58:43480 deps += [
reillyge471fab2014-08-29 01:58:43481 "//device/core",
reillygd77718d2014-09-04 00:57:56482 "//device/usb",
reillyge471fab2014-08-29 01:58:43483 ]
[email protected]dffd8a912014-06-30 23:24:31484 }
485
486 if (is_android) {
487 sources += rebase_path(gypi_values.chrome_browser_android_sources,
488 ".", "//chrome")
489 deps += [
James Robinson2ed4d692014-09-17 05:20:58490 ":jni_headers",
[email protected]55699f392014-08-20 22:16:30491 "//components/cdm/browser",
[email protected]dffd8a912014-06-30 23:24:31492 #"../components/components.gyp:web_contents_delegate_android", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31493 ]
494 deps -= [
[email protected]fca567b2014-07-02 17:37:34495 "//third_party/libaddressinput",
[email protected]abd4b682014-07-16 20:26:30496 "//components/feedback",
497 "//components/storage_monitor",
[email protected]abd4b682014-07-16 20:26:30498 "//components/web_modal",
[email protected]dffd8a912014-06-30 23:24:31499 ]
500 } else {
501 sources += rebase_path(gypi_values.chrome_browser_non_android_sources,
502 ".", "//chrome")
503 }
504
505 if (is_mac) {
506 deps += [
[email protected]6b5d2f92014-07-30 00:40:03507 "//third_party/google_toolbox_for_mac",
[email protected]dffd8a912014-06-30 23:24:31508 #"../third_party/mozilla/mozilla.gyp:mozilla", TODO(GYP)
509 ]
510 libs += [
511 "Accelerate.framework",
512 "AddressBook.framework",
513 "AudioUnit.framework",
514 "DiskArbitration.framework",
515 "IOKit.framework",
516 "ImageCaptureCore.framework",
517 "OpenGL.framework",
518 "QuartzCore.framework",
519 "SecurityInterface.framework",
520 ]
521 }
522
523 if (enable_rlz) {
524 sources += rebase_path(gypi_values.chrome_browser_rlz_sources,
525 ".", "//chrome")
526 deps += [ "//rlz:rlz_lib" ]
527 }
528
529 # TODO(GYP)
530 # Temporary fix to break the browser target into smaller chunks so it
531 # will link with goma builds.
532 #["OS=="win" and chromium_win_pch==0", {
533 # "msvs_shard": 4,
534 #}],
535
536 if (is_win) {
537 sources += rebase_path(gypi_values.chrome_browser_win_sources,
538 ".", "//chrome")
Brett Wilsone53895272014-09-23 23:41:46539 public_deps += [
540 "//ui/views",
541 "//ui/views/controls/webview",
542 ]
[email protected]dffd8a912014-06-30 23:24:31543 deps += [
[email protected]55699f392014-08-20 22:16:30544 "//chrome:version_header",
545 "//chrome/installer/util:strings",
546 "//third_party/iaccessible2",
547 "//third_party/isimpledom",
[email protected]dffd8a912014-06-30 23:24:31548 "//third_party/wtl",
549 #"chrome_process_finder", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31550 #"../chrome_elf/chrome_elf.gyp:chrome_elf", TODO(GYP)
551 #"../chrome_elf/chrome_elf.gyp:chrome_elf_constants", TODO(GYP)
552 #"../chrome_elf/chrome_elf.gyp:dll_hash", TODO(GYP)
553 #"../google_update/google_update.gyp:google_update", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31554 #"../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31555 #"../win8/win8.gyp:metro_viewer", TODO(GYP)
556 ]
[email protected]dffd8a912014-06-30 23:24:31557 } else {
558 # Non-Windows.
559 sources += rebase_path(gypi_values.chrome_browser_non_win_sources,
560 ".", "//chrome")
[email protected]f6dc4ae2014-07-30 00:10:37561 if (toolkit_views) {
[email protected]dffd8a912014-06-30 23:24:31562 deps += [
[email protected]55699f392014-08-20 22:16:30563 "//ui/views",
564 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31565 ]
566 # TODO(GYP) why is this needed? Very susicious.
567 # "include_dirs": [
568 # "<(INTERMEDIATE_DIR)/chrome",
569 # ],
570 }
571 }
572
573 if (is_linux) {
574 sources += rebase_path(gypi_values.chrome_browser_linux_sources,
575 ".", "//chrome")
576 if (use_aura) {
577 configs += [
578 "//build/config/linux:dbus",
579 "//build/config/linux:fontconfig",
580 ]
581 deps += [
582 "//dbus",
583 ]
584 }
585 if (use_x11) {
586 configs += [ "//build/config/linux:x11" ]
587 deps += [ "//ui/gfx/x" ]
588 }
589 }
590
591 if (is_desktop_linux) {
592 sources += rebase_path(gypi_values.chrome_browser_desktop_linux_sources,
593 ".", "//chrome")
594 }
595 if (enable_plugin_installation) {
596 sources += rebase_path(
597 gypi_values.chrome_browser_plugin_installation_sources,
598 ".", "//chrome")
599 }
600 if (enable_app_list) {
601 deps += [
[email protected]55699f392014-08-20 22:16:30602 "//ui/app_list",
[email protected]dffd8a912014-06-30 23:24:31603 ]
604 }
605 if (enable_managed_users) {
606 sources += rebase_path(
607 gypi_values.chrome_browser_supervised_user_sources,
608 ".", "//chrome")
609 }
610 if (enable_webrtc) {
611 sources += rebase_path(
612 gypi_values.chrome_browser_webrtc_sources,
613 ".", "//chrome")
614 }
615 if (enable_service_discovery) {
616 sources += rebase_path(
617 gypi_values.chrome_browser_service_discovery_sources,
618 ".", "//chrome")
619 }
620 if (enable_mdns) {
621 sources += rebase_path(
622 gypi_values.chrome_browser_mdns_sources,
623 ".", "//chrome")
624 }
625 if (!enable_autofill_dialog || is_android || is_ios) {
626 sources -= [
627 "autofill/validation_rules_storage_factory.cc",
628 "autofill/validation_rules_storage_factory.h",
629 ]
630 }
631 if (enable_wifi_bootstrapping) {
632 sources += rebase_path(
633 gypi_values.chrome_browser_wifi_bootstrapping_sources,
634 ".", "//chrome")
635 if (is_win || is_mac) {
636 # TODO(brettw) as of this writing wifi bootstrapping is set on Windows
637 # and Mac, so this test is meaningless. Can we merge these lists?
638 sources += rebase_path(
639 gypi_values.chrome_browser_win_mac_wifi_bootstrapping_sources,
640 ".", "//chrome")
641 }
642 }
643}
644
James Robinson2ed4d692014-09-17 05:20:58645if (is_android) {
646 # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers
647 generate_jni("jni_headers") {
648 sources = rebase_path(
649 gypi_values.chrome_browser_jni_sources, ".", "//chrome")
650 jni_package = "chrome"
651 }
652}
653
[email protected]77ce8022014-06-16 19:29:56654# GYP version: chrome/chrome_resources.gyp:chrome_resources
655# (generate_browser_resources action)
656grit("resources") {
657 source = "browser_resources.grd"
[email protected]48885492014-08-13 11:22:41658 output_dir = "$root_gen_dir/chrome"
[email protected]cb0c67a2014-07-22 16:37:26659 outputs = [
660 "grit/browser_resources.h",
661 "browser_resources.pak",
662 ]
[email protected]77ce8022014-06-16 19:29:56663
664 omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js"
665
666 grit_flags = [
667 "-E", "about_credits_file=" +
668 rebase_path(about_credits_file, root_build_dir),
669 "-E", "additional_modules_list_file=" +
670 rebase_path(additional_modules_list_file, root_build_dir),
671 "-E", "omnibox_mojom_file=" +
672 rebase_path(omnibox_mojom_file, root_build_dir),
673 ]
674
675 deps = [
676 ":about_credits",
677 ":chrome_internal_resources_gen",
[email protected]77ce8022014-06-16 19:29:56678 "//chrome/browser/ui/webui/omnibox:mojo_bindings",
Brett Wilson4263a742014-09-10 00:02:24679 "//mojo/environment:chromium",
[email protected]77ce8022014-06-16 19:29:56680 ]
681}
682
683# GYP version: chrome/chrome_resource.gyp:about_credits
684action("about_credits") {
685 script = "//tools/licenses.py"
686
687 # TODO(phajdan.jr): input dependencies so this can be regenerated
688 # automatically when one of the credits changes. The way this should work is
689 # that licenses.py should write a .d file listing the input dependencies (see
690 # "depfile" in GN).
691 outputs = [ about_credits_file ]
692
693 args = [
694 "credits",
695 rebase_path(about_credits_file, root_build_dir),
696 ]
697}
698
699# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
engedy99d0e11b2014-09-30 13:32:41700if (is_chrome_branded) {
[email protected]77ce8022014-06-16 19:29:56701 action("chrome_internal_resources_gen") {
engedy99d0e11b2014-09-30 13:32:41702 script = "internal/transform_additional_modules_list.py"
703 sources = [ "internal/resources/additional_modules_list.input" ]
704 outputs = [ additional_modules_list_file ]
705 args = rebase_path(sources, root_build_dir) +
706 rebase_path(outputs, root_build_dir)
[email protected]77ce8022014-06-16 19:29:56707 }
708} else {
709 group("chrome_internal_resources_gen") {
710 # Empty placeholder.
711 }
712}
Brett Wilson052ce132014-09-12 19:46:29713
714# In GYP this is part of test_support_common.
715source_set("test_support") {
716 testonly = true
717
718 # Always include this via the main test support target.
719 visibility = [ "//chrome/test:test_support" ]
720
721 sources = [
722 "browsing_data/mock_browsing_data_appcache_helper.cc",
723 "browsing_data/mock_browsing_data_appcache_helper.h",
724 "browsing_data/mock_browsing_data_channel_id_helper.cc",
725 "browsing_data/mock_browsing_data_channel_id_helper.h",
726 "browsing_data/mock_browsing_data_cookie_helper.cc",
727 "browsing_data/mock_browsing_data_cookie_helper.h",
728 "browsing_data/mock_browsing_data_database_helper.cc",
729 "browsing_data/mock_browsing_data_database_helper.h",
730 "browsing_data/mock_browsing_data_file_system_helper.cc",
731 "browsing_data/mock_browsing_data_file_system_helper.h",
732 "browsing_data/mock_browsing_data_flash_lso_helper.cc",
733 "browsing_data/mock_browsing_data_flash_lso_helper.h",
734 "browsing_data/mock_browsing_data_indexed_db_helper.cc",
735 "browsing_data/mock_browsing_data_indexed_db_helper.h",
736 "browsing_data/mock_browsing_data_local_storage_helper.cc",
737 "browsing_data/mock_browsing_data_local_storage_helper.h",
738 "browsing_data/mock_browsing_data_quota_helper.cc",
739 "browsing_data/mock_browsing_data_quota_helper.h",
740 "browsing_data/mock_browsing_data_service_worker_helper.cc",
741 "browsing_data/mock_browsing_data_service_worker_helper.h",
742 "download/download_test_file_activity_observer.cc",
743 "download/download_test_file_activity_observer.h",
744 "download/test_download_shelf.cc",
745 "download/test_download_shelf.h",
746 "extensions/extension_action_test_util.cc",
747 "extensions/extension_action_test_util.h",
748 "invalidation/fake_invalidation_service.cc",
749 "invalidation/fake_invalidation_service.h",
750 "media/fake_desktop_media_list.cc",
751 "media/fake_desktop_media_list.h",
752 "net/dns_probe_test_util.cc",
753 "net/dns_probe_test_util.h",
754 "net/url_request_mock_util.cc",
755 "net/url_request_mock_util.h",
756 "notifications/notification_test_util.cc",
757 "notifications/notification_test_util.h",
758 "password_manager/mock_password_store_service.cc",
759 "password_manager/mock_password_store_service.h",
760 "password_manager/null_password_store_service.cc",
761 "password_manager/null_password_store_service.h",
762 "password_manager/test_password_store_service.cc",
763 "password_manager/test_password_store_service.h",
764 "prefs/pref_service_mock_factory.cc",
765 "prefs/pref_service_mock_factory.h",
766 "profile_resetter/profile_resetter_test_base.cc",
767 "profile_resetter/profile_resetter_test_base.h",
768 "search_engines/template_url_service_factory_test_util.cc",
769 "search_engines/template_url_service_factory_test_util.h",
770 "search_engines/template_url_service_test_util.cc",
771 "search_engines/template_url_service_test_util.h",
772 "sessions/session_service_test_helper.cc",
773 "sessions/session_service_test_helper.h",
774 "signin/fake_account_reconcilor.cc",
775 "signin/fake_account_reconcilor.h",
776 "signin/fake_account_tracker_service.cc",
777 "signin/fake_account_tracker_service.h",
778 "signin/fake_profile_oauth2_token_service.cc",
779 "signin/fake_profile_oauth2_token_service.h",
780 "signin/fake_profile_oauth2_token_service_builder.cc",
781 "signin/fake_profile_oauth2_token_service_builder.h",
782 "signin/fake_signin_manager.cc",
783 "signin/fake_signin_manager.h",
784 "ssl/ssl_client_auth_requestor_mock.cc",
785 "ssl/ssl_client_auth_requestor_mock.h",
Brett Wilson052ce132014-09-12 19:46:29786 "sync/profile_sync_components_factory_mock.cc",
787 "sync/profile_sync_components_factory_mock.h",
788 "sync/profile_sync_service_mock.cc",
789 "sync/profile_sync_service_mock.h",
790 ]
791
Brett Wilsone53895272014-09-23 23:41:46792 public_deps = [
Brett Wilson052ce132014-09-12 19:46:29793 ":browser",
Brett Wilsone53895272014-09-23 23:41:46794 "//chrome/browser/ui:test_support",
795 ]
796 deps = [
Brett Wilson052ce132014-09-12 19:46:29797 "//base:prefs_test_support",
798 "//chrome/browser",
Brett Wilson052ce132014-09-12 19:46:29799 "//chrome/common",
800 "//chrome/common/safe_browsing:proto",
801 "//components/invalidation",
802 "//components/invalidation:test_support",
803 "//components/password_manager/core/browser:test_support",
804 "//components/search_engines:test_support",
805 "//content/test:test_support",
806 "//chrome/app/theme:theme_resources",
807 "//net:test_support",
808 "//skia",
809 "//testing/gmock",
810 "//testing/gtest",
811 "//ui/gfx",
812 ]
813
Brett Wilson052ce132014-09-12 19:46:29814 if (!is_ios) {
815 deps += [
816 "//components/sessions:test_support",
Brett Wilson052ce132014-09-12 19:46:29817 "//google_apis:test_support",
818 ]
819 }
820
James Robinson2ed4d692014-09-17 05:20:58821 if (enable_extensions) {
822 deps += [
823 "//extensions:test_support",
824 ]
825 }
826
Brett Wilson052ce132014-09-12 19:46:29827 if (is_chromeos) {
828 sources += [
829 "chromeos/app_mode/fake_cws.cc",
830 "chromeos/app_mode/fake_cws.h",
831 "chromeos/file_manager/fake_disk_mount_manager.cc",
832 "chromeos/file_manager/fake_disk_mount_manager.h",
833 "chromeos/input_method/mock_candidate_window_controller.cc",
834 "chromeos/input_method/mock_candidate_window_controller.h",
835 "chromeos/input_method/mock_input_method_engine.cc",
836 "chromeos/input_method/mock_input_method_engine.h",
837 "chromeos/input_method/mock_input_method_manager.cc",
838 "chromeos/input_method/mock_input_method_manager.h",
839 "chromeos/login/fake_login_utils.cc",
840 "chromeos/login/fake_login_utils.h",
841 "chromeos/login/mock_login_utils.cc",
842 "chromeos/login/mock_login_utils.h",
843 "chromeos/login/users/avatar/mock_user_image_manager.cc",
844 "chromeos/login/users/avatar/mock_user_image_manager.h",
845 "chromeos/login/users/fake_supervised_user_manager.cc",
846 "chromeos/login/users/fake_supervised_user_manager.h",
847 "chromeos/login/users/fake_user_manager.cc",
848 "chromeos/login/users/fake_user_manager.h",
849 "chromeos/login/users/mock_user_manager.cc",
850 "chromeos/login/users/mock_user_manager.h",
851 "chromeos/login/test/oobe_screen_waiter.cc",
852 "chromeos/login/test/oobe_screen_waiter.h",
853 "chromeos/login/test/js_checker.cc",
854 "chromeos/login/test/js_checker.h",
855 "chromeos/login/ui/mock_login_display.cc",
856 "chromeos/login/ui/mock_login_display.h",
857 "chromeos/login/ui/mock_login_display_host.cc",
858 "chromeos/login/ui/mock_login_display_host.h",
859 "chromeos/net/network_portal_detector_test_utils.cc",
860 "chromeos/net/network_portal_detector_test_utils.h",
861 "chromeos/policy/cloud_external_data_manager_base_test_util.cc",
862 "chromeos/policy/cloud_external_data_manager_base_test_util.h",
863 "chromeos/policy/device_policy_builder.cc",
864 "chromeos/policy/device_policy_builder.h",
865 "chromeos/policy/fake_device_cloud_policy_initializer.cc",
866 "chromeos/policy/fake_device_cloud_policy_initializer.h",
867 "chromeos/policy/stub_enterprise_install_attributes.cc",
868 "chromeos/policy/stub_enterprise_install_attributes.h",
869 "chromeos/settings/device_settings_test_helper.cc",
870 "chromeos/settings/device_settings_test_helper.h",
871 "chromeos/system/fake_input_device_settings.cc",
872 "chromeos/system/fake_input_device_settings.h",
873 ]
874 configs += [ "//build/config/linux:dbus" ]
mukai6ba73552014-10-09 19:05:17875 deps += [ "//chromeos:test_support" ]
Brett Wilson052ce132014-09-12 19:46:29876 }
877
878 if (enable_configuration_policy) {
879 sources += [
880 "policy/test/local_policy_test_server.cc",
881 "policy/test/local_policy_test_server.h",
882 ]
Brett Wilsone53895272014-09-23 23:41:46883 public_deps += [
Brett Wilson052ce132014-09-12 19:46:29884 "//components/policy:policy_component_test_support",
885 "//components/policy:test_support",
886 ]
Brett Wilson052ce132014-09-12 19:46:29887 }
888
889 if (safe_browsing_mode == 1) {
890 sources += [
891 "extensions/fake_safe_browsing_database_manager.cc",
892 "extensions/fake_safe_browsing_database_manager.h",
893 ]
894 }
895
896 if (enable_extensions) {
897 sources += [
898 "drive/dummy_drive_service.cc",
899 "drive/dummy_drive_service.h",
900 "drive/fake_drive_service.cc",
901 "drive/fake_drive_service.h",
902 "drive/test_util.cc",
903 "drive/test_util.h",
904 "extensions/api/messaging/native_messaging_test_util.cc",
905 "extensions/api/messaging/native_messaging_test_util.h",
906 "extensions/extension_notification_observer.cc",
907 "extensions/extension_notification_observer.h",
Brett Wilson052ce132014-09-12 19:46:29908 "extensions/mock_extension_special_storage_policy.cc",
909 "extensions/mock_extension_special_storage_policy.h",
910 "extensions/test_blacklist.cc",
911 "extensions/test_blacklist.h",
912 "extensions/test_blacklist_state_fetcher.cc",
913 "extensions/test_blacklist_state_fetcher.h",
914 "extensions/test_extension_environment.cc",
915 "extensions/test_extension_environment.h",
916 "extensions/test_extension_prefs.cc",
917 "extensions/test_extension_prefs.h",
918 "extensions/test_extension_service.cc",
919 "extensions/test_extension_service.h",
920 "extensions/test_extension_system.cc",
921 "extensions/test_extension_system.h",
922 "media_galleries/media_galleries_test_util.cc",
923 "media_galleries/media_galleries_test_util.h",
924 ]
925 deps += [
926 "//components/storage_monitor:test_support",
927 ]
928 }
929
930 if (enable_mdns) {
931 sources += [
932 "local_discovery/test_service_discovery_client.cc",
933 "local_discovery/test_service_discovery_client.h",
934 ]
935 }
936
937 if (enable_app_list) {
938 sources += [
939 "ui/app_list/test/chrome_app_list_test_support.cc",
940 "ui/app_list/test/chrome_app_list_test_support.h",
941 ]
942 }
943
944 if (enable_wifi_bootstrapping) {
945 sources += [
946 "local_discovery/wifi/mock_wifi_manager.cc",
947 "local_discovery/wifi/mock_wifi_manager.h",
948 ]
949 }
950}