blob: 758104a099d1c47d8330a89061ae2681953688ac [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
brettw2b2364b2015-05-01 22:36:235import("//build/config/chrome_build.gni")
[email protected]dffd8a912014-06-30 23:24:316import("//build/config/crypto.gni")
7import("//build/config/features.gni")
8import("//build/config/ui.gni")
pkotwicz127726f2015-05-29 15:20:129import("//third_party/protobuf/proto_library.gni")
scottmga266f952014-12-03 20:47:1010
James Robinson2ed4d692014-09-17 05:20:5811# //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which
12# produces a conflict for the "grit" template so we have to only include one.
13if (is_android) {
14 import("//build/config/android/rules.gni")
15} else {
16 import("//tools/grit/grit_rule.gni")
17}
cmasone0a9e4ca2014-10-16 16:40:4918if (is_desktop_linux) {
19 import("//build/config/linux/pkg_config.gni")
20}
[email protected]77ce8022014-06-16 19:29:5621
amistryf269d3b2015-06-09 19:18:3922declare_args() {
mgiuca3cd6a822015-08-07 00:46:1323 # 'Ok Google' hotwording is disabled by default. Set to true to enable. (This
24 # will download a closed-source NaCl module at startup.) Chrome-branded
25 # ChromeOS builds have this enabled by default.
26 enable_hotwording = is_chrome_branded && is_chromeos
amistryf269d3b2015-06-09 19:18:3927}
28
[email protected]77ce8022014-06-16 19:29:5629additional_modules_list_file =
30 "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"
31
scottmga266f952014-12-03 20:47:1032gypi_values = exec_script("//build/gypi_to_gn.py",
33 [ rebase_path("../chrome_browser.gypi") ],
34 "scope",
35 [ "../chrome_browser.gypi" ])
[email protected]dffd8a912014-06-30 23:24:3136
mmenkede134672015-08-18 01:33:3937if (is_win) {
38 # This is in a separate config so the flags can be applied to dependents.
39 # ldflags in GN aren't automatically inherited.
40 config("browser_win_linker_flags") {
41 libs = [
42 "credui.lib",
43 "netapi32.lib",
44 "ndfapi.lib", # Used by browser/net/net_error_diagnostics_dialog_win.h
45 ]
46 ldflags = [ "/DELAYLOAD:ndfapi.dll" ]
47 }
48}
49
cmasone0a9e4ca2014-10-16 16:40:4950if (is_desktop_linux) {
brettwa68ea2b2015-02-01 02:54:0751 # Gnome-keyring is normally dynamically loaded. The gnome_keyring config
52 # will set this up.
cmasone0a9e4ca2014-10-16 16:40:4953 pkg_config("gnome_keyring") {
54 packages = [ "gnome-keyring-1" ]
brettwa68ea2b2015-02-01 02:54:0755 defines = [
56 "USE_GNOME_KEYRING",
57 "DLOPEN_GNOME_KEYRING",
58 ]
59 ignore_libs = true
60 }
61
62 # If you want to link gnome-keyring directly (use only for unit tests)
63 # ADDITIONALLY add this config on top of ":gnome_keyring". pkg-config is a
64 # bit slow, so prefer not to run it again. In practice, gnome-keyring's libs
65 # are just itself and common gnome ones we link already, so we can get away
66 # with additionally just coding the library name here.
67 config("gnome_keyring_direct") {
68 libs = [ "gnome-keyring" ]
cmasone0a9e4ca2014-10-16 16:40:4969 }
70}
71
brettw44a5cf82015-04-08 19:48:2272source_set("browser") {
apavlove749bca2014-09-30 11:07:4173 configs += [
74 "//build/config/compiler:wexit_time_destructors",
brettwbc8b2a22015-07-28 18:24:4275 "//build/config:precompiled_headers",
apavlove749bca2014-09-30 11:07:4176 "//third_party/WebKit/public:debug_devtools",
77 ]
[email protected]dffd8a912014-06-30 23:24:3178 defines = []
79 sources = []
80 libs = []
81 ldflags = []
82
83 # iOS/non-iOS shared deps. New dependencies should generally be added in the
84 # non-iOS deps below.
Brett Wilsone53895272014-09-23 23:41:4685 public_deps = [
86 "//components/autofill/core/browser",
87 "//content/public/browser",
88 "//sql",
89 "//sync",
90 ]
[email protected]dffd8a912014-06-30 23:24:3191 deps = [
92 "//base/allocator",
93 "//chrome:extra_resources",
94 "//chrome:resources",
95 "//chrome:strings",
[email protected]855b7de2014-07-08 21:02:4596 "//chrome/app/resources:platform_locale_settings",
[email protected]797b25042014-07-01 23:54:1797 "//chrome/app/theme:theme_resources",
sdefresnea213ceb2015-10-05 09:23:3998 "//chrome/browser/metrics/variations:chrome_ui_string_overrider_factory",
[email protected]797b25042014-07-01 23:54:1799 "//chrome/browser/net:probe_message_proto",
[email protected]abd4b682014-07-16 20:26:30100 "//chrome/browser/ui",
[email protected]dffd8a912014-06-30 23:24:31101 "//chrome/common",
[email protected]604828c2014-07-02 20:39:12102 "//components/autofill/core/browser",
Brett Wilson1c693992014-08-25 19:10:01103 "//components/bookmarks/browser",
treiba9ea2fb2015-03-20 10:06:03104 "//components/bookmarks/managed",
[email protected]b9f4c682014-07-10 22:00:37105 "//components/captive_portal",
estark334673f42015-09-08 14:51:39106 "//components/certificate_reporting",
[email protected]fca567b2014-07-02 17:37:34107 "//components/cloud_devices/common",
Brett Wilson1c693992014-08-25 19:10:01108 "//components/component_updater",
blundell64fedf12015-08-25 12:22:27109 "//components/compression",
vabrfc325fa2015-04-10 16:24:45110 "//components/content_settings/content/common",
vasiliiac461392014-09-18 11:35:17111 "//components/content_settings/core/browser",
[email protected]08f71012014-07-25 10:27:54112 "//components/content_settings/core/common",
abhishek.a21bbf8e4a2015-10-15 21:05:56113 "//components/cookie_config",
[email protected]478ed232014-08-19 02:10:55114 "//components/crx_file",
megjablon3476e042014-10-14 19:21:59115 "//components/data_reduction_proxy/core/browser",
sclittleae932be2015-10-08 20:53:50116 "//components/data_usage/core",
amohammadkhanf76ae112015-09-14 17:34:43117 "//components/data_use_measurement/core",
reillyg4a849272015-02-20 21:38:43118 "//components/device_event_log",
[email protected]273ae5ab2014-07-09 21:10:25119 "//components/domain_reliability",
noyaudaaac3a2014-10-08 11:11:11120 "//components/enhanced_bookmarks",
sdefresnecbacfd72015-03-20 12:11:32121 "//components/favicon/core",
sdefresne001b10de2015-03-20 18:41:46122 "//components/favicon_base",
droger888be0b2015-10-01 14:28:52123 "//components/flags_ui",
[email protected]abd4b682014-07-16 20:26:30124 "//components/gcm_driver",
jianli2104ce612015-05-06 00:24:34125 "//components/gcm_driver/instance_id",
Brett Wilson1c693992014-08-25 19:10:01126 "//components/google/core/browser",
fsamuelaf5bf6d12015-05-28 16:29:54127 "//components/guest_view/browser",
erikchen332265b2014-11-14 19:59:52128 "//components/handoff",
[email protected]273ae5ab2014-07-09 21:10:25129 "//components/history/core/browser",
130 "//components/history/core/common",
Brett Wilson1c693992014-08-25 19:10:01131 "//components/infobars/core",
knn062cdbb2015-06-26 18:18:42132 "//components/invalidation/impl",
gunsch1afc65172014-09-16 00:03:32133 "//components/metrics:gpu",
[email protected]fca567b2014-07-02 17:37:34134 "//components/metrics:net",
gunsch840bc412014-09-18 19:38:06135 "//components/metrics:profiler",
blundell218124c22015-10-15 10:36:35136 "//components/metrics:profiler_content",
Brett Wilson1c693992014-08-25 19:10:01137 "//components/metrics/proto:proto",
blundell8e66adc2015-10-12 11:46:12138 "//components/metrics:ui",
blundell695d61f2015-10-21 11:25:53139 "//components/metrics_services_manager",
rsleevic327b48f82015-04-30 02:03:25140 "//components/mime_util",
[email protected]fca567b2014-07-02 17:37:34141 "//components/navigation_metrics",
Brett Wilson1c693992014-08-25 19:10:01142 "//components/network_time",
fgorskife7b92f2015-06-15 19:19:40143 "//components/offline_pages",
blundell2102f7c2015-07-09 10:00:53144 "//components/omnibox/browser",
[email protected]fca567b2014-07-02 17:37:34145 "//components/os_crypt",
haavardmdfdf28f2015-01-08 21:05:00146 "//components/packed_ct_ev_whitelist",
Brett Wilson1c693992014-08-25 19:10:01147 "//components/password_manager/core/browser",
148 "//components/password_manager/core/common",
[email protected]fca567b2014-07-02 17:37:34149 "//components/policy:policy_component",
stevenjbb237e2ae2015-07-02 22:02:11150 "//components/proxy_config",
[email protected]fca567b2014-07-02 17:37:34151 "//components/query_parser",
[email protected]b9f4c682014-07-10 22:00:37152 "//components/rappor",
Brett Wilson1c693992014-08-25 19:10:01153 "//components/renderer_context_menu",
[email protected]720b10492014-07-23 08:48:40154 "//components/search",
Brett Wilson1c693992014-08-25 19:10:01155 "//components/search_engines",
156 "//components/search_provider_logos",
felt20e0f2002015-07-31 15:27:36157 "//components/security_interstitials/core",
[email protected]abd4b682014-07-16 20:26:30158 "//components/signin/core/browser",
felt2493b4452015-09-17 20:33:59159 "//components/ssl_errors",
[email protected]abd4b682014-07-16 20:26:30160 "//components/startup_metric_utils",
[email protected]797b25042014-07-01 23:54:17161 "//components/strings",
mathp60143a32014-10-08 14:52:45162 "//components/suggestions",
blundellc759b682015-10-08 15:50:59163 "//components/sync_bookmarks",
Brett Wilson1c693992014-08-25 19:10:01164 "//components/sync_driver",
skym6b9887e2015-10-09 22:10:47165 "//components/sync_sessions",
zhenwecedcf22015-08-18 23:37:46166 "//components/tracing:startup_tracing",
[email protected]b9f4c682014-07-10 22:00:37167 "//components/translate/core/browser",
168 "//components/translate/core/common",
brettw0741cb1c2015-08-21 22:06:00169 "//components/ui/zoom",
sdefresnec083d1f2015-04-17 21:12:18170 "//components/undo",
sorin39eab2f2015-01-06 01:09:08171 "//components/update_client",
rsleevi24f64dc22015-08-07 21:39:21172 "//components/url_formatter",
[email protected]fca567b2014-07-02 17:37:34173 "//components/user_prefs",
jitendra.ks94c0b962015-08-10 08:24:09174 "//components/user_prefs/tracked:user_prefs_tracked",
isherman3be67db2014-10-24 05:57:44175 "//components/variations",
176 "//components/variations/net",
blundellb50ad702015-08-27 17:08:29177 "//components/variations/service",
[email protected]bf4545f2014-07-11 19:49:46178 "//components/webdata/common",
sdefresnecb955cd2014-12-15 23:21:56179 "//components/webdata_services",
drogerf8479942014-11-21 17:47:53180 "//components/web_resource",
[email protected]dffd8a912014-06-30 23:24:31181 "//content/public/browser",
182 "//content/public/common",
[email protected]604828c2014-07-02 20:39:12183 "//courgette:courgette_lib",
[email protected]dffd8a912014-06-30 23:24:31184 "//crypto",
[email protected]604828c2014-07-02 20:39:12185 "//google_apis",
Brett Wilson8f1323042014-09-11 16:58:56186 "//gpu/config",
[email protected]dffd8a912014-06-30 23:24:31187 "//skia",
188 "//sql",
189 "//sync",
[email protected]797b25042014-07-01 23:54:17190 "//third_party/cacheinvalidation",
[email protected]dffd8a912014-06-30 23:24:31191 "//third_party/icu",
192 "//third_party/libxml",
ajwongf7b1cb692014-08-23 21:36:22193 "//third_party/libjingle",
[email protected]dffd8a912014-06-30 23:24:31194 "//third_party/widevine/cdm:version_h",
195 "//third_party/zlib",
196 "//third_party/zlib:minizip",
197 "//third_party/zlib:zip",
198 "//ui/base",
cjhopman09981a92014-10-27 17:11:18199 "//ui/events:events_base",
[email protected]dffd8a912014-06-30 23:24:31200 "//ui/gfx",
201 "//ui/gfx/geometry",
[email protected]a1d7d4f2014-07-16 21:33:36202 "//ui/message_center",
203 "//ui/shell_dialogs",
[email protected]dffd8a912014-06-30 23:24:31204 "//ui/strings",
[email protected]797b25042014-07-01 23:54:17205 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31206 ]
207
scottmga266f952014-12-03 20:47:10208 sources +=
209 rebase_path(gypi_values.chrome_browser_undo_sources, ".", "//chrome")
danduongd81789642014-09-23 02:50:00210
[email protected]dffd8a912014-06-30 23:24:31211 if (!is_ios) {
scottmga266f952014-12-03 20:47:10212 sources +=
213 rebase_path(gypi_values.chrome_browser_non_ios_sources, ".", "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59214 sources += rebase_path(gypi_values.chrome_browser_autocomplete_sources,
scottmga266f952014-12-03 20:47:10215 ".",
216 "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59217 sources += rebase_path(gypi_values.chrome_browser_bookmark_sources,
scottmga266f952014-12-03 20:47:10218 ".",
219 "//chrome")
stuartmorgan997cf23d2014-12-04 21:01:18220 sources += rebase_path(gypi_values.chrome_browser_browser_process_sources,
221 ".",
222 "//chrome")
223 sources += rebase_path(gypi_values.chrome_browser_content_settings_sources,
224 ".",
225 "//chrome")
benwellsedf5e082015-04-23 02:45:14226 sources += rebase_path(gypi_values.chrome_browser_engagement_sources,
227 ".",
228 "//chrome")
scottmga266f952014-12-03 20:47:10229 sources +=
230 rebase_path(gypi_values.chrome_browser_favicon_sources, ".", "//chrome")
231 sources +=
232 rebase_path(gypi_values.chrome_browser_google_sources, ".", "//chrome")
233 sources +=
234 rebase_path(gypi_values.chrome_browser_history_sources, ".", "//chrome")
235 sources +=
236 rebase_path(gypi_values.chrome_browser_metrics_sources, ".", "//chrome")
237 sources +=
238 rebase_path(gypi_values.chrome_browser_net_sources, ".", "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59239 sources += rebase_path(gypi_values.chrome_browser_password_manager_sources,
scottmga266f952014-12-03 20:47:10240 ".",
241 "//chrome")
mlamouri4e372022015-03-29 14:51:06242 sources += rebase_path(gypi_values.chrome_browser_permissions_sources,
243 ".",
244 "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59245 sources += rebase_path(gypi_values.chrome_browser_predictor_sources,
scottmga266f952014-12-03 20:47:10246 ".",
247 "//chrome")
248 sources +=
249 rebase_path(gypi_values.chrome_browser_pref_sources, ".", "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59250 sources += rebase_path(gypi_values.chrome_browser_profiles_sources,
scottmga266f952014-12-03 20:47:10251 ".",
252 "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59253 sources += rebase_path(gypi_values.chrome_browser_search_engines_sources,
scottmga266f952014-12-03 20:47:10254 ".",
255 "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59256 sources += rebase_path(gypi_values.chrome_browser_services_sources,
scottmga266f952014-12-03 20:47:10257 ".",
258 "//chrome")
259 sources +=
stuartmorgan997cf23d2014-12-04 21:01:18260 rebase_path(gypi_values.chrome_browser_session_sources, ".", "//chrome")
261 sources +=
scottmga266f952014-12-03 20:47:10262 rebase_path(gypi_values.chrome_browser_signin_sources, ".", "//chrome")
263 sources +=
stuartmorgan997cf23d2014-12-04 21:01:18264 rebase_path(gypi_values.chrome_browser_ssl_sources, ".", "//chrome")
265 sources +=
scottmga266f952014-12-03 20:47:10266 rebase_path(gypi_values.chrome_browser_sync_sources, ".", "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59267 sources += rebase_path(gypi_values.chrome_browser_web_resource_sources,
scottmga266f952014-12-03 20:47:10268 ".",
269 "//chrome")
270
[email protected]dffd8a912014-06-30 23:24:31271 deps += [
Brett Wilson1c693992014-08-25 19:10:01272 "//apps",
[email protected]dffd8a912014-06-30 23:24:31273 "//cc",
brettwca934582015-02-24 21:50:27274 "//chrome/app/theme:theme_resources",
[email protected]55699f392014-08-20 22:16:30275 "//chrome/browser/devtools",
sdefresnea213ceb2015-10-05 09:23:39276 "//chrome/browser/metrics/variations:chrome_ui_string_overrider_factory",
brettwca934582015-02-24 21:50:27277 "//chrome/browser/resources:component_extension_resources",
tfarina04d426612015-08-18 16:42:33278 "//chrome/common/net",
[email protected]55699f392014-08-20 22:16:30279 "//chrome/installer/util",
jitendra.ks4f2e9112015-08-14 11:40:26280 "//components/about_handler",
oshimaf65398422014-11-18 23:30:42281 "//components/app_modal",
[email protected]b9f4c682014-07-10 22:00:37282 "//components/autofill/content/browser",
lazyboy14082d22015-04-02 01:04:58283 "//components/browsing_data",
jeremyim364ac1182015-03-03 18:49:43284 "//components/data_reduction_proxy/content/browser",
amohammadkhan092adb22015-09-11 21:08:49285 "//components/data_use_measurement/content",
dgozmanec2b982a2015-04-28 10:36:39286 "//components/devtools_discovery",
dgozman102fee92015-04-20 15:45:46287 "//components/devtools_http_handler",
mdjones1c47b052015-07-22 19:15:39288 "//components/dom_distiller/content:content_browser",
tfarina041134472015-09-02 15:29:38289 "//components/error_page/common",
sdefresne001b10de2015-03-20 18:41:46290 "//components/favicon/content",
sdefresne715246622015-01-12 16:24:04291 "//components/history/content/browser",
[email protected]fca567b2014-07-02 17:37:34292 "//components/keyed_service/content",
[email protected]55699f392014-08-20 22:16:30293 "//components/navigation_interception",
drogerc690e8802015-09-21 14:29:16294 "//components/net_log",
tfarina041134472015-09-02 15:29:38295 "//components/network_hints/common",
[email protected]55699f392014-08-20 22:16:30296 "//components/password_manager/content/browser",
vabr5410d0b2015-08-07 11:02:04297 "//components/password_manager/sync/browser",
dbeam155ac972015-04-20 15:34:48298 "//components/plugins/common",
abhishek.a2171c612852015-08-31 10:48:19299 "//components/proxy_config",
droger2a6ab542015-10-09 16:10:28300 "//components/resources",
bauerbf0e64aa2015-06-25 15:54:07301 "//components/safe_json",
brettwa22cb3b2015-04-30 20:23:12302 "//components/sessions",
abhishek.a212849cee2015-10-20 11:27:29303 "//components/ssl_config",
[email protected]abd4b682014-07-16 20:26:30304 "//components/storage_monitor",
sdefresne875d0782015-09-16 12:01:28305 "//components/syncable_prefs",
[email protected]b9f4c682014-07-10 22:00:37306 "//components/translate/content/browser",
sdefresne44eb1f22015-08-06 08:51:55307 "//components/upload_list",
[email protected]fca567b2014-07-02 17:37:34308 "//components/url_matcher",
[email protected]dffd8a912014-06-30 23:24:31309 "//components/visitedlink/browser",
310 "//components/visitedlink/common",
hanxi149b92d2014-09-11 21:57:18311 "//components/web_cache/browser",
[email protected]b9f4c682014-07-10 22:00:37312 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:08313 "//content/app/resources",
finnur61535c702015-10-05 11:10:02314 "//device/devices_app/usb/public/interfaces",
[email protected]55699f392014-08-20 22:16:30315 "//media",
yhiranobbea6272015-09-17 07:09:03316 "//media/midi",
rockot50dc5692015-07-08 01:57:26317 "//mojo/application/public/cpp",
cjhopman09981a92014-10-27 17:11:18318 "//mojo/common",
[email protected]604828c2014-07-02 20:39:12319 "//mojo/environment:chromium",
Brett Wilson83fd4242014-09-02 19:45:33320 "//net:extras",
[email protected]dffd8a912014-06-30 23:24:31321 "//net:net_with_v8",
pilgrim4af8c212014-09-05 17:30:15322 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:24323 "//storage/common",
erga3c614c92015-04-03 17:47:51324 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46325 "//third_party/WebKit/public:resources",
[email protected]dffd8a912014-06-30 23:24:31326 "//third_party/leveldatabase",
[email protected]fca567b2014-07-02 17:37:34327 "//third_party/libaddressinput",
[email protected]dffd8a912014-06-30 23:24:31328 "//third_party/libyuv",
blundell70fb547672015-01-19 17:18:33329 "//third_party/mojo/src/mojo/edk/system",
330 "//third_party/mojo/src/mojo/public/cpp/bindings",
331 "//third_party/mojo/src/mojo/public/js",
[email protected]dffd8a912014-06-30 23:24:31332 "//third_party/re2",
333 "//third_party/smhasher:cityhash",
Brett Wilson83fd4242014-09-02 19:45:33334 "//third_party/webrtc/modules/desktop_capture",
spang1c36fac2015-02-05 19:55:12335 "//ui/base/ime",
[email protected]dffd8a912014-06-30 23:24:31336 "//ui/gl",
brettwca934582015-02-24 21:50:27337 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31338 "//ui/surface",
[email protected]604828c2014-07-02 20:39:12339 "//ui/web_dialogs",
[email protected]fca567b2014-07-02 17:37:34340 "//v8",
[email protected]dffd8a912014-06-30 23:24:31341 ]
paulmeyer27b328b2015-06-17 21:26:12342
343 if (toolkit_views) {
344 deps += [ "//ui/views" ]
345 }
[email protected]dffd8a912014-06-30 23:24:31346 } else { # iOS
scottmga266f952014-12-03 20:47:10347 sources +=
348 rebase_path(gypi_values.chrome_browser_ios_sources, ".", "//chrome")
349 sources +=
350 rebase_path(gypi_values.chrome_browser_google_sources, ".", "//chrome")
351 deps += [ "//net" ]
[email protected]dffd8a912014-06-30 23:24:31352 libs += [
353 "CoreTelephony.framework",
354 "CoreText.framework",
355 "MobileCoreServices.framework",
356 "QuartzCore.framework",
357 ]
scottmga266f952014-12-03 20:47:10358 ldflags += [
359 "-weak_framework",
360 "CoreImage",
361 ]
[email protected]dffd8a912014-06-30 23:24:31362 }
363
364 if (is_win || is_mac) {
scottmga266f952014-12-03 20:47:10365 sources +=
366 rebase_path(gypi_values.chrome_browser_win_mac_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31367 }
mmenkede134672015-08-18 01:33:39368 if (!is_win && !is_mac && !is_ios) {
369 sources += [ "net/net_error_diagnostics_dialog_generic.cc" ]
370 }
[email protected]dffd8a912014-06-30 23:24:31371 if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) {
372 sources += [
373 "net/disk_cache_dir_policy_handler.cc",
374 "net/disk_cache_dir_policy_handler.h",
375 ]
376 }
377 if (!is_android && !is_ios && enable_configuration_policy) {
378 sources += [
379 "download/download_dir_policy_handler.cc",
380 "download/download_dir_policy_handler.h",
381 ]
382 }
383 if (is_mac) {
scottmga266f952014-12-03 20:47:10384 sources +=
385 rebase_path(gypi_values.chrome_browser_mac_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31386 deps += [
brettw624c82d2015-07-23 00:31:50387 #"app_shim" TODO(GYP) bug 512600
388 #"browser_app_shim" TODO(GYP) bug 512600
[email protected]dffd8a912014-06-30 23:24:31389 ]
390 }
ki.stfu5e669f02015-09-17 07:15:19391 if (is_mac || is_android) {
392 sources += rebase_path(
393 gypi_values.chrome_browser_password_manager_mac_android_sources,
394 ".",
395 "//chrome")
396 }
[email protected]dffd8a912014-06-30 23:24:31397 if (enable_extensions) {
Brett Wilsone53895272014-09-23 23:41:46398 public_deps += [ "//chrome/browser/extensions" ]
[email protected]cc5b3be2014-08-15 23:24:52399 deps += [
[email protected]cc5b3be2014-08-15 23:24:52400 "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
thestige33aa2422014-09-22 22:16:30401 "//chrome/common/extensions/api",
402 "//chrome/common/extensions/api:api_registration",
lukasza8acc4eb2015-07-20 20:57:20403 "//components/drive:drive",
msarda4c408ff2015-04-22 14:27:56404 "//components/proximity_auth/ble",
tengs4758c082014-12-19 18:51:44405 "//components/proximity_auth/cryptauth",
oshima758abebc2014-11-06 10:55:50406 "//extensions/components/javascript_dialog_extensions_client",
thestig73f4cdc2015-01-15 01:51:06407 "//media/cast:net",
[email protected]cc5b3be2014-08-15 23:24:52408 ]
[email protected]dffd8a912014-06-30 23:24:31409 sources += rebase_path(gypi_values.chrome_browser_extensions_sources,
scottmga266f952014-12-03 20:47:10410 ".",
411 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31412 }
413 if (enable_background) {
414 sources += rebase_path(gypi_values.chrome_browser_background_sources,
scottmga266f952014-12-03 20:47:10415 ".",
416 "//chrome")
jamesr29ea2d122014-10-23 10:30:27417 if (!use_aura || is_win || is_chromeos) {
[email protected]dffd8a912014-06-30 23:24:31418 sources -= [ "background/background_mode_manager_aura.cc" ]
419 }
420 }
421 if (enable_task_manager) {
422 sources += rebase_path(gypi_values.chrome_browser_task_manager_sources,
scottmga266f952014-12-03 20:47:10423 ".",
424 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31425 }
426 if (enable_spellcheck) {
427 sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources,
scottmga266f952014-12-03 20:47:10428 ".",
429 "//chrome")
dylanking34c72442015-07-23 23:19:58430 if (!is_android) {
431 deps += [ "//third_party/hunspell" ]
432 }
[email protected]dffd8a912014-06-30 23:24:31433 }
434 if (enable_nacl) {
scottmga266f952014-12-03 20:47:10435 sources +=
436 rebase_path(gypi_values.chrome_browser_nacl_sources, ".", "//chrome")
dpranke6065cf72015-02-26 03:30:58437 deps += [ "//components/nacl:nacl_browser" ]
[email protected]dffd8a912014-06-30 23:24:31438 }
apavlove749bca2014-09-30 11:07:41439
[email protected]dffd8a912014-06-30 23:24:31440 if (enable_configuration_policy) {
scottmga266f952014-12-03 20:47:10441 sources +=
442 rebase_path(gypi_values.chrome_browser_policy_shared_with_ios_sources,
443 ".",
444 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31445 deps += [
[email protected]604828c2014-07-02 20:39:12446 "//components/policy",
[email protected]797b25042014-07-01 23:54:17447 "//components/policy/proto",
[email protected]dffd8a912014-06-30 23:24:31448 ]
449 if (!is_ios) {
scottmga266f952014-12-03 20:47:10450 sources += rebase_path(gypi_values.chrome_browser_policy_non_ios_sources,
451 ".",
452 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31453 }
454 if (!is_chromeos) {
455 sources += rebase_path(
scottmga266f952014-12-03 20:47:10456 gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources,
457 ".",
458 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31459 }
460 if (is_win || is_mac || is_desktop_linux) {
461 sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
scottmga266f952014-12-03 20:47:10462 ".",
463 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31464 }
cjhopman09981a92014-10-27 17:11:18465 if (is_android || is_ios) {
466 sources += rebase_path(gypi_values.chrome_browser_policy_mobile_sources,
scottmga266f952014-12-03 20:47:10467 ".",
468 "//chrome")
cjhopman09981a92014-10-27 17:11:18469 } else {
amistry6e1ed1b2015-03-12 05:24:01470 deps += [
471 "//chrome/browser/policy:path_parser",
472 "//net:net_browser_services",
473 ]
[email protected]dffd8a912014-06-30 23:24:31474 }
475 } else {
476 # Configuration policy disabled.
477 sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources,
scottmga266f952014-12-03 20:47:10478 ".",
479 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31480 }
481
482 if (enable_plugins) {
scottmga266f952014-12-03 20:47:10483 sources +=
484 rebase_path(gypi_values.chrome_browser_plugins_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31485 deps += [
James Robinson2ed4d692014-09-17 05:20:58486 "//components/pdf/browser",
brettwf7eb6ca2015-02-14 01:37:31487 "//ppapi/proxy:ipc",
thestig11b815e92014-08-26 00:32:14488 "//third_party/adobe/flash:flapper_version_h",
[email protected]dffd8a912014-06-30 23:24:31489 ]
490 }
491 if (safe_browsing_mode != 0) {
scottmga266f952014-12-03 20:47:10492 sources +=
stuartmorgan1b3df822014-12-08 14:36:11493 rebase_path(gypi_values.chrome_browser_safe_browsing_basic_sources,
scottmga266f952014-12-03 20:47:10494 ".",
495 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31496 deps += [
[email protected]fca567b2014-07-02 17:37:34497 "//chrome/browser/safe_browsing:chunk_proto",
mattm022138b52014-09-23 01:05:45498 "//chrome/browser/safe_browsing:metadata_proto",
[email protected]fca567b2014-07-02 17:37:34499 "//chrome/browser/safe_browsing:report_proto",
[email protected]dffd8a912014-06-30 23:24:31500 ]
501 if (safe_browsing_mode == 1) {
scottmga266f952014-12-03 20:47:10502 sources +=
stuartmorgan1b3df822014-12-08 14:36:11503 rebase_path(gypi_values.chrome_browser_safe_browsing_full_sources,
scottmga266f952014-12-03 20:47:10504 ".",
505 "//chrome")
scottmga266f952014-12-03 20:47:10506 deps += [ "//chrome/common/safe_browsing:proto" ]
grtc1d1b752015-09-05 13:26:41507 if (is_win) {
508 deps += [ "//chrome/browser/safe_browsing/incident_reporting:state_store_data_proto" ]
509 }
nparker00a64f12015-10-16 17:34:30510 } else if (safe_browsing_mode == 2) {
511 sources +=
512 rebase_path(gypi_values.chrome_browser_safe_browsing_mobile_sources,
513 ".",
514 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31515 }
516 }
517
amistryf269d3b2015-06-09 19:18:39518 if (enable_hotwording) {
519 defines += [ "ENABLE_HOTWORDING" ]
520 }
521
[email protected]dffd8a912014-06-30 23:24:31522 if (is_linux) {
mostynbea514682015-08-18 22:08:56523 deps += [ "//device/media_transfer_protocol" ]
[email protected]dffd8a912014-06-30 23:24:31524 }
mostynbea514682015-08-18 22:08:56525
526 if (use_udev) {
527 deps += [ "//device/udev_linux" ]
528 }
529
[email protected]dffd8a912014-06-30 23:24:31530 if (is_linux && !is_chromeos) {
[email protected]fd98b612014-07-09 22:11:47531 deps += [ "//third_party/speech-dispatcher" ]
[email protected]dffd8a912014-06-30 23:24:31532 }
533
534 if (is_chromeos) {
535 sources += rebase_path(gypi_values.chrome_browser_chromeos_sources,
scottmga266f952014-12-03 20:47:10536 ".",
537 "//chrome")
538 deps += [ "//chrome/browser/chromeos" ]
[email protected]dffd8a912014-06-30 23:24:31539 }
540
mukai8c99b882014-10-15 03:07:59541 if (is_chromeos || is_ios) {
542 sources -= [
blundell296904a2015-10-13 12:30:48543 "signin/chrome_signin_status_metrics_provider_delegate.cc",
544 "signin/chrome_signin_status_metrics_provider_delegate.h",
mukai8c99b882014-10-15 03:07:59545 ]
546 }
547
[email protected]dffd8a912014-06-30 23:24:31548 if (use_cups) {
[email protected]604828c2014-07-02 20:39:12549 configs += [ "//printing:cups" ]
[email protected]dffd8a912014-06-30 23:24:31550 }
551 if (is_desktop_linux) {
552 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources,
scottmga266f952014-12-03 20:47:10553 ".",
554 "//chrome")
cmasone0a9e4ca2014-10-16 16:40:49555 configs += [ ":gnome_keyring" ]
[email protected]dffd8a912014-06-30 23:24:31556 }
dvadym34532022015-01-22 15:42:51557 if (is_desktop_linux) {
558 sources += rebase_path(gypi_values.chrome_browser_libsecret_sources,
559 ".",
560 "//chrome")
561 defines += [ "USE_LIBSECRET" ]
562 }
[email protected]dffd8a912014-06-30 23:24:31563 if (use_aura) {
scottmga266f952014-12-03 20:47:10564 sources +=
565 rebase_path(gypi_values.chrome_browser_aura_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31566 deps += [
[email protected]fca567b2014-07-02 17:37:34567 "//ui/aura",
568 "//ui/compositor",
[email protected]604828c2014-07-02 20:39:12569 "//ui/keyboard",
ben974286a2015-10-10 00:45:12570 "//ui/keyboard:keyboard_with_content",
[email protected]dffd8a912014-06-30 23:24:31571 ]
572 }
573 if (ui_compositor_image_transport) {
574 deps += [ "//ui/gl" ]
575 }
576
[email protected]855b7de2014-07-08 21:02:45577 if (use_ash) {
scottmga266f952014-12-03 20:47:10578 sources +=
579 rebase_path(gypi_values.chrome_browser_ash_sources, ".", "//chrome")
[email protected]855b7de2014-07-08 21:02:45580 }
581
[email protected]dffd8a912014-06-30 23:24:31582 if (use_x11) {
scottmga266f952014-12-03 20:47:10583 sources +=
584 rebase_path(gypi_values.chrome_browser_x11_sources, ".", "//chrome")
vchigrinbbc23e72015-01-21 22:49:23585 } else {
586 sources -= [ "password_manager/password_store_x.cc" ]
[email protected]dffd8a912014-06-30 23:24:31587 }
588 if (is_posix && !is_mac && !is_ios) {
589 sources += [
rseseka0a7a042014-09-18 23:59:20590 "//chrome/app/chrome_crash_reporter_client.cc",
591 "//chrome/app/chrome_crash_reporter_client.h",
[email protected]dffd8a912014-06-30 23:24:31592 ]
593 deps += [
sdefresne8ba0b88c2015-09-18 10:33:13594 "//components/crash/content/app",
595 "//components/crash/content/browser",
[email protected]dffd8a912014-06-30 23:24:31596 ]
597 }
598 if (use_nss_certs) {
scottmga266f952014-12-03 20:47:10599 sources +=
600 rebase_path(gypi_values.chrome_browser_nss_sources, ".", "//chrome")
mukai8c99b882014-10-15 03:07:59601 if (is_chromeos) {
602 sources -= [ "net/nss_context_linux.cc" ]
603 }
[email protected]dffd8a912014-06-30 23:24:31604 }
605 if (enable_notifications) {
606 sources += rebase_path(gypi_values.chrome_browser_notifications_sources,
scottmga266f952014-12-03 20:47:10607 ".",
608 "//chrome")
estade6d95d1d2015-10-02 18:55:23609 if (is_android) {
610 sources +=
611 rebase_path(gypi_values.chrome_browser_notifications_android_sources,
612 ".",
613 "//chrome")
614 } else {
[email protected]dffd8a912014-06-30 23:24:31615 sources += rebase_path(
stuartmorgan1b3df822014-12-08 14:36:11616 gypi_values.chrome_browser_notifications_non_android_sources,
scottmga266f952014-12-03 20:47:10617 ".",
618 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31619 }
620 }
621 if (enable_themes) {
scottmga266f952014-12-03 20:47:10622 sources +=
623 rebase_path(gypi_values.chrome_browser_themes_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31624 }
625
vitalybuka93eea402014-11-05 23:47:15626 if (enable_basic_printing || enable_print_preview) {
[email protected]dffd8a912014-06-30 23:24:31627 # Some form of printing support.
stuartmorgan1b3df822014-12-08 14:36:11628 sources += rebase_path(gypi_values.chrome_browser_printing_basic_sources,
scottmga266f952014-12-03 20:47:10629 ".",
630 "//chrome")
spang5cc72542015-08-04 19:47:11631 deps += [
632 "//printing",
brettwd649f6b2015-08-18 20:58:51633 "//components/printing/browser",
spang5cc72542015-08-04 19:47:11634 ]
635
vitalybuka36259ca2014-08-28 23:42:24636 if (is_win) {
[email protected]dffd8a912014-06-30 23:24:31637 sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources,
scottmga266f952014-12-03 20:47:10638 ".",
639 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31640 }
vitalybuka93eea402014-11-05 23:47:15641 if (enable_print_preview) {
[email protected]dffd8a912014-06-30 23:24:31642 # Full printing on top of the above.
stuartmorgan1b3df822014-12-08 14:36:11643 sources += rebase_path(gypi_values.chrome_browser_printing_full_sources,
scottmga266f952014-12-03 20:47:10644 ".",
645 "//chrome")
vitalybuka93eea402014-11-05 23:47:15646 } else {
[email protected]dffd8a912014-06-30 23:24:31647 # Partial-only printing support.
scottmga266f952014-12-03 20:47:10648 sources +=
stuartmorgan1b3df822014-12-08 14:36:11649 rebase_path(gypi_values.chrome_browser_printing_basic_only_sources,
scottmga266f952014-12-03 20:47:10650 ".",
651 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31652 }
653 }
654 if (enable_captive_portal_detection) {
655 sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources,
scottmga266f952014-12-03 20:47:10656 ".",
657 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31658 }
659 if (enable_session_service) {
660 sources += rebase_path(gypi_values.chrome_browser_session_service_sources,
scottmga266f952014-12-03 20:47:10661 ".",
662 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31663 }
664
thestigdc377202014-10-28 22:06:02665 if (!is_android && !is_ios && !is_chromeos) {
scottmga266f952014-12-03 20:47:10666 sources +=
667 rebase_path(gypi_values.chrome_browser_desktop_sources, ".", "//chrome")
thestigdc377202014-10-28 22:06:02668 }
669
[email protected]dffd8a912014-06-30 23:24:31670 if (is_android || is_ios) {
671 # Mobile.
scottmga266f952014-12-03 20:47:10672 sources +=
673 rebase_path(gypi_values.chrome_browser_mobile_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31674 } else {
675 # Non-mobile.
676 sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
scottmga266f952014-12-03 20:47:10677 ".",
678 "//chrome")
reillyge471fab2014-08-29 01:58:43679 deps += [
sdefresnebbf563c2015-03-17 11:09:09680 "//components/feedback",
juncai1b1152562015-09-04 02:36:08681 "//components/webusb",
reillyge471fab2014-08-29 01:58:43682 "//device/core",
rockot50dc5692015-07-08 01:57:26683 "//device/devices_app/public/cpp",
684 "//device/devices_app/public/cpp:factory",
reillygd77718d2014-09-04 00:57:56685 "//device/usb",
reillyge471fab2014-08-29 01:58:43686 ]
[email protected]dffd8a912014-06-30 23:24:31687 }
688
mathp17e1eba2015-10-06 21:50:59689 if (!is_chrome_branded) {
fserb1c2db4c2015-07-16 17:14:49690 sources += [
691 "search/local_files_ntp_source.cc",
692 "search/local_files_ntp_source.h",
693 ]
694 }
695
[email protected]dffd8a912014-06-30 23:24:31696 if (is_android) {
scottmga266f952014-12-03 20:47:10697 sources +=
698 rebase_path(gypi_values.chrome_browser_android_sources, ".", "//chrome")
twellingtoncaf0eb752015-06-01 16:19:50699 sources += rebase_path(gypi_values.chrome_browser_bookmark_android_sources,
700 ".",
701 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31702 deps += [
pkotwicz127726f2015-05-29 15:20:12703 ":client_discourse_context_proto",
704 ":delta_file_proto",
James Robinson2ed4d692014-09-17 05:20:58705 ":jni_headers",
[email protected]55699f392014-08-20 22:16:30706 "//components/cdm/browser",
cjhopman09981a92014-10-27 17:11:18707 "//components/enhanced_bookmarks",
twifkak8c9f7502015-06-25 02:12:57708 "//components/precache/content",
709 "//components/precache/core",
estadee37f8222014-11-07 21:35:22710 "//components/resources:components_resources",
mathiash3ecfdfa2015-04-13 15:06:07711 "//components/service_tab_launcher",
blundell11d93bc2015-07-31 12:33:12712 "//components/toolbar",
cjhopman09981a92014-10-27 17:11:18713 "//components/web_contents_delegate_android",
714 "//third_party/android_opengl/etc1",
fdegans34f31e272015-05-22 16:59:03715 "//third_party/android_tools:cpu_features",
twellington0bc61492015-01-30 20:14:13716 "//third_party/libaddressinput:util",
[email protected]dffd8a912014-06-30 23:24:31717 ]
718 deps -= [
[email protected]fca567b2014-07-02 17:37:34719 "//third_party/libaddressinput",
[email protected]abd4b682014-07-16 20:26:30720 "//components/storage_monitor",
[email protected]abd4b682014-07-16 20:26:30721 "//components/web_modal",
[email protected]dffd8a912014-06-30 23:24:31722 ]
megjablon5effca2e2015-02-13 23:54:07723 defines += [ "ENABLE_DATA_REDUCTION_PROXY_DEBUGGING" ]
rseseke59ea892015-03-19 22:27:44724
725 if (use_seccomp_bpf) {
726 defines += [ "USE_SECCOMP_BPF" ]
rsesek65d31352015-06-08 22:53:44727 deps += [ "//sandbox/linux:seccomp_bpf" ]
rseseke59ea892015-03-19 22:27:44728 }
[email protected]dffd8a912014-06-30 23:24:31729 }
730
731 if (is_mac) {
732 deps += [
[email protected]6b5d2f92014-07-30 00:40:03733 "//third_party/google_toolbox_for_mac",
tfarina22896302015-02-23 21:18:03734 "//third_party/mozilla",
[email protected]dffd8a912014-06-30 23:24:31735 ]
736 libs += [
737 "Accelerate.framework",
738 "AddressBook.framework",
739 "AudioUnit.framework",
740 "DiskArbitration.framework",
741 "IOKit.framework",
742 "ImageCaptureCore.framework",
743 "OpenGL.framework",
744 "QuartzCore.framework",
745 "SecurityInterface.framework",
746 ]
747 }
748
749 if (enable_rlz) {
sdefresned967d552015-07-16 08:34:35750 deps += [ ":rlz" ]
[email protected]dffd8a912014-06-30 23:24:31751 }
752
753 # TODO(GYP)
754 # Temporary fix to break the browser target into smaller chunks so it
755 # will link with goma builds.
756 #["OS=="win" and chromium_win_pch==0", {
757 # "msvs_shard": 4,
758 #}],
759
760 if (is_win) {
scottmga266f952014-12-03 20:47:10761 sources +=
762 rebase_path(gypi_values.chrome_browser_win_sources, ".", "//chrome")
Brett Wilsone53895272014-09-23 23:41:46763 public_deps += [
764 "//ui/views",
765 "//ui/views/controls/webview",
766 ]
[email protected]dffd8a912014-06-30 23:24:31767 deps += [
vchigrin9593e7a2015-01-27 10:08:19768 ":chrome_process_finder",
mdempsky15a48be2015-10-21 23:37:53769 "//chrome/common:version_header",
[email protected]55699f392014-08-20 22:16:30770 "//chrome/installer/util:strings",
vchigrinf2b90aa2015-01-23 11:12:19771 "//chrome_elf",
772 "//chrome_elf:constants",
773 "//chrome_elf:dll_hash",
vchigrin61944ae2015-01-30 23:51:32774 "//components/browser_watcher",
775 "//components/browser_watcher:browser_watcher_client",
vchigrinbbc23e72015-01-21 22:49:23776 "//google_update",
[email protected]55699f392014-08-20 22:16:30777 "//third_party/iaccessible2",
778 "//third_party/isimpledom",
[email protected]dffd8a912014-06-30 23:24:31779 "//third_party/wtl",
vchigrin88ed6f42015-01-17 11:56:42780 "//ui/metro_viewer",
781 "//win8:metro_viewer",
[email protected]dffd8a912014-06-30 23:24:31782 ]
mmenkede134672015-08-18 01:33:39783
784 all_dependent_configs = [ ":browser_win_linker_flags" ]
785
grt235b3f092015-05-27 21:42:48786 if (!is_chrome_branded) {
787 deps -= [ "//google_update" ]
788 sources -= [
789 "google/did_run_updater_win.cc",
790 "google/did_run_updater_win.h",
791 "google/google_update_win.cc",
792 "google/google_update_win.h",
793 ]
794 }
[email protected]dffd8a912014-06-30 23:24:31795 } else {
796 # Non-Windows.
scottmga266f952014-12-03 20:47:10797 sources +=
798 rebase_path(gypi_values.chrome_browser_non_win_sources, ".", "//chrome")
[email protected]f6dc4ae2014-07-30 00:10:37799 if (toolkit_views) {
[email protected]dffd8a912014-06-30 23:24:31800 deps += [
scottmga266f952014-12-03 20:47:10801 "//ui/views",
802 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31803 ]
[email protected]dffd8a912014-06-30 23:24:31804 }
805 }
806
807 if (is_linux) {
[email protected]dffd8a912014-06-30 23:24:31808 if (use_aura) {
slan17e5ce7f2015-09-25 00:04:45809 configs += [ "//build/config/linux:dbus" ]
810 deps += [
811 "//build/linux:fontconfig",
812 "//dbus",
[email protected]dffd8a912014-06-30 23:24:31813 ]
[email protected]dffd8a912014-06-30 23:24:31814 }
815 if (use_x11) {
816 configs += [ "//build/config/linux:x11" ]
817 deps += [ "//ui/gfx/x" ]
818 }
819 }
820
821 if (is_desktop_linux) {
stuartmorgan7f569a822014-12-08 20:10:54822 sources += rebase_path(gypi_values.chrome_browser_linux_desktop_sources,
scottmga266f952014-12-03 20:47:10823 ".",
824 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31825 }
826 if (enable_plugin_installation) {
scottmga266f952014-12-03 20:47:10827 sources +=
828 rebase_path(gypi_values.chrome_browser_plugin_installation_sources,
829 ".",
830 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31831 }
832 if (enable_app_list) {
scottmga266f952014-12-03 20:47:10833 deps += [ "//ui/app_list" ]
[email protected]dffd8a912014-06-30 23:24:31834 }
treib87bb89cbb2014-12-01 16:01:47835 if (enable_supervised_users) {
scottmga266f952014-12-03 20:47:10836 sources += rebase_path(gypi_values.chrome_browser_supervised_user_sources,
837 ".",
838 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31839 }
bauerb7f3b8542015-06-29 19:56:19840 if (enable_supervised_users && !is_android && !is_ios) {
841 sources +=
842 rebase_path(gypi_values.chrome_browser_supervised_user_legacy_sources,
843 ".",
844 "//chrome")
845 }
treib87bb89cbb2014-12-01 16:01:47846 if (enable_supervised_users && enable_themes) {
thestig169a6362014-11-13 20:47:59847 sources += rebase_path(
scottmga266f952014-12-03 20:47:10848 gypi_values.chrome_browser_supervised_user_and_themes_sources,
849 ".",
850 "//chrome")
thestig169a6362014-11-13 20:47:59851 }
[email protected]dffd8a912014-06-30 23:24:31852 if (enable_webrtc) {
scottmga266f952014-12-03 20:47:10853 sources +=
854 rebase_path(gypi_values.chrome_browser_webrtc_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31855 }
856 if (enable_service_discovery) {
scottmga266f952014-12-03 20:47:10857 sources += rebase_path(gypi_values.chrome_browser_service_discovery_sources,
858 ".",
859 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31860 }
861 if (enable_mdns) {
scottmga266f952014-12-03 20:47:10862 sources +=
863 rebase_path(gypi_values.chrome_browser_mdns_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31864 }
865 if (!enable_autofill_dialog || is_android || is_ios) {
866 sources -= [
867 "autofill/validation_rules_storage_factory.cc",
868 "autofill/validation_rules_storage_factory.h",
869 ]
870 }
871 if (enable_wifi_bootstrapping) {
scottmga266f952014-12-03 20:47:10872 sources +=
873 rebase_path(gypi_values.chrome_browser_wifi_bootstrapping_sources,
874 ".",
875 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31876 if (is_win || is_mac) {
877 # TODO(brettw) as of this writing wifi bootstrapping is set on Windows
878 # and Mac, so this test is meaningless. Can we merge these lists?
879 sources += rebase_path(
stuartmorgan1b3df822014-12-08 14:36:11880 gypi_values.chrome_browser_wifi_bootstrapping_win_mac_sources,
scottmga266f952014-12-03 20:47:10881 ".",
882 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31883 }
884 }
mfoltz150bb8b2015-04-09 22:30:05885 if (enable_media_router) {
imchengb6b09239f2015-05-15 21:41:55886 deps += [ "//chrome/browser/media/router" ]
mfoltz150bb8b2015-04-09 22:30:05887 }
[email protected]dffd8a912014-06-30 23:24:31888}
889
James Robinson2ed4d692014-09-17 05:20:58890if (is_android) {
891 # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers
892 generate_jni("jni_headers") {
scottmga266f952014-12-03 20:47:10893 sources =
894 rebase_path(gypi_values.chrome_browser_jni_sources, ".", "//chrome")
James Robinson2ed4d692014-09-17 05:20:58895 jni_package = "chrome"
896 }
pkotwicz127726f2015-05-29 15:20:12897
898 #GYP: '//chrome/chrome_browser.gypi:client_discourse_context_proto'
899 proto_library("client_discourse_context_proto") {
900 sources = [
901 "android/proto/client_discourse_context.proto",
902 ]
903 }
904
905 #GYP: '//chrome/chrome_browser.gypi:delta_file_proto'
906 proto_library("delta_file_proto") {
907 sources = [
908 "android/proto/delta_file.proto",
909 ]
910 }
James Robinson2ed4d692014-09-17 05:20:58911}
912
vchigrin9593e7a2015-01-27 10:08:19913if (is_win) {
914 source_set("chrome_process_finder") {
915 sources = [
916 "chrome_process_finder_win.cc",
917 "chrome_process_finder_win.h",
918 ]
919 deps = [
920 "//base",
921 "//chrome/browser/metro_utils",
922 "//chrome/common:constants",
923 ]
924 if (enable_configuration_policy) {
925 deps += [ "//chrome/browser/policy:path_parser" ]
926 }
927 }
928}
929
[email protected]77ce8022014-06-16 19:29:56930# GYP version: chrome/chrome_resources.gyp:chrome_resources
931# (generate_browser_resources action)
932grit("resources") {
933 source = "browser_resources.grd"
[email protected]48885492014-08-13 11:22:41934 output_dir = "$root_gen_dir/chrome"
[email protected]cb0c67a2014-07-22 16:37:26935 outputs = [
936 "grit/browser_resources.h",
937 "browser_resources.pak",
938 ]
[email protected]77ce8022014-06-16 19:29:56939
[email protected]77ce8022014-06-16 19:29:56940 grit_flags = [
scottmga266f952014-12-03 20:47:10941 "-E",
scottmga266f952014-12-03 20:47:10942 "additional_modules_list_file=" +
943 rebase_path(additional_modules_list_file, root_build_dir),
944 "-E",
calamityd59c1032015-09-22 06:35:53945 "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
[email protected]77ce8022014-06-16 19:29:56946 ]
947
948 deps = [
[email protected]77ce8022014-06-16 19:29:56949 ":chrome_internal_resources_gen",
brettwde262b02015-05-27 19:41:42950
951 # Depend only on the generated mojo bindings since we read the .mojom.js
952 # file, rather than the whole mojo target which will link the C++ bindings.
calamityd59c1032015-09-22 06:35:53953 "//chrome/browser/ui/webui/engagement:mojo_bindings__generator",
brettwde262b02015-05-27 19:41:42954 "//chrome/browser/ui/webui/omnibox:mojo_bindings__generator",
vchigrin8eede942015-01-29 09:28:15955 ]
[email protected]77ce8022014-06-16 19:29:56956}
957
[email protected]77ce8022014-06-16 19:29:56958# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
engedy99d0e11b2014-09-30 13:32:41959if (is_chrome_branded) {
[email protected]77ce8022014-06-16 19:29:56960 action("chrome_internal_resources_gen") {
engedy99d0e11b2014-09-30 13:32:41961 script = "internal/transform_additional_modules_list.py"
scottmga266f952014-12-03 20:47:10962 sources = [
963 "internal/resources/additional_modules_list.input",
964 ]
965 outputs = [
966 additional_modules_list_file,
967 ]
engedy99d0e11b2014-09-30 13:32:41968 args = rebase_path(sources, root_build_dir) +
969 rebase_path(outputs, root_build_dir)
[email protected]77ce8022014-06-16 19:29:56970 }
971} else {
972 group("chrome_internal_resources_gen") {
973 # Empty placeholder.
974 }
975}
Brett Wilson052ce132014-09-12 19:46:29976
977# In GYP this is part of test_support_common.
978source_set("test_support") {
979 testonly = true
980
981 # Always include this via the main test support target.
982 visibility = [ "//chrome/test:test_support" ]
983
984 sources = [
985 "browsing_data/mock_browsing_data_appcache_helper.cc",
986 "browsing_data/mock_browsing_data_appcache_helper.h",
jsbelle1fe9692015-08-22 01:02:42987 "browsing_data/mock_browsing_data_cache_storage_helper.cc",
988 "browsing_data/mock_browsing_data_cache_storage_helper.h",
Brett Wilson052ce132014-09-12 19:46:29989 "browsing_data/mock_browsing_data_channel_id_helper.cc",
990 "browsing_data/mock_browsing_data_channel_id_helper.h",
991 "browsing_data/mock_browsing_data_cookie_helper.cc",
992 "browsing_data/mock_browsing_data_cookie_helper.h",
993 "browsing_data/mock_browsing_data_database_helper.cc",
994 "browsing_data/mock_browsing_data_database_helper.h",
995 "browsing_data/mock_browsing_data_file_system_helper.cc",
996 "browsing_data/mock_browsing_data_file_system_helper.h",
997 "browsing_data/mock_browsing_data_flash_lso_helper.cc",
998 "browsing_data/mock_browsing_data_flash_lso_helper.h",
999 "browsing_data/mock_browsing_data_indexed_db_helper.cc",
1000 "browsing_data/mock_browsing_data_indexed_db_helper.h",
1001 "browsing_data/mock_browsing_data_local_storage_helper.cc",
1002 "browsing_data/mock_browsing_data_local_storage_helper.h",
1003 "browsing_data/mock_browsing_data_quota_helper.cc",
1004 "browsing_data/mock_browsing_data_quota_helper.h",
1005 "browsing_data/mock_browsing_data_service_worker_helper.cc",
1006 "browsing_data/mock_browsing_data_service_worker_helper.h",
1007 "download/download_test_file_activity_observer.cc",
1008 "download/download_test_file_activity_observer.h",
1009 "download/test_download_shelf.cc",
1010 "download/test_download_shelf.h",
Brett Wilson052ce132014-09-12 19:46:291011 "invalidation/fake_invalidation_service.cc",
1012 "invalidation/fake_invalidation_service.h",
1013 "media/fake_desktop_media_list.cc",
1014 "media/fake_desktop_media_list.h",
1015 "net/dns_probe_test_util.cc",
1016 "net/dns_probe_test_util.h",
1017 "net/url_request_mock_util.cc",
1018 "net/url_request_mock_util.h",
1019 "notifications/notification_test_util.cc",
1020 "notifications/notification_test_util.h",
Brett Wilson052ce132014-09-12 19:46:291021 "profile_resetter/profile_resetter_test_base.cc",
1022 "profile_resetter/profile_resetter_test_base.h",
1023 "search_engines/template_url_service_factory_test_util.cc",
1024 "search_engines/template_url_service_factory_test_util.h",
1025 "search_engines/template_url_service_test_util.cc",
1026 "search_engines/template_url_service_test_util.h",
squef7d723a2015-01-26 22:13:451027 "sessions/session_restore_test_helper.cc",
1028 "sessions/session_restore_test_helper.h",
Brett Wilson052ce132014-09-12 19:46:291029 "sessions/session_service_test_helper.cc",
1030 "sessions/session_service_test_helper.h",
knn523bd722015-07-30 16:27:091031 "signin/fake_account_fetcher_service_builder.cc",
1032 "signin/fake_account_fetcher_service_builder.h",
mlerman2933d012015-04-24 18:34:271033 "signin/fake_gaia_cookie_manager_service.cc",
1034 "signin/fake_gaia_cookie_manager_service.h",
Brett Wilson052ce132014-09-12 19:46:291035 "signin/fake_profile_oauth2_token_service_builder.cc",
1036 "signin/fake_profile_oauth2_token_service_builder.h",
droger4f489e62015-07-24 19:27:591037 "signin/fake_signin_manager_builder.cc",
1038 "signin/fake_signin_manager_builder.h",
Brett Wilson052ce132014-09-12 19:46:291039 "ssl/ssl_client_auth_requestor_mock.cc",
1040 "ssl/ssl_client_auth_requestor_mock.h",
Brett Wilson052ce132014-09-12 19:46:291041 "sync/profile_sync_service_mock.cc",
1042 "sync/profile_sync_service_mock.h",
1043 ]
1044
brettwbc8b2a22015-07-28 18:24:421045 configs += [ "//build/config:precompiled_headers" ]
1046
Brett Wilsone53895272014-09-23 23:41:461047 public_deps = [
Brett Wilson052ce132014-09-12 19:46:291048 ":browser",
Brett Wilsone53895272014-09-23 23:41:461049 "//chrome/browser/ui:test_support",
1050 ]
1051 deps = [
Brett Wilson052ce132014-09-12 19:46:291052 "//base:prefs_test_support",
1053 "//chrome/browser",
Brett Wilson052ce132014-09-12 19:46:291054 "//chrome/common",
1055 "//chrome/common/safe_browsing:proto",
knn062cdbb2015-06-26 18:18:421056 "//components/invalidation/impl",
1057 "//components/invalidation/impl:test_support",
Brett Wilson052ce132014-09-12 19:46:291058 "//components/password_manager/core/browser:test_support",
1059 "//components/search_engines:test_support",
sdefresne875d0782015-09-16 12:01:281060 "//components/syncable_prefs:test_support",
jitendra.ks94c0b962015-08-10 08:24:091061 "//components/user_prefs/tracked:user_prefs_tracked_test_support",
Brett Wilson052ce132014-09-12 19:46:291062 "//content/test:test_support",
1063 "//chrome/app/theme:theme_resources",
1064 "//net:test_support",
1065 "//skia",
1066 "//testing/gmock",
1067 "//testing/gtest",
1068 "//ui/gfx",
1069 ]
1070
Brett Wilson052ce132014-09-12 19:46:291071 if (!is_ios) {
1072 deps += [
1073 "//components/sessions:test_support",
Brett Wilson052ce132014-09-12 19:46:291074 "//google_apis:test_support",
1075 ]
1076 }
1077
thestig354985d2015-09-28 20:55:001078 if (is_android) {
1079 sources -= [
thestig259da0b2015-10-07 18:09:081080 "download/test_download_shelf.cc",
1081 "download/test_download_shelf.h",
1082 "profile_resetter/profile_resetter_test_base.cc",
1083 "profile_resetter/profile_resetter_test_base.h",
1084 "sessions/session_restore_test_helper.cc",
1085 "sessions/session_restore_test_helper.h",
thestig354985d2015-09-28 20:55:001086 "sessions/session_service_test_helper.cc",
1087 "sessions/session_service_test_helper.h",
thestig354985d2015-09-28 20:55:001088 ]
1089 }
1090
James Robinson2ed4d692014-09-17 05:20:581091 if (enable_extensions) {
thestig52a87b3b2014-10-23 22:02:381092 sources += [
1093 "extensions/extension_action_test_util.cc",
1094 "extensions/extension_action_test_util.h",
1095 ]
scottmga266f952014-12-03 20:47:101096 deps += [ "//extensions:test_support" ]
James Robinson2ed4d692014-09-17 05:20:581097 }
1098
Brett Wilson052ce132014-09-12 19:46:291099 if (is_chromeos) {
1100 sources += [
1101 "chromeos/app_mode/fake_cws.cc",
1102 "chromeos/app_mode/fake_cws.h",
1103 "chromeos/file_manager/fake_disk_mount_manager.cc",
1104 "chromeos/file_manager/fake_disk_mount_manager.h",
1105 "chromeos/input_method/mock_candidate_window_controller.cc",
1106 "chromeos/input_method/mock_candidate_window_controller.h",
1107 "chromeos/input_method/mock_input_method_engine.cc",
1108 "chromeos/input_method/mock_input_method_engine.h",
1109 "chromeos/input_method/mock_input_method_manager.cc",
1110 "chromeos/input_method/mock_input_method_manager.h",
brettw7d6ec2462015-01-07 13:00:511111 "chromeos/login/screens/mock_device_disabled_screen_actor.cc",
1112 "chromeos/login/screens/mock_device_disabled_screen_actor.h",
nkostylev393309f2015-02-05 13:57:391113 "chromeos/login/session/user_session_manager_test_api.cc",
1114 "chromeos/login/session/user_session_manager_test_api.h",
Brett Wilson052ce132014-09-12 19:46:291115 "chromeos/login/test/js_checker.cc",
1116 "chromeos/login/test/js_checker.h",
satoruxb7a72ea2015-02-13 07:19:591117 "chromeos/login/test/oobe_screen_waiter.cc",
1118 "chromeos/login/test/oobe_screen_waiter.h",
Brett Wilson052ce132014-09-12 19:46:291119 "chromeos/login/ui/mock_login_display.cc",
1120 "chromeos/login/ui/mock_login_display.h",
1121 "chromeos/login/ui/mock_login_display_host.cc",
1122 "chromeos/login/ui/mock_login_display_host.h",
brettw7d6ec2462015-01-07 13:00:511123 "chromeos/login/users/avatar/mock_user_image_manager.cc",
1124 "chromeos/login/users/avatar/mock_user_image_manager.h",
merkulova793f3022015-02-04 10:18:301125 "chromeos/login/users/fake_chrome_user_manager.cc",
1126 "chromeos/login/users/fake_chrome_user_manager.h",
brettw7d6ec2462015-01-07 13:00:511127 "chromeos/login/users/fake_supervised_user_manager.cc",
1128 "chromeos/login/users/fake_supervised_user_manager.h",
brettw7d6ec2462015-01-07 13:00:511129 "chromeos/login/users/mock_user_manager.cc",
1130 "chromeos/login/users/mock_user_manager.h",
Brett Wilson052ce132014-09-12 19:46:291131 "chromeos/net/network_portal_detector_test_utils.cc",
1132 "chromeos/net/network_portal_detector_test_utils.h",
1133 "chromeos/policy/cloud_external_data_manager_base_test_util.cc",
1134 "chromeos/policy/cloud_external_data_manager_base_test_util.h",
1135 "chromeos/policy/device_policy_builder.cc",
1136 "chromeos/policy/device_policy_builder.h",
brettwa68ea2b2015-02-01 02:54:071137 "chromeos/policy/fake_consumer_management_service.cc",
1138 "chromeos/policy/fake_consumer_management_service.h",
Brett Wilson052ce132014-09-12 19:46:291139 "chromeos/policy/fake_device_cloud_policy_initializer.cc",
1140 "chromeos/policy/fake_device_cloud_policy_initializer.h",
brettwa68ea2b2015-02-01 02:54:071141 "chromeos/policy/fake_device_cloud_policy_manager.cc",
1142 "chromeos/policy/fake_device_cloud_policy_manager.h",
Brett Wilson052ce132014-09-12 19:46:291143 "chromeos/policy/stub_enterprise_install_attributes.cc",
1144 "chromeos/policy/stub_enterprise_install_attributes.h",
1145 "chromeos/settings/device_settings_test_helper.cc",
1146 "chromeos/settings/device_settings_test_helper.h",
1147 "chromeos/system/fake_input_device_settings.cc",
1148 "chromeos/system/fake_input_device_settings.h",
1149 ]
1150 configs += [ "//build/config/linux:dbus" ]
mukai6ba73552014-10-09 19:05:171151 deps += [ "//chromeos:test_support" ]
Brett Wilson052ce132014-09-12 19:46:291152 }
1153
1154 if (enable_configuration_policy) {
1155 sources += [
1156 "policy/test/local_policy_test_server.cc",
1157 "policy/test/local_policy_test_server.h",
1158 ]
Brett Wilsone53895272014-09-23 23:41:461159 public_deps += [
Brett Wilson052ce132014-09-12 19:46:291160 "//components/policy:policy_component_test_support",
1161 "//components/policy:test_support",
1162 ]
Brett Wilson052ce132014-09-12 19:46:291163 }
1164
1165 if (safe_browsing_mode == 1) {
1166 sources += [
1167 "extensions/fake_safe_browsing_database_manager.cc",
1168 "extensions/fake_safe_browsing_database_manager.h",
1169 ]
1170 }
1171
1172 if (enable_extensions) {
1173 sources += [
Brett Wilson052ce132014-09-12 19:46:291174 "extensions/api/messaging/native_messaging_test_util.cc",
1175 "extensions/api/messaging/native_messaging_test_util.h",
1176 "extensions/extension_notification_observer.cc",
1177 "extensions/extension_notification_observer.h",
Brett Wilson052ce132014-09-12 19:46:291178 "extensions/mock_extension_special_storage_policy.cc",
1179 "extensions/mock_extension_special_storage_policy.h",
1180 "extensions/test_blacklist.cc",
1181 "extensions/test_blacklist.h",
1182 "extensions/test_blacklist_state_fetcher.cc",
1183 "extensions/test_blacklist_state_fetcher.h",
brettw7d6ec2462015-01-07 13:00:511184 "extensions/test_extension_dir.cc",
1185 "extensions/test_extension_dir.h",
satoruxb7a72ea2015-02-13 07:19:591186 "extensions/test_extension_environment.cc",
1187 "extensions/test_extension_environment.h",
Brett Wilson052ce132014-09-12 19:46:291188 "extensions/test_extension_prefs.cc",
1189 "extensions/test_extension_prefs.h",
1190 "extensions/test_extension_service.cc",
1191 "extensions/test_extension_service.h",
1192 "extensions/test_extension_system.cc",
1193 "extensions/test_extension_system.h",
1194 "media_galleries/media_galleries_test_util.cc",
1195 "media_galleries/media_galleries_test_util.h",
1196 ]
lukasza8acc4eb2015-07-20 20:57:201197 deps += [
1198 "//components/drive:test_support",
1199 "//components/storage_monitor:test_support",
1200 ]
Brett Wilson052ce132014-09-12 19:46:291201 }
1202
1203 if (enable_mdns) {
1204 sources += [
1205 "local_discovery/test_service_discovery_client.cc",
1206 "local_discovery/test_service_discovery_client.h",
1207 ]
1208 }
1209
1210 if (enable_app_list) {
1211 sources += [
1212 "ui/app_list/test/chrome_app_list_test_support.cc",
1213 "ui/app_list/test/chrome_app_list_test_support.h",
brettw7d6ec2462015-01-07 13:00:511214 "ui/app_list/test/test_app_list_controller_delegate.cc",
1215 "ui/app_list/test/test_app_list_controller_delegate.h",
Brett Wilson052ce132014-09-12 19:46:291216 ]
1217 }
1218
1219 if (enable_wifi_bootstrapping) {
1220 sources += [
1221 "local_discovery/wifi/mock_wifi_manager.cc",
1222 "local_discovery/wifi/mock_wifi_manager.h",
1223 ]
1224 }
1225}
sdefresned967d552015-07-16 08:34:351226
thestig65d7c5c2015-10-06 18:13:471227# In GYP this is part of test_support_ui.
1228source_set("test_support_ui") {
1229 testonly = true
1230
1231 # Always include this via the main test support UI target.
1232 visibility = [ "//chrome/test:test_support_ui" ]
1233
1234 sources = [
1235 "password_manager/password_manager_test_base.cc",
1236 "password_manager/password_manager_test_base.h",
1237 "ui/webui/signin/login_ui_test_utils.cc",
1238 "ui/webui/signin/login_ui_test_utils.h",
1239 ]
1240
1241 configs += [ "//build/config:precompiled_headers" ]
1242
1243 deps = [
1244 "//components/metrics:test_support",
vabr22c9e4f42015-10-20 15:34:091245 "//components/password_manager/core/browser:test_support",
thestig65d7c5c2015-10-06 18:13:471246 "//skia",
1247 "//testing/gtest",
1248 ]
1249}
1250
sdefresned967d552015-07-16 08:34:351251if (enable_rlz_support) {
1252 source_set("rlz") {
1253 sources =
1254 rebase_path(gypi_values.chrome_browser_rlz_sources, ".", "//chrome")
1255 deps = [
1256 "//components/google/core/browser",
1257 "//components/omnibox/browser",
1258 "//components/rlz",
1259 "//components/search_engines",
1260 "//rlz:rlz_lib",
1261 ]
1262 }
1263}