blob: a8234becb6704dcdf3c2edefe63f746adafdf09f [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:5629about_credits_file = "$target_gen_dir/about_credits.html"
30additional_modules_list_file =
31 "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"
32
scottmga266f952014-12-03 20:47:1033gypi_values = exec_script("//build/gypi_to_gn.py",
34 [ rebase_path("../chrome_browser.gypi") ],
35 "scope",
36 [ "../chrome_browser.gypi" ])
[email protected]dffd8a912014-06-30 23:24:3137
mmenkede134672015-08-18 01:33:3938if (is_win) {
39 # This is in a separate config so the flags can be applied to dependents.
40 # ldflags in GN aren't automatically inherited.
41 config("browser_win_linker_flags") {
42 libs = [
43 "credui.lib",
44 "netapi32.lib",
45 "ndfapi.lib", # Used by browser/net/net_error_diagnostics_dialog_win.h
46 ]
47 ldflags = [ "/DELAYLOAD:ndfapi.dll" ]
48 }
49}
50
cmasone0a9e4ca2014-10-16 16:40:4951if (is_desktop_linux) {
brettwa68ea2b2015-02-01 02:54:0752 # Gnome-keyring is normally dynamically loaded. The gnome_keyring config
53 # will set this up.
cmasone0a9e4ca2014-10-16 16:40:4954 pkg_config("gnome_keyring") {
55 packages = [ "gnome-keyring-1" ]
brettwa68ea2b2015-02-01 02:54:0756 defines = [
57 "USE_GNOME_KEYRING",
58 "DLOPEN_GNOME_KEYRING",
59 ]
60 ignore_libs = true
61 }
62
63 # If you want to link gnome-keyring directly (use only for unit tests)
64 # ADDITIONALLY add this config on top of ":gnome_keyring". pkg-config is a
65 # bit slow, so prefer not to run it again. In practice, gnome-keyring's libs
66 # are just itself and common gnome ones we link already, so we can get away
67 # with additionally just coding the library name here.
68 config("gnome_keyring_direct") {
69 libs = [ "gnome-keyring" ]
cmasone0a9e4ca2014-10-16 16:40:4970 }
71}
72
brettw44a5cf82015-04-08 19:48:2273source_set("browser") {
apavlove749bca2014-09-30 11:07:4174 configs += [
75 "//build/config/compiler:wexit_time_destructors",
brettwbc8b2a22015-07-28 18:24:4276 "//build/config:precompiled_headers",
apavlove749bca2014-09-30 11:07:4177 "//third_party/WebKit/public:debug_devtools",
78 ]
[email protected]dffd8a912014-06-30 23:24:3179 defines = []
80 sources = []
81 libs = []
82 ldflags = []
83
84 # iOS/non-iOS shared deps. New dependencies should generally be added in the
85 # non-iOS deps below.
Brett Wilsone53895272014-09-23 23:41:4686 public_deps = [
87 "//components/autofill/core/browser",
88 "//content/public/browser",
89 "//sql",
90 "//sync",
91 ]
[email protected]dffd8a912014-06-30 23:24:3192 deps = [
93 "//base/allocator",
94 "//chrome:extra_resources",
95 "//chrome:resources",
96 "//chrome:strings",
[email protected]797b25042014-07-01 23:54:1797 "//chrome/app:generated_resources_map",
[email protected]855b7de2014-07-08 21:02:4598 "//chrome/app/resources:platform_locale_settings",
[email protected]797b25042014-07-01 23:54:1799 "//chrome/app/theme:theme_resources",
100 "//chrome/browser/net:probe_message_proto",
[email protected]abd4b682014-07-16 20:26:30101 "//chrome/browser/ui",
[email protected]dffd8a912014-06-30 23:24:31102 "//chrome/common",
[email protected]604828c2014-07-02 20:39:12103 "//components/autofill/core/browser",
Brett Wilson1c693992014-08-25 19:10:01104 "//components/bookmarks/browser",
treiba9ea2fb2015-03-20 10:06:03105 "//components/bookmarks/managed",
[email protected]b9f4c682014-07-10 22:00:37106 "//components/captive_portal",
estark334673f42015-09-08 14:51:39107 "//components/certificate_reporting",
[email protected]fca567b2014-07-02 17:37:34108 "//components/cloud_devices/common",
Brett Wilson1c693992014-08-25 19:10:01109 "//components/component_updater",
blundell64fedf12015-08-25 12:22:27110 "//components/compression",
vabrfc325fa2015-04-10 16:24:45111 "//components/content_settings/content/common",
vasiliiac461392014-09-18 11:35:17112 "//components/content_settings/core/browser",
[email protected]08f71012014-07-25 10:27:54113 "//components/content_settings/core/common",
[email protected]478ed232014-08-19 02:10:55114 "//components/crx_file",
megjablon3476e042014-10-14 19:21:59115 "//components/data_reduction_proxy/core/browser",
amohammadkhanf76ae112015-09-14 17:34:43116 "//components/data_use_measurement/core",
reillyg4a849272015-02-20 21:38:43117 "//components/device_event_log",
[email protected]273ae5ab2014-07-09 21:10:25118 "//components/domain_reliability",
noyaudaaac3a2014-10-08 11:11:11119 "//components/enhanced_bookmarks",
sdefresnecbacfd72015-03-20 12:11:32120 "//components/favicon/core",
sdefresne001b10de2015-03-20 18:41:46121 "//components/favicon_base",
[email protected]abd4b682014-07-16 20:26:30122 "//components/gcm_driver",
jianli2104ce612015-05-06 00:24:34123 "//components/gcm_driver/instance_id",
Brett Wilson1c693992014-08-25 19:10:01124 "//components/google/core/browser",
fsamuelaf5bf6d12015-05-28 16:29:54125 "//components/guest_view/browser",
erikchen332265b2014-11-14 19:59:52126 "//components/handoff",
[email protected]273ae5ab2014-07-09 21:10:25127 "//components/history/core/browser",
128 "//components/history/core/common",
Brett Wilson1c693992014-08-25 19:10:01129 "//components/infobars/core",
knn062cdbb2015-06-26 18:18:42130 "//components/invalidation/impl",
gunsch1afc65172014-09-16 00:03:32131 "//components/metrics:gpu",
[email protected]fca567b2014-07-02 17:37:34132 "//components/metrics:net",
gunsch840bc412014-09-18 19:38:06133 "//components/metrics:profiler",
Brett Wilson1c693992014-08-25 19:10:01134 "//components/metrics/proto:proto",
rsleevic327b48f82015-04-30 02:03:25135 "//components/mime_util",
[email protected]fca567b2014-07-02 17:37:34136 "//components/navigation_metrics",
Brett Wilson1c693992014-08-25 19:10:01137 "//components/network_time",
fgorskife7b92f2015-06-15 19:19:40138 "//components/offline_pages",
blundell2102f7c2015-07-09 10:00:53139 "//components/omnibox/browser",
[email protected]fca567b2014-07-02 17:37:34140 "//components/os_crypt",
haavardmdfdf28f2015-01-08 21:05:00141 "//components/packed_ct_ev_whitelist",
Brett Wilson1c693992014-08-25 19:10:01142 "//components/password_manager/core/browser",
143 "//components/password_manager/core/common",
[email protected]fca567b2014-07-02 17:37:34144 "//components/policy:policy_component",
stevenjbb237e2ae2015-07-02 22:02:11145 "//components/proxy_config",
[email protected]fca567b2014-07-02 17:37:34146 "//components/query_parser",
[email protected]b9f4c682014-07-10 22:00:37147 "//components/rappor",
Brett Wilson1c693992014-08-25 19:10:01148 "//components/renderer_context_menu",
[email protected]720b10492014-07-23 08:48:40149 "//components/search",
Brett Wilson1c693992014-08-25 19:10:01150 "//components/search_engines",
151 "//components/search_provider_logos",
felt20e0f2002015-07-31 15:27:36152 "//components/security_interstitials/core",
[email protected]abd4b682014-07-16 20:26:30153 "//components/signin/core/browser",
154 "//components/startup_metric_utils",
[email protected]797b25042014-07-01 23:54:17155 "//components/strings",
mathp60143a32014-10-08 14:52:45156 "//components/suggestions",
Brett Wilson1c693992014-08-25 19:10:01157 "//components/sync_driver",
zhenwecedcf22015-08-18 23:37:46158 "//components/tracing:startup_tracing",
[email protected]b9f4c682014-07-10 22:00:37159 "//components/translate/core/browser",
160 "//components/translate/core/common",
brettw0741cb1c2015-08-21 22:06:00161 "//components/ui/zoom",
sdefresnec083d1f2015-04-17 21:12:18162 "//components/undo",
sorin39eab2f2015-01-06 01:09:08163 "//components/update_client",
rsleevi24f64dc22015-08-07 21:39:21164 "//components/url_formatter",
[email protected]fca567b2014-07-02 17:37:34165 "//components/user_prefs",
jitendra.ks94c0b962015-08-10 08:24:09166 "//components/user_prefs/tracked:user_prefs_tracked",
isherman3be67db2014-10-24 05:57:44167 "//components/variations",
168 "//components/variations/net",
blundellb50ad702015-08-27 17:08:29169 "//components/variations/service",
[email protected]bf4545f2014-07-11 19:49:46170 "//components/webdata/common",
sdefresnecb955cd2014-12-15 23:21:56171 "//components/webdata_services",
drogerf8479942014-11-21 17:47:53172 "//components/web_resource",
[email protected]dffd8a912014-06-30 23:24:31173 "//content/public/browser",
174 "//content/public/common",
[email protected]604828c2014-07-02 20:39:12175 "//courgette:courgette_lib",
[email protected]dffd8a912014-06-30 23:24:31176 "//crypto",
[email protected]604828c2014-07-02 20:39:12177 "//google_apis",
Brett Wilson8f1323042014-09-11 16:58:56178 "//gpu/config",
[email protected]dffd8a912014-06-30 23:24:31179 "//skia",
180 "//sql",
181 "//sync",
[email protected]797b25042014-07-01 23:54:17182 "//third_party/cacheinvalidation",
[email protected]dffd8a912014-06-30 23:24:31183 "//third_party/icu",
184 "//third_party/libxml",
ajwongf7b1cb692014-08-23 21:36:22185 "//third_party/libjingle",
[email protected]dffd8a912014-06-30 23:24:31186 "//third_party/widevine/cdm:version_h",
187 "//third_party/zlib",
188 "//third_party/zlib:minizip",
189 "//third_party/zlib:zip",
190 "//ui/base",
cjhopman09981a92014-10-27 17:11:18191 "//ui/events:events_base",
[email protected]dffd8a912014-06-30 23:24:31192 "//ui/gfx",
193 "//ui/gfx/geometry",
[email protected]a1d7d4f2014-07-16 21:33:36194 "//ui/message_center",
195 "//ui/shell_dialogs",
[email protected]dffd8a912014-06-30 23:24:31196 "//ui/strings",
[email protected]797b25042014-07-01 23:54:17197 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31198 ]
199
scottmga266f952014-12-03 20:47:10200 sources +=
201 rebase_path(gypi_values.chrome_browser_undo_sources, ".", "//chrome")
danduongd81789642014-09-23 02:50:00202
[email protected]dffd8a912014-06-30 23:24:31203 if (!is_ios) {
scottmga266f952014-12-03 20:47:10204 sources +=
205 rebase_path(gypi_values.chrome_browser_non_ios_sources, ".", "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59206 sources += rebase_path(gypi_values.chrome_browser_autocomplete_sources,
scottmga266f952014-12-03 20:47:10207 ".",
208 "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59209 sources += rebase_path(gypi_values.chrome_browser_bookmark_sources,
scottmga266f952014-12-03 20:47:10210 ".",
211 "//chrome")
stuartmorgan997cf23d2014-12-04 21:01:18212 sources += rebase_path(gypi_values.chrome_browser_browser_process_sources,
213 ".",
214 "//chrome")
215 sources += rebase_path(gypi_values.chrome_browser_content_settings_sources,
216 ".",
217 "//chrome")
benwellsedf5e082015-04-23 02:45:14218 sources += rebase_path(gypi_values.chrome_browser_engagement_sources,
219 ".",
220 "//chrome")
scottmga266f952014-12-03 20:47:10221 sources +=
222 rebase_path(gypi_values.chrome_browser_favicon_sources, ".", "//chrome")
223 sources +=
224 rebase_path(gypi_values.chrome_browser_google_sources, ".", "//chrome")
225 sources +=
226 rebase_path(gypi_values.chrome_browser_history_sources, ".", "//chrome")
227 sources +=
228 rebase_path(gypi_values.chrome_browser_metrics_sources, ".", "//chrome")
229 sources +=
230 rebase_path(gypi_values.chrome_browser_net_sources, ".", "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59231 sources += rebase_path(gypi_values.chrome_browser_password_manager_sources,
scottmga266f952014-12-03 20:47:10232 ".",
233 "//chrome")
mlamouri4e372022015-03-29 14:51:06234 sources += rebase_path(gypi_values.chrome_browser_permissions_sources,
235 ".",
236 "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59237 sources += rebase_path(gypi_values.chrome_browser_predictor_sources,
scottmga266f952014-12-03 20:47:10238 ".",
239 "//chrome")
240 sources +=
241 rebase_path(gypi_values.chrome_browser_pref_sources, ".", "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59242 sources += rebase_path(gypi_values.chrome_browser_profiles_sources,
scottmga266f952014-12-03 20:47:10243 ".",
244 "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59245 sources += rebase_path(gypi_values.chrome_browser_search_engines_sources,
scottmga266f952014-12-03 20:47:10246 ".",
247 "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59248 sources += rebase_path(gypi_values.chrome_browser_services_sources,
scottmga266f952014-12-03 20:47:10249 ".",
250 "//chrome")
251 sources +=
stuartmorgan997cf23d2014-12-04 21:01:18252 rebase_path(gypi_values.chrome_browser_session_sources, ".", "//chrome")
253 sources +=
scottmga266f952014-12-03 20:47:10254 rebase_path(gypi_values.chrome_browser_signin_sources, ".", "//chrome")
255 sources +=
stuartmorgan997cf23d2014-12-04 21:01:18256 rebase_path(gypi_values.chrome_browser_ssl_sources, ".", "//chrome")
257 sources +=
scottmga266f952014-12-03 20:47:10258 rebase_path(gypi_values.chrome_browser_sync_sources, ".", "//chrome")
stuartmorgancd5b6042014-11-17 16:52:59259 sources += rebase_path(gypi_values.chrome_browser_web_resource_sources,
scottmga266f952014-12-03 20:47:10260 ".",
261 "//chrome")
262
[email protected]dffd8a912014-06-30 23:24:31263 deps += [
Brett Wilson1c693992014-08-25 19:10:01264 "//apps",
[email protected]dffd8a912014-06-30 23:24:31265 "//cc",
brettwca934582015-02-24 21:50:27266 "//chrome/app:generated_resources_map",
267 "//chrome/app/theme:theme_resources",
[email protected]55699f392014-08-20 22:16:30268 "//chrome/browser/devtools",
brettwca934582015-02-24 21:50:27269 "//chrome/browser/resources:component_extension_resources",
tfarina04d426612015-08-18 16:42:33270 "//chrome/common/net",
[email protected]55699f392014-08-20 22:16:30271 "//chrome/installer/util",
jitendra.ks4f2e9112015-08-14 11:40:26272 "//components/about_handler",
oshimaf65398422014-11-18 23:30:42273 "//components/app_modal",
[email protected]b9f4c682014-07-10 22:00:37274 "//components/autofill/content/browser",
lazyboy14082d22015-04-02 01:04:58275 "//components/browsing_data",
jeremyim364ac1182015-03-03 18:49:43276 "//components/data_reduction_proxy/content/browser",
amohammadkhan092adb22015-09-11 21:08:49277 "//components/data_use_measurement/content",
dgozmanec2b982a2015-04-28 10:36:39278 "//components/devtools_discovery",
dgozman102fee92015-04-20 15:45:46279 "//components/devtools_http_handler",
mdjones1c47b052015-07-22 19:15:39280 "//components/dom_distiller/content:content_browser",
tfarina041134472015-09-02 15:29:38281 "//components/error_page/common",
sdefresne001b10de2015-03-20 18:41:46282 "//components/favicon/content",
sdefresne715246622015-01-12 16:24:04283 "//components/history/content/browser",
[email protected]fca567b2014-07-02 17:37:34284 "//components/keyed_service/content",
[email protected]55699f392014-08-20 22:16:30285 "//components/navigation_interception",
tfarina041134472015-09-02 15:29:38286 "//components/network_hints/common",
[email protected]55699f392014-08-20 22:16:30287 "//components/password_manager/content/browser",
vabr5410d0b2015-08-07 11:02:04288 "//components/password_manager/sync/browser",
dbeam155ac972015-04-20 15:34:48289 "//components/plugins/common",
abhishek.a2171c612852015-08-31 10:48:19290 "//components/proxy_config",
bauerbf0e64aa2015-06-25 15:54:07291 "//components/safe_json",
brettwa22cb3b2015-04-30 20:23:12292 "//components/sessions",
[email protected]abd4b682014-07-16 20:26:30293 "//components/storage_monitor",
sdefresne875d0782015-09-16 12:01:28294 "//components/syncable_prefs",
[email protected]b9f4c682014-07-10 22:00:37295 "//components/translate/content/browser",
sdefresne44eb1f22015-08-06 08:51:55296 "//components/upload_list",
[email protected]fca567b2014-07-02 17:37:34297 "//components/url_matcher",
[email protected]dffd8a912014-06-30 23:24:31298 "//components/visitedlink/browser",
299 "//components/visitedlink/common",
hanxi149b92d2014-09-11 21:57:18300 "//components/web_cache/browser",
[email protected]b9f4c682014-07-10 22:00:37301 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:08302 "//content/app/resources",
[email protected]55699f392014-08-20 22:16:30303 "//media",
yhiranobbea6272015-09-17 07:09:03304 "//media/midi",
rockot50dc5692015-07-08 01:57:26305 "//mojo/application/public/cpp",
cjhopman09981a92014-10-27 17:11:18306 "//mojo/common",
[email protected]604828c2014-07-02 20:39:12307 "//mojo/environment:chromium",
Brett Wilson83fd4242014-09-02 19:45:33308 "//net:extras",
[email protected]dffd8a912014-06-30 23:24:31309 "//net:net_with_v8",
pilgrim4af8c212014-09-05 17:30:15310 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:24311 "//storage/common",
erga3c614c92015-04-03 17:47:51312 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:46313 "//third_party/WebKit/public:resources",
[email protected]dffd8a912014-06-30 23:24:31314 "//third_party/leveldatabase",
[email protected]fca567b2014-07-02 17:37:34315 "//third_party/libaddressinput",
[email protected]dffd8a912014-06-30 23:24:31316 "//third_party/libyuv",
blundell70fb547672015-01-19 17:18:33317 "//third_party/mojo/src/mojo/edk/system",
318 "//third_party/mojo/src/mojo/public/cpp/bindings",
319 "//third_party/mojo/src/mojo/public/js",
[email protected]dffd8a912014-06-30 23:24:31320 "//third_party/re2",
321 "//third_party/smhasher:cityhash",
Brett Wilson83fd4242014-09-02 19:45:33322 "//third_party/webrtc/modules/desktop_capture",
spang1c36fac2015-02-05 19:55:12323 "//ui/base/ime",
[email protected]dffd8a912014-06-30 23:24:31324 "//ui/gl",
brettwca934582015-02-24 21:50:27325 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31326 "//ui/surface",
[email protected]604828c2014-07-02 20:39:12327 "//ui/web_dialogs",
[email protected]fca567b2014-07-02 17:37:34328 "//v8",
[email protected]dffd8a912014-06-30 23:24:31329 ]
paulmeyer27b328b2015-06-17 21:26:12330
331 if (toolkit_views) {
332 deps += [ "//ui/views" ]
333 }
[email protected]dffd8a912014-06-30 23:24:31334 } else { # iOS
scottmga266f952014-12-03 20:47:10335 sources +=
336 rebase_path(gypi_values.chrome_browser_ios_sources, ".", "//chrome")
337 sources +=
338 rebase_path(gypi_values.chrome_browser_google_sources, ".", "//chrome")
339 deps += [ "//net" ]
[email protected]dffd8a912014-06-30 23:24:31340 libs += [
341 "CoreTelephony.framework",
342 "CoreText.framework",
343 "MobileCoreServices.framework",
344 "QuartzCore.framework",
345 ]
scottmga266f952014-12-03 20:47:10346 ldflags += [
347 "-weak_framework",
348 "CoreImage",
349 ]
[email protected]dffd8a912014-06-30 23:24:31350 }
351
352 if (is_win || is_mac) {
scottmga266f952014-12-03 20:47:10353 sources +=
354 rebase_path(gypi_values.chrome_browser_win_mac_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31355 }
mmenkede134672015-08-18 01:33:39356 if (!is_win && !is_mac && !is_ios) {
357 sources += [ "net/net_error_diagnostics_dialog_generic.cc" ]
358 }
[email protected]dffd8a912014-06-30 23:24:31359 if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) {
360 sources += [
361 "net/disk_cache_dir_policy_handler.cc",
362 "net/disk_cache_dir_policy_handler.h",
363 ]
364 }
365 if (!is_android && !is_ios && enable_configuration_policy) {
366 sources += [
367 "download/download_dir_policy_handler.cc",
368 "download/download_dir_policy_handler.h",
369 ]
370 }
371 if (is_mac) {
scottmga266f952014-12-03 20:47:10372 sources +=
373 rebase_path(gypi_values.chrome_browser_mac_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31374 deps += [
brettw624c82d2015-07-23 00:31:50375 #"app_shim" TODO(GYP) bug 512600
376 #"browser_app_shim" TODO(GYP) bug 512600
[email protected]dffd8a912014-06-30 23:24:31377 ]
378 }
ki.stfu5e669f02015-09-17 07:15:19379 if (is_mac || is_android) {
380 sources += rebase_path(
381 gypi_values.chrome_browser_password_manager_mac_android_sources,
382 ".",
383 "//chrome")
384 }
[email protected]dffd8a912014-06-30 23:24:31385 if (enable_extensions) {
Brett Wilsone53895272014-09-23 23:41:46386 public_deps += [ "//chrome/browser/extensions" ]
[email protected]cc5b3be2014-08-15 23:24:52387 deps += [
[email protected]cc5b3be2014-08-15 23:24:52388 "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
thestige33aa2422014-09-22 22:16:30389 "//chrome/common/extensions/api",
390 "//chrome/common/extensions/api:api_registration",
lukasza8acc4eb2015-07-20 20:57:20391 "//components/drive:drive",
msarda4c408ff2015-04-22 14:27:56392 "//components/proximity_auth/ble",
tengs4758c082014-12-19 18:51:44393 "//components/proximity_auth/cryptauth",
oshima758abebc2014-11-06 10:55:50394 "//extensions/components/javascript_dialog_extensions_client",
thestig73f4cdc2015-01-15 01:51:06395 "//media/cast:net",
[email protected]cc5b3be2014-08-15 23:24:52396 ]
[email protected]dffd8a912014-06-30 23:24:31397 sources += rebase_path(gypi_values.chrome_browser_extensions_sources,
scottmga266f952014-12-03 20:47:10398 ".",
399 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31400 }
401 if (enable_background) {
402 sources += rebase_path(gypi_values.chrome_browser_background_sources,
scottmga266f952014-12-03 20:47:10403 ".",
404 "//chrome")
jamesr29ea2d122014-10-23 10:30:27405 if (!use_aura || is_win || is_chromeos) {
[email protected]dffd8a912014-06-30 23:24:31406 sources -= [ "background/background_mode_manager_aura.cc" ]
407 }
408 }
409 if (enable_task_manager) {
410 sources += rebase_path(gypi_values.chrome_browser_task_manager_sources,
scottmga266f952014-12-03 20:47:10411 ".",
412 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31413 }
414 if (enable_spellcheck) {
415 sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources,
scottmga266f952014-12-03 20:47:10416 ".",
417 "//chrome")
dylanking34c72442015-07-23 23:19:58418 if (!is_android) {
419 deps += [ "//third_party/hunspell" ]
420 }
[email protected]dffd8a912014-06-30 23:24:31421 }
422 if (enable_nacl) {
scottmga266f952014-12-03 20:47:10423 sources +=
424 rebase_path(gypi_values.chrome_browser_nacl_sources, ".", "//chrome")
dpranke6065cf72015-02-26 03:30:58425 deps += [ "//components/nacl:nacl_browser" ]
[email protected]dffd8a912014-06-30 23:24:31426 }
apavlove749bca2014-09-30 11:07:41427
[email protected]dffd8a912014-06-30 23:24:31428 if (enable_configuration_policy) {
scottmga266f952014-12-03 20:47:10429 sources +=
430 rebase_path(gypi_values.chrome_browser_policy_shared_with_ios_sources,
431 ".",
432 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31433 deps += [
[email protected]604828c2014-07-02 20:39:12434 "//components/policy",
[email protected]797b25042014-07-01 23:54:17435 "//components/policy/proto",
[email protected]dffd8a912014-06-30 23:24:31436 ]
437 if (!is_ios) {
scottmga266f952014-12-03 20:47:10438 sources += rebase_path(gypi_values.chrome_browser_policy_non_ios_sources,
439 ".",
440 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31441 }
442 if (!is_chromeos) {
443 sources += rebase_path(
scottmga266f952014-12-03 20:47:10444 gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources,
445 ".",
446 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31447 }
448 if (is_win || is_mac || is_desktop_linux) {
449 sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
scottmga266f952014-12-03 20:47:10450 ".",
451 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31452 }
cjhopman09981a92014-10-27 17:11:18453 if (is_android || is_ios) {
454 sources += rebase_path(gypi_values.chrome_browser_policy_mobile_sources,
scottmga266f952014-12-03 20:47:10455 ".",
456 "//chrome")
cjhopman09981a92014-10-27 17:11:18457 } else {
amistry6e1ed1b2015-03-12 05:24:01458 deps += [
459 "//chrome/browser/policy:path_parser",
460 "//net:net_browser_services",
461 ]
[email protected]dffd8a912014-06-30 23:24:31462 }
463 } else {
464 # Configuration policy disabled.
465 sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources,
scottmga266f952014-12-03 20:47:10466 ".",
467 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31468 }
469
470 if (enable_plugins) {
scottmga266f952014-12-03 20:47:10471 sources +=
472 rebase_path(gypi_values.chrome_browser_plugins_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31473 deps += [
James Robinson2ed4d692014-09-17 05:20:58474 "//components/pdf/browser",
brettwf7eb6ca2015-02-14 01:37:31475 "//ppapi/proxy:ipc",
thestig11b815e92014-08-26 00:32:14476 "//third_party/adobe/flash:flapper_version_h",
[email protected]dffd8a912014-06-30 23:24:31477 ]
478 }
479 if (safe_browsing_mode != 0) {
scottmga266f952014-12-03 20:47:10480 sources +=
stuartmorgan1b3df822014-12-08 14:36:11481 rebase_path(gypi_values.chrome_browser_safe_browsing_basic_sources,
scottmga266f952014-12-03 20:47:10482 ".",
483 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31484 deps += [
[email protected]fca567b2014-07-02 17:37:34485 "//chrome/browser/safe_browsing:chunk_proto",
mattm022138b52014-09-23 01:05:45486 "//chrome/browser/safe_browsing:metadata_proto",
[email protected]fca567b2014-07-02 17:37:34487 "//chrome/browser/safe_browsing:report_proto",
[email protected]dffd8a912014-06-30 23:24:31488 ]
489 if (safe_browsing_mode == 1) {
scottmga266f952014-12-03 20:47:10490 sources +=
stuartmorgan1b3df822014-12-08 14:36:11491 rebase_path(gypi_values.chrome_browser_safe_browsing_full_sources,
scottmga266f952014-12-03 20:47:10492 ".",
493 "//chrome")
scottmga266f952014-12-03 20:47:10494 deps += [ "//chrome/common/safe_browsing:proto" ]
grtc1d1b752015-09-05 13:26:41495 if (is_win) {
496 deps += [ "//chrome/browser/safe_browsing/incident_reporting:state_store_data_proto" ]
497 }
nparkerb2cd5ee2015-05-13 01:12:01498 } else if (safe_browsing_mode == 3) {
499 sources += rebase_path(
500 gypi_values.chrome_browser_safe_browsing_mobile_extended_sources,
501 ".",
502 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31503 }
504 }
505
amistryf269d3b2015-06-09 19:18:39506 if (enable_hotwording) {
507 defines += [ "ENABLE_HOTWORDING" ]
508 }
509
[email protected]dffd8a912014-06-30 23:24:31510 if (is_linux) {
mostynbea514682015-08-18 22:08:56511 deps += [ "//device/media_transfer_protocol" ]
[email protected]dffd8a912014-06-30 23:24:31512 }
mostynbea514682015-08-18 22:08:56513
514 if (use_udev) {
515 deps += [ "//device/udev_linux" ]
516 }
517
[email protected]dffd8a912014-06-30 23:24:31518 if (is_linux && !is_chromeos) {
[email protected]fd98b612014-07-09 22:11:47519 deps += [ "//third_party/speech-dispatcher" ]
[email protected]dffd8a912014-06-30 23:24:31520 }
521
522 if (is_chromeos) {
523 sources += rebase_path(gypi_values.chrome_browser_chromeos_sources,
scottmga266f952014-12-03 20:47:10524 ".",
525 "//chrome")
526 deps += [ "//chrome/browser/chromeos" ]
[email protected]dffd8a912014-06-30 23:24:31527 }
528
yiyaoliubcd08dc22014-12-10 05:56:10529 if (is_ios) {
530 sources -= [
531 "metrics/signin_status_metrics_provider_base.cc",
532 "metrics/signin_status_metrics_provider_base.h",
533 ]
534 }
535
mukai8c99b882014-10-15 03:07:59536 if (is_chromeos || is_ios) {
537 sources -= [
538 "metrics/signin_status_metrics_provider.cc",
539 "metrics/signin_status_metrics_provider.h",
540 ]
541 }
542
[email protected]dffd8a912014-06-30 23:24:31543 if (use_cups) {
[email protected]604828c2014-07-02 20:39:12544 configs += [ "//printing:cups" ]
[email protected]dffd8a912014-06-30 23:24:31545 }
546 if (is_desktop_linux) {
547 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources,
scottmga266f952014-12-03 20:47:10548 ".",
549 "//chrome")
cmasone0a9e4ca2014-10-16 16:40:49550 configs += [ ":gnome_keyring" ]
[email protected]dffd8a912014-06-30 23:24:31551 }
dvadym34532022015-01-22 15:42:51552 if (is_desktop_linux) {
553 sources += rebase_path(gypi_values.chrome_browser_libsecret_sources,
554 ".",
555 "//chrome")
556 defines += [ "USE_LIBSECRET" ]
557 }
[email protected]dffd8a912014-06-30 23:24:31558 if (use_aura) {
scottmga266f952014-12-03 20:47:10559 sources +=
560 rebase_path(gypi_values.chrome_browser_aura_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31561 deps += [
[email protected]fca567b2014-07-02 17:37:34562 "//ui/aura",
563 "//ui/compositor",
[email protected]604828c2014-07-02 20:39:12564 "//ui/keyboard",
[email protected]dffd8a912014-06-30 23:24:31565 ]
566 }
567 if (ui_compositor_image_transport) {
568 deps += [ "//ui/gl" ]
569 }
570
[email protected]855b7de2014-07-08 21:02:45571 if (use_ash) {
scottmga266f952014-12-03 20:47:10572 sources +=
573 rebase_path(gypi_values.chrome_browser_ash_sources, ".", "//chrome")
[email protected]855b7de2014-07-08 21:02:45574 }
575
[email protected]dffd8a912014-06-30 23:24:31576 if (use_x11) {
scottmga266f952014-12-03 20:47:10577 sources +=
578 rebase_path(gypi_values.chrome_browser_x11_sources, ".", "//chrome")
vchigrinbbc23e72015-01-21 22:49:23579 } else {
580 sources -= [ "password_manager/password_store_x.cc" ]
[email protected]dffd8a912014-06-30 23:24:31581 }
582 if (is_posix && !is_mac && !is_ios) {
583 sources += [
rseseka0a7a042014-09-18 23:59:20584 "//chrome/app/chrome_crash_reporter_client.cc",
585 "//chrome/app/chrome_crash_reporter_client.h",
[email protected]dffd8a912014-06-30 23:24:31586 ]
587 deps += [
Robert Sesekabcd8102014-08-27 16:12:44588 "//components/crash/app",
589 "//components/crash/browser",
[email protected]dffd8a912014-06-30 23:24:31590 ]
591 }
592 if (use_nss_certs) {
scottmga266f952014-12-03 20:47:10593 sources +=
594 rebase_path(gypi_values.chrome_browser_nss_sources, ".", "//chrome")
mukai8c99b882014-10-15 03:07:59595 if (is_chromeos) {
596 sources -= [ "net/nss_context_linux.cc" ]
597 }
[email protected]dffd8a912014-06-30 23:24:31598 }
599 if (enable_notifications) {
600 sources += rebase_path(gypi_values.chrome_browser_notifications_sources,
scottmga266f952014-12-03 20:47:10601 ".",
602 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31603 if (!is_android) {
604 sources += rebase_path(
stuartmorgan1b3df822014-12-08 14:36:11605 gypi_values.chrome_browser_notifications_non_android_sources,
scottmga266f952014-12-03 20:47:10606 ".",
607 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31608 }
609 }
610 if (enable_themes) {
scottmga266f952014-12-03 20:47:10611 sources +=
612 rebase_path(gypi_values.chrome_browser_themes_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31613 }
614
vitalybuka93eea402014-11-05 23:47:15615 if (enable_basic_printing || enable_print_preview) {
[email protected]dffd8a912014-06-30 23:24:31616 # Some form of printing support.
stuartmorgan1b3df822014-12-08 14:36:11617 sources += rebase_path(gypi_values.chrome_browser_printing_basic_sources,
scottmga266f952014-12-03 20:47:10618 ".",
619 "//chrome")
spang5cc72542015-08-04 19:47:11620 deps += [
621 "//printing",
brettwd649f6b2015-08-18 20:58:51622 "//components/printing/browser",
spang5cc72542015-08-04 19:47:11623 ]
624
vitalybuka36259ca2014-08-28 23:42:24625 if (is_win) {
[email protected]dffd8a912014-06-30 23:24:31626 sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources,
scottmga266f952014-12-03 20:47:10627 ".",
628 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31629 }
vitalybuka93eea402014-11-05 23:47:15630 if (enable_print_preview) {
[email protected]dffd8a912014-06-30 23:24:31631 # Full printing on top of the above.
stuartmorgan1b3df822014-12-08 14:36:11632 sources += rebase_path(gypi_values.chrome_browser_printing_full_sources,
scottmga266f952014-12-03 20:47:10633 ".",
634 "//chrome")
vitalybuka93eea402014-11-05 23:47:15635 } else {
[email protected]dffd8a912014-06-30 23:24:31636 # Partial-only printing support.
scottmga266f952014-12-03 20:47:10637 sources +=
stuartmorgan1b3df822014-12-08 14:36:11638 rebase_path(gypi_values.chrome_browser_printing_basic_only_sources,
scottmga266f952014-12-03 20:47:10639 ".",
640 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31641 }
642 }
643 if (enable_captive_portal_detection) {
644 sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources,
scottmga266f952014-12-03 20:47:10645 ".",
646 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31647 }
648 if (enable_session_service) {
649 sources += rebase_path(gypi_values.chrome_browser_session_service_sources,
scottmga266f952014-12-03 20:47:10650 ".",
651 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31652 }
653
thestigdc377202014-10-28 22:06:02654 if (!is_android && !is_ios && !is_chromeos) {
scottmga266f952014-12-03 20:47:10655 sources +=
656 rebase_path(gypi_values.chrome_browser_desktop_sources, ".", "//chrome")
thestigdc377202014-10-28 22:06:02657 }
658
[email protected]dffd8a912014-06-30 23:24:31659 if (is_android || is_ios) {
660 # Mobile.
scottmga266f952014-12-03 20:47:10661 sources +=
662 rebase_path(gypi_values.chrome_browser_mobile_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31663 } else {
664 # Non-mobile.
665 sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
scottmga266f952014-12-03 20:47:10666 ".",
667 "//chrome")
reillyge471fab2014-08-29 01:58:43668 deps += [
sdefresnebbf563c2015-03-17 11:09:09669 "//components/feedback",
juncai1b1152562015-09-04 02:36:08670 "//components/webusb",
reillyge471fab2014-08-29 01:58:43671 "//device/core",
rockot50dc5692015-07-08 01:57:26672 "//device/devices_app/public/cpp",
673 "//device/devices_app/public/cpp:factory",
reillygd77718d2014-09-04 00:57:56674 "//device/usb",
reillyge471fab2014-08-29 01:58:43675 ]
[email protected]dffd8a912014-06-30 23:24:31676 }
677
fserb1c2db4c2015-07-16 17:14:49678 if (!is_official_build) {
679 sources += [
680 "search/local_files_ntp_source.cc",
681 "search/local_files_ntp_source.h",
682 ]
683 }
684
[email protected]dffd8a912014-06-30 23:24:31685 if (is_android) {
scottmga266f952014-12-03 20:47:10686 sources +=
687 rebase_path(gypi_values.chrome_browser_android_sources, ".", "//chrome")
twellingtoncaf0eb752015-06-01 16:19:50688 sources += rebase_path(gypi_values.chrome_browser_bookmark_android_sources,
689 ".",
690 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31691 deps += [
pkotwicz127726f2015-05-29 15:20:12692 ":client_discourse_context_proto",
693 ":delta_file_proto",
James Robinson2ed4d692014-09-17 05:20:58694 ":jni_headers",
[email protected]55699f392014-08-20 22:16:30695 "//components/cdm/browser",
cjhopman09981a92014-10-27 17:11:18696 "//components/enhanced_bookmarks",
twifkak8c9f7502015-06-25 02:12:57697 "//components/precache/content",
698 "//components/precache/core",
estadee37f8222014-11-07 21:35:22699 "//components/resources:components_resources",
mathiash3ecfdfa2015-04-13 15:06:07700 "//components/service_tab_launcher",
blundell11d93bc2015-07-31 12:33:12701 "//components/toolbar",
cjhopman09981a92014-10-27 17:11:18702 "//components/web_contents_delegate_android",
703 "//third_party/android_opengl/etc1",
fdegans34f31e272015-05-22 16:59:03704 "//third_party/android_tools:cpu_features",
twellington0bc61492015-01-30 20:14:13705 "//third_party/libaddressinput:util",
[email protected]dffd8a912014-06-30 23:24:31706 ]
707 deps -= [
[email protected]fca567b2014-07-02 17:37:34708 "//third_party/libaddressinput",
[email protected]abd4b682014-07-16 20:26:30709 "//components/storage_monitor",
[email protected]abd4b682014-07-16 20:26:30710 "//components/web_modal",
[email protected]dffd8a912014-06-30 23:24:31711 ]
megjablon5effca2e2015-02-13 23:54:07712 defines += [ "ENABLE_DATA_REDUCTION_PROXY_DEBUGGING" ]
rseseke59ea892015-03-19 22:27:44713
714 if (use_seccomp_bpf) {
715 defines += [ "USE_SECCOMP_BPF" ]
rsesek65d31352015-06-08 22:53:44716 deps += [ "//sandbox/linux:seccomp_bpf" ]
rseseke59ea892015-03-19 22:27:44717 }
[email protected]dffd8a912014-06-30 23:24:31718 }
719
720 if (is_mac) {
721 deps += [
[email protected]6b5d2f92014-07-30 00:40:03722 "//third_party/google_toolbox_for_mac",
tfarina22896302015-02-23 21:18:03723 "//third_party/mozilla",
[email protected]dffd8a912014-06-30 23:24:31724 ]
725 libs += [
726 "Accelerate.framework",
727 "AddressBook.framework",
728 "AudioUnit.framework",
729 "DiskArbitration.framework",
730 "IOKit.framework",
731 "ImageCaptureCore.framework",
732 "OpenGL.framework",
733 "QuartzCore.framework",
734 "SecurityInterface.framework",
735 ]
736 }
737
738 if (enable_rlz) {
sdefresned967d552015-07-16 08:34:35739 deps += [ ":rlz" ]
[email protected]dffd8a912014-06-30 23:24:31740 }
741
742 # TODO(GYP)
743 # Temporary fix to break the browser target into smaller chunks so it
744 # will link with goma builds.
745 #["OS=="win" and chromium_win_pch==0", {
746 # "msvs_shard": 4,
747 #}],
748
749 if (is_win) {
scottmga266f952014-12-03 20:47:10750 sources +=
751 rebase_path(gypi_values.chrome_browser_win_sources, ".", "//chrome")
Brett Wilsone53895272014-09-23 23:41:46752 public_deps += [
753 "//ui/views",
754 "//ui/views/controls/webview",
755 ]
[email protected]dffd8a912014-06-30 23:24:31756 deps += [
vchigrin9593e7a2015-01-27 10:08:19757 ":chrome_process_finder",
[email protected]55699f392014-08-20 22:16:30758 "//chrome:version_header",
759 "//chrome/installer/util:strings",
vchigrinf2b90aa2015-01-23 11:12:19760 "//chrome_elf",
761 "//chrome_elf:constants",
762 "//chrome_elf:dll_hash",
vchigrin61944ae2015-01-30 23:51:32763 "//components/browser_watcher",
764 "//components/browser_watcher:browser_watcher_client",
vchigrinbbc23e72015-01-21 22:49:23765 "//google_update",
[email protected]55699f392014-08-20 22:16:30766 "//third_party/iaccessible2",
767 "//third_party/isimpledom",
[email protected]dffd8a912014-06-30 23:24:31768 "//third_party/wtl",
vchigrin88ed6f42015-01-17 11:56:42769 "//ui/metro_viewer",
770 "//win8:metro_viewer",
[email protected]dffd8a912014-06-30 23:24:31771 ]
mmenkede134672015-08-18 01:33:39772
773 all_dependent_configs = [ ":browser_win_linker_flags" ]
774
grt235b3f092015-05-27 21:42:48775 if (!is_chrome_branded) {
776 deps -= [ "//google_update" ]
777 sources -= [
778 "google/did_run_updater_win.cc",
779 "google/did_run_updater_win.h",
780 "google/google_update_win.cc",
781 "google/google_update_win.h",
782 ]
783 }
[email protected]dffd8a912014-06-30 23:24:31784 } else {
785 # Non-Windows.
scottmga266f952014-12-03 20:47:10786 sources +=
787 rebase_path(gypi_values.chrome_browser_non_win_sources, ".", "//chrome")
[email protected]f6dc4ae2014-07-30 00:10:37788 if (toolkit_views) {
[email protected]dffd8a912014-06-30 23:24:31789 deps += [
scottmga266f952014-12-03 20:47:10790 "//ui/views",
791 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31792 ]
[email protected]dffd8a912014-06-30 23:24:31793 }
794 }
795
796 if (is_linux) {
scottmga266f952014-12-03 20:47:10797 sources +=
798 rebase_path(gypi_values.chrome_browser_linux_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31799 if (use_aura) {
800 configs += [
801 "//build/config/linux:dbus",
802 "//build/config/linux:fontconfig",
803 ]
scottmga266f952014-12-03 20:47:10804 deps += [ "//dbus" ]
[email protected]dffd8a912014-06-30 23:24:31805 }
806 if (use_x11) {
807 configs += [ "//build/config/linux:x11" ]
808 deps += [ "//ui/gfx/x" ]
809 }
810 }
811
812 if (is_desktop_linux) {
stuartmorgan7f569a822014-12-08 20:10:54813 sources += rebase_path(gypi_values.chrome_browser_linux_desktop_sources,
scottmga266f952014-12-03 20:47:10814 ".",
815 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31816 }
817 if (enable_plugin_installation) {
scottmga266f952014-12-03 20:47:10818 sources +=
819 rebase_path(gypi_values.chrome_browser_plugin_installation_sources,
820 ".",
821 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31822 }
823 if (enable_app_list) {
scottmga266f952014-12-03 20:47:10824 deps += [ "//ui/app_list" ]
[email protected]dffd8a912014-06-30 23:24:31825 }
treib87bb89cbb2014-12-01 16:01:47826 if (enable_supervised_users) {
scottmga266f952014-12-03 20:47:10827 sources += rebase_path(gypi_values.chrome_browser_supervised_user_sources,
828 ".",
829 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31830 }
bauerb7f3b8542015-06-29 19:56:19831 if (enable_supervised_users && !is_android && !is_ios) {
832 sources +=
833 rebase_path(gypi_values.chrome_browser_supervised_user_legacy_sources,
834 ".",
835 "//chrome")
836 }
treib87bb89cbb2014-12-01 16:01:47837 if (enable_supervised_users && enable_themes) {
thestig169a6362014-11-13 20:47:59838 sources += rebase_path(
scottmga266f952014-12-03 20:47:10839 gypi_values.chrome_browser_supervised_user_and_themes_sources,
840 ".",
841 "//chrome")
thestig169a6362014-11-13 20:47:59842 }
[email protected]dffd8a912014-06-30 23:24:31843 if (enable_webrtc) {
scottmga266f952014-12-03 20:47:10844 sources +=
845 rebase_path(gypi_values.chrome_browser_webrtc_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31846 }
847 if (enable_service_discovery) {
scottmga266f952014-12-03 20:47:10848 sources += rebase_path(gypi_values.chrome_browser_service_discovery_sources,
849 ".",
850 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31851 }
852 if (enable_mdns) {
scottmga266f952014-12-03 20:47:10853 sources +=
854 rebase_path(gypi_values.chrome_browser_mdns_sources, ".", "//chrome")
[email protected]dffd8a912014-06-30 23:24:31855 }
856 if (!enable_autofill_dialog || is_android || is_ios) {
857 sources -= [
858 "autofill/validation_rules_storage_factory.cc",
859 "autofill/validation_rules_storage_factory.h",
860 ]
861 }
862 if (enable_wifi_bootstrapping) {
scottmga266f952014-12-03 20:47:10863 sources +=
864 rebase_path(gypi_values.chrome_browser_wifi_bootstrapping_sources,
865 ".",
866 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31867 if (is_win || is_mac) {
868 # TODO(brettw) as of this writing wifi bootstrapping is set on Windows
869 # and Mac, so this test is meaningless. Can we merge these lists?
870 sources += rebase_path(
stuartmorgan1b3df822014-12-08 14:36:11871 gypi_values.chrome_browser_wifi_bootstrapping_win_mac_sources,
scottmga266f952014-12-03 20:47:10872 ".",
873 "//chrome")
[email protected]dffd8a912014-06-30 23:24:31874 }
875 }
mfoltz150bb8b2015-04-09 22:30:05876 if (enable_media_router) {
imchengb6b09239f2015-05-15 21:41:55877 deps += [ "//chrome/browser/media/router" ]
mfoltz150bb8b2015-04-09 22:30:05878 }
[email protected]dffd8a912014-06-30 23:24:31879}
880
James Robinson2ed4d692014-09-17 05:20:58881if (is_android) {
882 # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers
883 generate_jni("jni_headers") {
scottmga266f952014-12-03 20:47:10884 sources =
885 rebase_path(gypi_values.chrome_browser_jni_sources, ".", "//chrome")
James Robinson2ed4d692014-09-17 05:20:58886 jni_package = "chrome"
887 }
pkotwicz127726f2015-05-29 15:20:12888
889 #GYP: '//chrome/chrome_browser.gypi:client_discourse_context_proto'
890 proto_library("client_discourse_context_proto") {
891 sources = [
892 "android/proto/client_discourse_context.proto",
893 ]
894 }
895
896 #GYP: '//chrome/chrome_browser.gypi:delta_file_proto'
897 proto_library("delta_file_proto") {
898 sources = [
899 "android/proto/delta_file.proto",
900 ]
901 }
James Robinson2ed4d692014-09-17 05:20:58902}
903
vchigrin9593e7a2015-01-27 10:08:19904if (is_win) {
905 source_set("chrome_process_finder") {
906 sources = [
907 "chrome_process_finder_win.cc",
908 "chrome_process_finder_win.h",
909 ]
910 deps = [
911 "//base",
912 "//chrome/browser/metro_utils",
913 "//chrome/common:constants",
914 ]
915 if (enable_configuration_policy) {
916 deps += [ "//chrome/browser/policy:path_parser" ]
917 }
918 }
919}
920
[email protected]77ce8022014-06-16 19:29:56921# GYP version: chrome/chrome_resources.gyp:chrome_resources
922# (generate_browser_resources action)
923grit("resources") {
924 source = "browser_resources.grd"
[email protected]48885492014-08-13 11:22:41925 output_dir = "$root_gen_dir/chrome"
[email protected]cb0c67a2014-07-22 16:37:26926 outputs = [
927 "grit/browser_resources.h",
928 "browser_resources.pak",
929 ]
[email protected]77ce8022014-06-16 19:29:56930
scottmga266f952014-12-03 20:47:10931 omnibox_mojom_file =
932 "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js"
[email protected]77ce8022014-06-16 19:29:56933
934 grit_flags = [
scottmga266f952014-12-03 20:47:10935 "-E",
936 "about_credits_file=" + rebase_path(about_credits_file, root_build_dir),
937 "-E",
938 "additional_modules_list_file=" +
939 rebase_path(additional_modules_list_file, root_build_dir),
940 "-E",
941 "omnibox_mojom_file=" + rebase_path(omnibox_mojom_file, root_build_dir),
[email protected]77ce8022014-06-16 19:29:56942 ]
943
944 deps = [
945 ":about_credits",
946 ":chrome_internal_resources_gen",
brettwde262b02015-05-27 19:41:42947
948 # Depend only on the generated mojo bindings since we read the .mojom.js
949 # file, rather than the whole mojo target which will link the C++ bindings.
950 "//chrome/browser/ui/webui/omnibox:mojo_bindings__generator",
vchigrin8eede942015-01-29 09:28:15951 ]
952 inputs = [
953 omnibox_mojom_file,
[email protected]77ce8022014-06-16 19:29:56954 ]
955}
956
957# GYP version: chrome/chrome_resource.gyp:about_credits
958action("about_credits") {
959 script = "//tools/licenses.py"
960
dbeamc7776c72014-12-17 02:24:05961 inputs = [
962 # This is not a complete list. TODO(phajdan.jr, dbeam): licenses.py needs to
963 # generate a .d file with all the licenses/credits that about:credits uses.
964 # Then about:credits will automatically rebuild when one of them changes.
965 # See: depfile in gn's documentation (gn help depfile).
966 "resources/about_credits.tmpl",
967 "resources/about_credits_entry.tmpl",
968 ]
969
scottmga266f952014-12-03 20:47:10970 outputs = [
971 about_credits_file,
972 ]
[email protected]77ce8022014-06-16 19:29:56973
974 args = [
975 "credits",
976 rebase_path(about_credits_file, root_build_dir),
977 ]
978}
979
980# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
engedy99d0e11b2014-09-30 13:32:41981if (is_chrome_branded) {
[email protected]77ce8022014-06-16 19:29:56982 action("chrome_internal_resources_gen") {
engedy99d0e11b2014-09-30 13:32:41983 script = "internal/transform_additional_modules_list.py"
scottmga266f952014-12-03 20:47:10984 sources = [
985 "internal/resources/additional_modules_list.input",
986 ]
987 outputs = [
988 additional_modules_list_file,
989 ]
engedy99d0e11b2014-09-30 13:32:41990 args = rebase_path(sources, root_build_dir) +
991 rebase_path(outputs, root_build_dir)
[email protected]77ce8022014-06-16 19:29:56992 }
993} else {
994 group("chrome_internal_resources_gen") {
995 # Empty placeholder.
996 }
997}
Brett Wilson052ce132014-09-12 19:46:29998
999# In GYP this is part of test_support_common.
1000source_set("test_support") {
1001 testonly = true
1002
1003 # Always include this via the main test support target.
1004 visibility = [ "//chrome/test:test_support" ]
1005
1006 sources = [
1007 "browsing_data/mock_browsing_data_appcache_helper.cc",
1008 "browsing_data/mock_browsing_data_appcache_helper.h",
jsbelle1fe9692015-08-22 01:02:421009 "browsing_data/mock_browsing_data_cache_storage_helper.cc",
1010 "browsing_data/mock_browsing_data_cache_storage_helper.h",
Brett Wilson052ce132014-09-12 19:46:291011 "browsing_data/mock_browsing_data_channel_id_helper.cc",
1012 "browsing_data/mock_browsing_data_channel_id_helper.h",
1013 "browsing_data/mock_browsing_data_cookie_helper.cc",
1014 "browsing_data/mock_browsing_data_cookie_helper.h",
1015 "browsing_data/mock_browsing_data_database_helper.cc",
1016 "browsing_data/mock_browsing_data_database_helper.h",
1017 "browsing_data/mock_browsing_data_file_system_helper.cc",
1018 "browsing_data/mock_browsing_data_file_system_helper.h",
1019 "browsing_data/mock_browsing_data_flash_lso_helper.cc",
1020 "browsing_data/mock_browsing_data_flash_lso_helper.h",
1021 "browsing_data/mock_browsing_data_indexed_db_helper.cc",
1022 "browsing_data/mock_browsing_data_indexed_db_helper.h",
1023 "browsing_data/mock_browsing_data_local_storage_helper.cc",
1024 "browsing_data/mock_browsing_data_local_storage_helper.h",
1025 "browsing_data/mock_browsing_data_quota_helper.cc",
1026 "browsing_data/mock_browsing_data_quota_helper.h",
1027 "browsing_data/mock_browsing_data_service_worker_helper.cc",
1028 "browsing_data/mock_browsing_data_service_worker_helper.h",
1029 "download/download_test_file_activity_observer.cc",
1030 "download/download_test_file_activity_observer.h",
1031 "download/test_download_shelf.cc",
1032 "download/test_download_shelf.h",
Brett Wilson052ce132014-09-12 19:46:291033 "invalidation/fake_invalidation_service.cc",
1034 "invalidation/fake_invalidation_service.h",
1035 "media/fake_desktop_media_list.cc",
1036 "media/fake_desktop_media_list.h",
1037 "net/dns_probe_test_util.cc",
1038 "net/dns_probe_test_util.h",
1039 "net/url_request_mock_util.cc",
1040 "net/url_request_mock_util.h",
1041 "notifications/notification_test_util.cc",
1042 "notifications/notification_test_util.h",
1043 "password_manager/mock_password_store_service.cc",
1044 "password_manager/mock_password_store_service.h",
1045 "password_manager/null_password_store_service.cc",
1046 "password_manager/null_password_store_service.h",
gcasto686493e72015-07-08 23:53:481047 "password_manager/password_manager_test_base.cc",
1048 "password_manager/password_manager_test_base.h",
Brett Wilson052ce132014-09-12 19:46:291049 "password_manager/test_password_store_service.cc",
1050 "password_manager/test_password_store_service.h",
Brett Wilson052ce132014-09-12 19:46:291051 "profile_resetter/profile_resetter_test_base.cc",
1052 "profile_resetter/profile_resetter_test_base.h",
1053 "search_engines/template_url_service_factory_test_util.cc",
1054 "search_engines/template_url_service_factory_test_util.h",
1055 "search_engines/template_url_service_test_util.cc",
1056 "search_engines/template_url_service_test_util.h",
squef7d723a2015-01-26 22:13:451057 "sessions/session_restore_test_helper.cc",
1058 "sessions/session_restore_test_helper.h",
Brett Wilson052ce132014-09-12 19:46:291059 "sessions/session_service_test_helper.cc",
1060 "sessions/session_service_test_helper.h",
knn523bd722015-07-30 16:27:091061 "signin/fake_account_fetcher_service_builder.cc",
1062 "signin/fake_account_fetcher_service_builder.h",
mlerman2933d012015-04-24 18:34:271063 "signin/fake_gaia_cookie_manager_service.cc",
1064 "signin/fake_gaia_cookie_manager_service.h",
Brett Wilson052ce132014-09-12 19:46:291065 "signin/fake_profile_oauth2_token_service_builder.cc",
1066 "signin/fake_profile_oauth2_token_service_builder.h",
droger4f489e62015-07-24 19:27:591067 "signin/fake_signin_manager_builder.cc",
1068 "signin/fake_signin_manager_builder.h",
Brett Wilson052ce132014-09-12 19:46:291069 "ssl/ssl_client_auth_requestor_mock.cc",
1070 "ssl/ssl_client_auth_requestor_mock.h",
Brett Wilson052ce132014-09-12 19:46:291071 "sync/profile_sync_components_factory_mock.cc",
1072 "sync/profile_sync_components_factory_mock.h",
1073 "sync/profile_sync_service_mock.cc",
1074 "sync/profile_sync_service_mock.h",
shadi2f257fc2014-12-03 18:04:121075 "ui/webui/signin/login_ui_test_utils.cc",
1076 "ui/webui/signin/login_ui_test_utils.h",
Brett Wilson052ce132014-09-12 19:46:291077 ]
1078
brettwbc8b2a22015-07-28 18:24:421079 configs += [ "//build/config:precompiled_headers" ]
1080
Brett Wilsone53895272014-09-23 23:41:461081 public_deps = [
Brett Wilson052ce132014-09-12 19:46:291082 ":browser",
Brett Wilsone53895272014-09-23 23:41:461083 "//chrome/browser/ui:test_support",
1084 ]
1085 deps = [
Brett Wilson052ce132014-09-12 19:46:291086 "//base:prefs_test_support",
1087 "//chrome/browser",
Brett Wilson052ce132014-09-12 19:46:291088 "//chrome/common",
1089 "//chrome/common/safe_browsing:proto",
knn062cdbb2015-06-26 18:18:421090 "//components/invalidation/impl",
1091 "//components/invalidation/impl:test_support",
Brett Wilson052ce132014-09-12 19:46:291092 "//components/password_manager/core/browser:test_support",
1093 "//components/search_engines:test_support",
sdefresne875d0782015-09-16 12:01:281094 "//components/syncable_prefs:test_support",
jitendra.ks94c0b962015-08-10 08:24:091095 "//components/user_prefs/tracked:user_prefs_tracked_test_support",
Brett Wilson052ce132014-09-12 19:46:291096 "//content/test:test_support",
1097 "//chrome/app/theme:theme_resources",
1098 "//net:test_support",
1099 "//skia",
1100 "//testing/gmock",
1101 "//testing/gtest",
1102 "//ui/gfx",
1103 ]
1104
Brett Wilson052ce132014-09-12 19:46:291105 if (!is_ios) {
1106 deps += [
1107 "//components/sessions:test_support",
Brett Wilson052ce132014-09-12 19:46:291108 "//google_apis:test_support",
1109 ]
1110 }
1111
James Robinson2ed4d692014-09-17 05:20:581112 if (enable_extensions) {
thestig52a87b3b2014-10-23 22:02:381113 sources += [
1114 "extensions/extension_action_test_util.cc",
1115 "extensions/extension_action_test_util.h",
1116 ]
scottmga266f952014-12-03 20:47:101117 deps += [ "//extensions:test_support" ]
James Robinson2ed4d692014-09-17 05:20:581118 }
1119
Brett Wilson052ce132014-09-12 19:46:291120 if (is_chromeos) {
1121 sources += [
1122 "chromeos/app_mode/fake_cws.cc",
1123 "chromeos/app_mode/fake_cws.h",
1124 "chromeos/file_manager/fake_disk_mount_manager.cc",
1125 "chromeos/file_manager/fake_disk_mount_manager.h",
1126 "chromeos/input_method/mock_candidate_window_controller.cc",
1127 "chromeos/input_method/mock_candidate_window_controller.h",
1128 "chromeos/input_method/mock_input_method_engine.cc",
1129 "chromeos/input_method/mock_input_method_engine.h",
1130 "chromeos/input_method/mock_input_method_manager.cc",
1131 "chromeos/input_method/mock_input_method_manager.h",
brettw7d6ec2462015-01-07 13:00:511132 "chromeos/login/screens/mock_device_disabled_screen_actor.cc",
1133 "chromeos/login/screens/mock_device_disabled_screen_actor.h",
nkostylev393309f2015-02-05 13:57:391134 "chromeos/login/session/user_session_manager_test_api.cc",
1135 "chromeos/login/session/user_session_manager_test_api.h",
Brett Wilson052ce132014-09-12 19:46:291136 "chromeos/login/test/js_checker.cc",
1137 "chromeos/login/test/js_checker.h",
satoruxb7a72ea2015-02-13 07:19:591138 "chromeos/login/test/oobe_screen_waiter.cc",
1139 "chromeos/login/test/oobe_screen_waiter.h",
Brett Wilson052ce132014-09-12 19:46:291140 "chromeos/login/ui/mock_login_display.cc",
1141 "chromeos/login/ui/mock_login_display.h",
1142 "chromeos/login/ui/mock_login_display_host.cc",
1143 "chromeos/login/ui/mock_login_display_host.h",
brettw7d6ec2462015-01-07 13:00:511144 "chromeos/login/users/avatar/mock_user_image_manager.cc",
1145 "chromeos/login/users/avatar/mock_user_image_manager.h",
merkulova793f3022015-02-04 10:18:301146 "chromeos/login/users/fake_chrome_user_manager.cc",
1147 "chromeos/login/users/fake_chrome_user_manager.h",
brettw7d6ec2462015-01-07 13:00:511148 "chromeos/login/users/fake_supervised_user_manager.cc",
1149 "chromeos/login/users/fake_supervised_user_manager.h",
brettw7d6ec2462015-01-07 13:00:511150 "chromeos/login/users/mock_user_manager.cc",
1151 "chromeos/login/users/mock_user_manager.h",
Brett Wilson052ce132014-09-12 19:46:291152 "chromeos/net/network_portal_detector_test_utils.cc",
1153 "chromeos/net/network_portal_detector_test_utils.h",
1154 "chromeos/policy/cloud_external_data_manager_base_test_util.cc",
1155 "chromeos/policy/cloud_external_data_manager_base_test_util.h",
1156 "chromeos/policy/device_policy_builder.cc",
1157 "chromeos/policy/device_policy_builder.h",
brettwa68ea2b2015-02-01 02:54:071158 "chromeos/policy/fake_consumer_management_service.cc",
1159 "chromeos/policy/fake_consumer_management_service.h",
Brett Wilson052ce132014-09-12 19:46:291160 "chromeos/policy/fake_device_cloud_policy_initializer.cc",
1161 "chromeos/policy/fake_device_cloud_policy_initializer.h",
brettwa68ea2b2015-02-01 02:54:071162 "chromeos/policy/fake_device_cloud_policy_manager.cc",
1163 "chromeos/policy/fake_device_cloud_policy_manager.h",
Brett Wilson052ce132014-09-12 19:46:291164 "chromeos/policy/stub_enterprise_install_attributes.cc",
1165 "chromeos/policy/stub_enterprise_install_attributes.h",
1166 "chromeos/settings/device_settings_test_helper.cc",
1167 "chromeos/settings/device_settings_test_helper.h",
1168 "chromeos/system/fake_input_device_settings.cc",
1169 "chromeos/system/fake_input_device_settings.h",
1170 ]
1171 configs += [ "//build/config/linux:dbus" ]
mukai6ba73552014-10-09 19:05:171172 deps += [ "//chromeos:test_support" ]
Brett Wilson052ce132014-09-12 19:46:291173 }
1174
1175 if (enable_configuration_policy) {
1176 sources += [
1177 "policy/test/local_policy_test_server.cc",
1178 "policy/test/local_policy_test_server.h",
1179 ]
Brett Wilsone53895272014-09-23 23:41:461180 public_deps += [
Brett Wilson052ce132014-09-12 19:46:291181 "//components/policy:policy_component_test_support",
1182 "//components/policy:test_support",
1183 ]
Brett Wilson052ce132014-09-12 19:46:291184 }
1185
1186 if (safe_browsing_mode == 1) {
1187 sources += [
1188 "extensions/fake_safe_browsing_database_manager.cc",
1189 "extensions/fake_safe_browsing_database_manager.h",
1190 ]
1191 }
1192
1193 if (enable_extensions) {
1194 sources += [
Brett Wilson052ce132014-09-12 19:46:291195 "extensions/api/messaging/native_messaging_test_util.cc",
1196 "extensions/api/messaging/native_messaging_test_util.h",
1197 "extensions/extension_notification_observer.cc",
1198 "extensions/extension_notification_observer.h",
Brett Wilson052ce132014-09-12 19:46:291199 "extensions/mock_extension_special_storage_policy.cc",
1200 "extensions/mock_extension_special_storage_policy.h",
1201 "extensions/test_blacklist.cc",
1202 "extensions/test_blacklist.h",
1203 "extensions/test_blacklist_state_fetcher.cc",
1204 "extensions/test_blacklist_state_fetcher.h",
brettw7d6ec2462015-01-07 13:00:511205 "extensions/test_extension_dir.cc",
1206 "extensions/test_extension_dir.h",
satoruxb7a72ea2015-02-13 07:19:591207 "extensions/test_extension_environment.cc",
1208 "extensions/test_extension_environment.h",
Brett Wilson052ce132014-09-12 19:46:291209 "extensions/test_extension_prefs.cc",
1210 "extensions/test_extension_prefs.h",
1211 "extensions/test_extension_service.cc",
1212 "extensions/test_extension_service.h",
1213 "extensions/test_extension_system.cc",
1214 "extensions/test_extension_system.h",
1215 "media_galleries/media_galleries_test_util.cc",
1216 "media_galleries/media_galleries_test_util.h",
1217 ]
lukasza8acc4eb2015-07-20 20:57:201218 deps += [
1219 "//components/drive:test_support",
1220 "//components/storage_monitor:test_support",
1221 ]
Brett Wilson052ce132014-09-12 19:46:291222 }
1223
1224 if (enable_mdns) {
1225 sources += [
1226 "local_discovery/test_service_discovery_client.cc",
1227 "local_discovery/test_service_discovery_client.h",
1228 ]
1229 }
1230
1231 if (enable_app_list) {
1232 sources += [
1233 "ui/app_list/test/chrome_app_list_test_support.cc",
1234 "ui/app_list/test/chrome_app_list_test_support.h",
brettw7d6ec2462015-01-07 13:00:511235 "ui/app_list/test/test_app_list_controller_delegate.cc",
1236 "ui/app_list/test/test_app_list_controller_delegate.h",
Brett Wilson052ce132014-09-12 19:46:291237 ]
1238 }
1239
1240 if (enable_wifi_bootstrapping) {
1241 sources += [
1242 "local_discovery/wifi/mock_wifi_manager.cc",
1243 "local_discovery/wifi/mock_wifi_manager.h",
1244 ]
1245 }
1246}
sdefresned967d552015-07-16 08:34:351247
1248if (enable_rlz_support) {
1249 source_set("rlz") {
1250 sources =
1251 rebase_path(gypi_values.chrome_browser_rlz_sources, ".", "//chrome")
1252 deps = [
1253 "//components/google/core/browser",
1254 "//components/omnibox/browser",
1255 "//components/rlz",
1256 "//components/search_engines",
1257 "//rlz:rlz_lib",
1258 ]
1259 }
1260}