blob: b0109bb7fdcf1d4da5c1eed781c6ccdd594193dd [file] [log] [blame]
[email protected]77ce8022014-06-16 19:29:561# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]dffd8a912014-06-30 23:24:315import("//build/config/crypto.gni")
6import("//build/config/features.gni")
7import("//build/config/ui.gni")
[email protected]449ceab2014-07-29 22:43:518import("//components/nacl/nacl_defines.gni")
James Robinson2ed4d692014-09-17 05:20:589# //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which
10# produces a conflict for the "grit" template so we have to only include one.
11if (is_android) {
12 import("//build/config/android/rules.gni")
13} else {
14 import("//tools/grit/grit_rule.gni")
15}
[email protected]77ce8022014-06-16 19:29:5616
17about_credits_file = "$target_gen_dir/about_credits.html"
18additional_modules_list_file =
19 "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"
20
[email protected]797b25042014-07-01 23:54:1721gypi_values = exec_script(
22 "//build/gypi_to_gn.py",
23 [ rebase_path("../chrome_browser.gypi") ],
24 "scope",
25 [ "../chrome_browser.gypi" ])
[email protected]dffd8a912014-06-30 23:24:3126
27static_library("browser") {
apavlove749bca2014-09-30 11:07:4128 configs += [
29 "//build/config/compiler:wexit_time_destructors",
30 "//third_party/WebKit/public:debug_devtools",
31 ]
[email protected]dffd8a912014-06-30 23:24:3132 defines = []
33 sources = []
34 libs = []
35 ldflags = []
36
37 # iOS/non-iOS shared deps. New dependencies should generally be added in the
38 # non-iOS deps below.
Brett Wilsone53895272014-09-23 23:41:4639 public_deps = [
40 "//components/autofill/core/browser",
41 "//content/public/browser",
42 "//sql",
43 "//sync",
44 ]
[email protected]dffd8a912014-06-30 23:24:3145 deps = [
46 "//base/allocator",
47 "//chrome:extra_resources",
48 "//chrome:resources",
49 "//chrome:strings",
[email protected]797b25042014-07-01 23:54:1750 "//chrome/app:generated_resources_map",
[email protected]855b7de2014-07-08 21:02:4551 "//chrome/app/resources:platform_locale_settings",
[email protected]797b25042014-07-01 23:54:1752 "//chrome/app/theme:theme_resources",
[email protected]855b7de2014-07-08 21:02:4553 "//chrome/browser/history:in_memory_url_index_cache_proto",
[email protected]855b7de2014-07-08 21:02:4554 "//chrome/browser/net:cert_logger_proto",
[email protected]797b25042014-07-01 23:54:1755 "//chrome/browser/net:probe_message_proto",
[email protected]abd4b682014-07-16 20:26:3056 "//chrome/browser/ui",
[email protected]dffd8a912014-06-30 23:24:3157 "//chrome/common",
58 "//chrome/common/net",
[email protected]604828c2014-07-02 20:39:1259 "//components/autofill/core/browser",
Brett Wilson1c693992014-08-25 19:10:0160 "//components/bookmarks/browser",
[email protected]b9f4c682014-07-10 22:00:3761 "//components/captive_portal",
[email protected]fca567b2014-07-02 17:37:3462 "//components/cloud_devices/common",
Brett Wilson1c693992014-08-25 19:10:0163 "//components/component_updater",
vasiliiac461392014-09-18 11:35:1764 "//components/content_settings/core/browser",
[email protected]08f71012014-07-25 10:27:5465 "//components/content_settings/core/common",
[email protected]478ed232014-08-19 02:10:5566 "//components/crx_file",
megjablon3476e042014-10-14 19:21:5967 "//components/data_reduction_proxy/core/browser",
[email protected]273ae5ab2014-07-09 21:10:2568 "//components/domain_reliability",
noyaudaaac3a2014-10-08 11:11:1169 "//components/enhanced_bookmarks",
[email protected]273ae5ab2014-07-09 21:10:2570 "//components/favicon_base",
71 "//components/favicon/core",
[email protected]abd4b682014-07-16 20:26:3072 "//components/feedback",
73 "//components/gcm_driver",
Brett Wilson1c693992014-08-25 19:10:0174 "//components/google/core/browser",
[email protected]273ae5ab2014-07-09 21:10:2575 "//components/history/core/browser",
76 "//components/history/core/common",
Brett Wilson1c693992014-08-25 19:10:0177 "//components/infobars/core",
78 "//components/invalidation",
gunsch1afc65172014-09-16 00:03:3279 "//components/metrics:gpu",
[email protected]fca567b2014-07-02 17:37:3480 "//components/metrics:net",
gunsch840bc412014-09-18 19:38:0681 "//components/metrics:profiler",
Brett Wilson1c693992014-08-25 19:10:0182 "//components/metrics/proto:proto",
[email protected]fca567b2014-07-02 17:37:3483 "//components/navigation_metrics",
Brett Wilson1c693992014-08-25 19:10:0184 "//components/network_time",
85 "//components/omaha_query_params",
[email protected]b1c5ab682014-08-07 11:53:1786 "//components/omnibox",
[email protected]fca567b2014-07-02 17:37:3487 "//components/os_crypt",
Brett Wilson1c693992014-08-25 19:10:0188 "//components/password_manager/core/browser",
89 "//components/password_manager/core/common",
[email protected]fca567b2014-07-02 17:37:3490 "//components/policy:policy_component",
Brett Wilson1c693992014-08-25 19:10:0191 "//components/precache/core",
[email protected]fca567b2014-07-02 17:37:3492 "//components/query_parser",
[email protected]b9f4c682014-07-10 22:00:3793 "//components/rappor",
Brett Wilson1c693992014-08-25 19:10:0194 "//components/renderer_context_menu",
[email protected]720b10492014-07-23 08:48:4095 "//components/search",
Brett Wilson1c693992014-08-25 19:10:0196 "//components/search_engines",
97 "//components/search_provider_logos",
[email protected]abd4b682014-07-16 20:26:3098 "//components/signin/core/browser",
99 "//components/startup_metric_utils",
[email protected]797b25042014-07-01 23:54:17100 "//components/strings",
mathp60143a32014-10-08 14:52:45101 "//components/suggestions",
Brett Wilson1c693992014-08-25 19:10:01102 "//components/sync_driver",
[email protected]b9f4c682014-07-10 22:00:37103 "//components/translate/core/browser",
104 "//components/translate/core/common",
[email protected]273ae5ab2014-07-09 21:10:25105 "//components/url_fixer",
[email protected]fca567b2014-07-02 17:37:34106 "//components/user_prefs",
[email protected]bf4545f2014-07-11 19:49:46107 "//components/webdata/common",
[email protected]dffd8a912014-06-30 23:24:31108 "//content/public/browser",
109 "//content/public/common",
[email protected]604828c2014-07-02 20:39:12110 "//courgette:courgette_lib",
[email protected]dffd8a912014-06-30 23:24:31111 "//crypto",
[email protected]604828c2014-07-02 20:39:12112 "//google_apis",
Brett Wilson8f1323042014-09-11 16:58:56113 "//gpu/config",
ajwongf7b1cb692014-08-23 21:36:22114 "//jingle:notifier",
[email protected]dffd8a912014-06-30 23:24:31115 "//skia",
116 "//sql",
117 "//sync",
[email protected]797b25042014-07-01 23:54:17118 "//third_party/cacheinvalidation",
[email protected]dffd8a912014-06-30 23:24:31119 "//third_party/icu",
120 "//third_party/libxml",
ajwongf7b1cb692014-08-23 21:36:22121 "//third_party/libjingle",
[email protected]dffd8a912014-06-30 23:24:31122 "//third_party/widevine/cdm:version_h",
123 "//third_party/zlib",
124 "//third_party/zlib:minizip",
125 "//third_party/zlib:zip",
126 "//ui/base",
127 "//ui/events",
128 "//ui/gfx",
129 "//ui/gfx/geometry",
[email protected]a1d7d4f2014-07-16 21:33:36130 "//ui/message_center",
131 "//ui/shell_dialogs",
[email protected]dffd8a912014-06-30 23:24:31132 "//ui/strings",
[email protected]797b25042014-07-01 23:54:17133 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31134 ]
135
danduongd81789642014-09-23 02:50:00136 sources += rebase_path(gypi_values.chrome_browser_undo_sources,
137 ".", "//chrome")
138
[email protected]dffd8a912014-06-30 23:24:31139 if (!is_ios) {
140 sources += rebase_path(gypi_values.chrome_browser_non_ios_sources,
141 ".", "//chrome")
142 #TODO(GYP) Add these sources:
143 # # These files are generated by GRIT.
144 # '<(grit_out_dir)/grit/component_extension_resources_map.cc',
145 # '<(grit_out_dir)/grit/theme_resources_map.cc',
[email protected]a3c134352014-07-11 19:23:19146 # '<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/ui_resources_map.cc',
[email protected]dffd8a912014-06-30 23:24:31147 #
148 # # This file is generated by
149 # # chrome/browser/metrics/variations/generate_resources_map.py
150 # '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc',
151
[email protected]1bb1a6002014-07-24 23:58:56152 defines = nacl_defines
[email protected]797b25042014-07-01 23:54:17153
[email protected]dffd8a912014-06-30 23:24:31154 deps += [
Brett Wilson1c693992014-08-25 19:10:01155 "//apps",
[email protected]dffd8a912014-06-30 23:24:31156 "//cc",
[email protected]55699f392014-08-20 22:16:30157 "//chrome/browser/devtools",
[email protected]55699f392014-08-20 22:16:30158 "//chrome/installer/util",
[email protected]b9f4c682014-07-10 22:00:37159 "//components/autofill/content/browser",
160 "//components/dom_distiller/content",
[email protected]fca567b2014-07-02 17:37:34161 "//components/keyed_service/content",
[email protected]55699f392014-08-20 22:16:30162 "//components/navigation_interception",
163 "//components/password_manager/content/browser",
164 "//components/precache/content",
165 "//components/sessions",
[email protected]abd4b682014-07-16 20:26:30166 "//components/storage_monitor",
[email protected]b9f4c682014-07-10 22:00:37167 "//components/translate/content/browser",
[email protected]fca567b2014-07-02 17:37:34168 "//components/url_matcher",
[email protected]dffd8a912014-06-30 23:24:31169 "//components/visitedlink/browser",
170 "//components/visitedlink/common",
hanxi149b92d2014-09-11 21:57:18171 "//components/web_cache/browser",
[email protected]b9f4c682014-07-10 22:00:37172 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:08173 "//content/app/resources",
[email protected]55699f392014-08-20 22:16:30174 "//media",
175 "//media/cast:net",
jamesra03ae492014-10-03 04:26:48176 "//mojo/edk/system",
[email protected]604828c2014-07-02 20:39:12177 "//mojo/environment:chromium",
178 "//mojo/public/cpp/bindings",
179 "//mojo/public/js/bindings",
Brett Wilson83fd4242014-09-02 19:45:33180 "//net:extras",
[email protected]dffd8a912014-06-30 23:24:31181 "//net:net_with_v8",
pilgrim4af8c212014-09-05 17:30:15182 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:24183 "//storage/common",
[email protected]4eebe74d2014-08-13 02:54:46184 "//third_party/WebKit/public:resources",
[email protected]dffd8a912014-06-30 23:24:31185 "//third_party/expat",
186 "//third_party/leveldatabase",
[email protected]fca567b2014-07-02 17:37:34187 "//third_party/libaddressinput",
[email protected]dffd8a912014-06-30 23:24:31188 "//third_party/libyuv",
189 "//third_party/npapi",
190 "//third_party/re2",
191 "//third_party/smhasher:cityhash",
Brett Wilson83fd4242014-09-02 19:45:33192 "//third_party/webrtc/modules/desktop_capture",
[email protected]dffd8a912014-06-30 23:24:31193 "//ui/gl",
194 "//ui/surface",
[email protected]604828c2014-07-02 20:39:12195 "//ui/web_dialogs",
[email protected]fca567b2014-07-02 17:37:34196 "//v8",
[email protected]dffd8a912014-06-30 23:24:31197 ## TODO(tonyg): Remove this dependency (crbug.com/280157).
[email protected]55699f392014-08-20 22:16:30198 #"../testing/perf/perf_test.gyp:*", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31199 ]
200 } else { # iOS
201 sources += rebase_path(gypi_values.chrome_browser_ios_sources,
202 ".", "//chrome")
203 deps += [
204 "//net",
205 ]
206 libs += [
207 "CoreTelephony.framework",
208 "CoreText.framework",
209 "MobileCoreServices.framework",
210 "QuartzCore.framework",
211 ]
212 ldflags += [ "-weak_framework", "CoreImage" ]
213 }
214
215 if (is_win || is_mac) {
216 sources += rebase_path(gypi_values.chrome_browser_win_mac_sources,
217 ".", "//chrome")
218 }
219 if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) {
220 sources += [
221 "net/disk_cache_dir_policy_handler.cc",
222 "net/disk_cache_dir_policy_handler.h",
223 ]
224 }
225 if (!is_android && !is_ios && enable_configuration_policy) {
226 sources += [
227 "download/download_dir_policy_handler.cc",
228 "download/download_dir_policy_handler.h",
229 ]
230 }
231 if (is_mac) {
232 sources += rebase_path(gypi_values.chrome_browser_mac_sources,
233 ".", "//chrome")
234 deps += [
235 #"app_shim" TODO(GYP)
tapted63829f72014-09-24 23:50:50236 #"browser_app_shim" TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31237 ]
238 }
239 if (cld2_data_source == "component") {
240 sources += [
241 "component_updater/cld_component_installer.cc",
242 "component_updater/cld_component_installer.h",
243 ]
244 }
245 if (enable_extensions) {
Brett Wilsone53895272014-09-23 23:41:46246 public_deps += [ "//chrome/browser/extensions" ]
[email protected]cc5b3be2014-08-15 23:24:52247 deps += [
[email protected]cc5b3be2014-08-15 23:24:52248 "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
thestige33aa2422014-09-22 22:16:30249 "//chrome/common/extensions/api",
250 "//chrome/common/extensions/api:api_registration",
[email protected]cc5b3be2014-08-15 23:24:52251 ]
[email protected]dffd8a912014-06-30 23:24:31252 sources += rebase_path(gypi_values.chrome_browser_extensions_sources,
253 ".", "//chrome")
254 }
255 if (enable_background) {
256 sources += rebase_path(gypi_values.chrome_browser_background_sources,
257 ".", "//chrome")
258 if (!use_aura || is_win) {
259 sources -= [ "background/background_mode_manager_aura.cc" ]
260 }
261 }
262 if (enable_task_manager) {
263 sources += rebase_path(gypi_values.chrome_browser_task_manager_sources,
264 ".", "//chrome")
265 }
266 if (enable_spellcheck) {
267 sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources,
268 ".", "//chrome")
269 deps += [ "//third_party/hunspell" ]
270 }
271 if (enable_nacl) {
272 sources += rebase_path(gypi_values.chrome_browser_nacl_sources,
273 ".", "//chrome")
274 #deps += [ "//components/nacl:nacl_browser" ] TODO(GYP)
275 }
apavlove749bca2014-09-30 11:07:41276
[email protected]dffd8a912014-06-30 23:24:31277 if (enable_configuration_policy) {
278 sources += rebase_path(
279 gypi_values.chrome_browser_policy_shared_with_ios_sources,
280 ".", "//chrome")
281 deps += [
[email protected]604828c2014-07-02 20:39:12282 "//components/policy",
[email protected]797b25042014-07-01 23:54:17283 "//components/policy/proto",
[email protected]dffd8a912014-06-30 23:24:31284 ]
285 if (!is_ios) {
286 sources += rebase_path(
287 gypi_values.chrome_browser_policy_non_ios_sources,
288 ".", "//chrome")
289 }
290 if (!is_chromeos) {
291 sources += rebase_path(
292 gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources,
293 ".", "//chrome")
294 }
295 if (is_win || is_mac || is_desktop_linux) {
296 sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
297 ".", "//chrome")
298 }
James Robinson2ed4d692014-09-17 05:20:58299 if (!is_android && !is_ios) { # Non-mobile
[email protected]dffd8a912014-06-30 23:24:31300 deps += [
Brett Wilson642752142014-08-26 19:05:21301 "//chrome/browser/policy:path_parser",
[email protected]dffd8a912014-06-30 23:24:31302 ]
303 }
304 } else {
305 # Configuration policy disabled.
306 sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources,
307 ".", "//chrome")
308 }
309
310 if (enable_plugins) {
311 sources += rebase_path(gypi_values.chrome_browser_plugins_sources,
312 ".", "//chrome")
313 deps += [
James Robinson2ed4d692014-09-17 05:20:58314 "//components/pdf/browser",
[email protected]dffd8a912014-06-30 23:24:31315 "//ppapi:ppapi_ipc",
thestig11b815e92014-08-26 00:32:14316 "//third_party/adobe/flash:flapper_version_h",
[email protected]dffd8a912014-06-30 23:24:31317 ]
318 }
319 if (safe_browsing_mode != 0) {
320 sources += rebase_path(
321 gypi_values.chrome_browser_basic_safe_browsing_sources,
322 ".", "//chrome")
323 deps += [
[email protected]fca567b2014-07-02 17:37:34324 "//chrome/browser/safe_browsing:chunk_proto",
mattm022138b52014-09-23 01:05:45325 "//chrome/browser/safe_browsing:metadata_proto",
[email protected]fca567b2014-07-02 17:37:34326 "//chrome/browser/safe_browsing:report_proto",
[email protected]dffd8a912014-06-30 23:24:31327 ]
328 if (safe_browsing_mode == 1) {
329 sources += rebase_path(
330 gypi_values.chrome_browser_full_safe_browsing_sources,
331 ".", "//chrome")
332 defines += [ "FULL_SAFE_BROWSING" ]
333 deps += [
[email protected]fca567b2014-07-02 17:37:34334 "//chrome/common/safe_browsing:proto",
[email protected]dffd8a912014-06-30 23:24:31335 ]
336 } else if (safe_browsing_mode == 2) {
337 defines += [ "MOBILE_SAFE_BROWSING" ]
338 }
339 }
340
341 if (is_linux) {
[email protected]797b25042014-07-01 23:54:17342 configs += [ "//build/config/linux:udev" ]
343 deps += [ "//device/media_transfer_protocol" ]
[email protected]dffd8a912014-06-30 23:24:31344 }
345 if (is_linux && !is_chromeos) {
[email protected]fd98b612014-07-09 22:11:47346 deps += [ "//third_party/speech-dispatcher" ]
[email protected]dffd8a912014-06-30 23:24:31347 }
348
349 if (is_chromeos) {
350 sources += rebase_path(gypi_values.chrome_browser_chromeos_sources,
351 ".", "//chrome")
352 deps += [
mukai8c99b882014-10-15 03:07:59353 "//chrome/browser/chromeos",
[email protected]dffd8a912014-06-30 23:24:31354 ]
355 } else {
356 # Non-ChromeOS.
357 sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources,
358 ".", "//chrome")
359 }
360
mukai8c99b882014-10-15 03:07:59361 if (is_chromeos || is_ios) {
362 sources -= [
363 "metrics/signin_status_metrics_provider.cc",
364 "metrics/signin_status_metrics_provider.h",
365 ]
366 }
367
[email protected]dffd8a912014-06-30 23:24:31368 if (use_cups) {
[email protected]604828c2014-07-02 20:39:12369 configs += [ "//printing:cups" ]
[email protected]dffd8a912014-06-30 23:24:31370 }
371 if (is_desktop_linux) {
372 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources,
373 ".", "//chrome")
[email protected]fca567b2014-07-02 17:37:34374 configs += [ "//build/config/linux:gnome_keyring" ]
[email protected]dffd8a912014-06-30 23:24:31375 }
376 if (use_aura) {
377 sources += rebase_path(gypi_values.chrome_browser_aura_sources,
378 ".", "//chrome")
379 deps += [
[email protected]fca567b2014-07-02 17:37:34380 "//ui/aura",
381 "//ui/compositor",
[email protected]604828c2014-07-02 20:39:12382 "//ui/keyboard",
[email protected]dffd8a912014-06-30 23:24:31383 ]
384 }
385 if (ui_compositor_image_transport) {
386 deps += [ "//ui/gl" ]
387 }
388
[email protected]855b7de2014-07-08 21:02:45389 if (use_ash) {
390 sources += rebase_path(gypi_values.chrome_browser_ash_sources,
391 ".", "//chrome")
392 }
393
[email protected]dffd8a912014-06-30 23:24:31394 if (use_x11) {
395 sources += rebase_path(gypi_values.chrome_browser_x11_sources,
396 ".", "//chrome")
397 if (!is_chromeos) {
[email protected]fca567b2014-07-02 17:37:34398 configs += [ "//build/config/linux:xscrnsaver" ]
[email protected]dffd8a912014-06-30 23:24:31399 }
400 }
401 if (is_posix && !is_mac && !is_ios) {
402 sources += [
rseseka0a7a042014-09-18 23:59:20403 "//chrome/app/chrome_crash_reporter_client.cc",
404 "//chrome/app/chrome_crash_reporter_client.h",
[email protected]dffd8a912014-06-30 23:24:31405 ]
406 deps += [
Robert Sesekabcd8102014-08-27 16:12:44407 "//components/crash/app",
408 "//components/crash/browser",
[email protected]dffd8a912014-06-30 23:24:31409 ]
410 }
411 if (use_nss_certs) {
412 sources += rebase_path(gypi_values.chrome_browser_nss_sources,
413 ".", "//chrome")
mukai8c99b882014-10-15 03:07:59414 if (is_chromeos) {
415 sources -= [ "net/nss_context_linux.cc" ]
416 }
[email protected]dffd8a912014-06-30 23:24:31417 }
418 if (enable_notifications) {
419 sources += rebase_path(gypi_values.chrome_browser_notifications_sources,
420 ".", "//chrome")
421 if (!is_android) {
422 sources += rebase_path(
423 gypi_values.chrome_browser_non_android_notifications_sources,
424 ".", "//chrome")
425 }
426 }
427 if (enable_themes) {
428 sources += rebase_path(gypi_values.chrome_browser_themes_sources,
429 ".", "//chrome")
430 }
431
[email protected]b46e7e92014-07-22 21:49:52432 if (printing_mode != 0) {
[email protected]dffd8a912014-06-30 23:24:31433 # Some form of printing support.
434 sources += rebase_path(gypi_values.chrome_browser_basic_printing_sources,
435 ".", "//chrome")
436 deps += [
[email protected]55699f392014-08-20 22:16:30437 "//printing",
[email protected]dffd8a912014-06-30 23:24:31438 ]
vitalybuka36259ca2014-08-28 23:42:24439 if (is_win) {
[email protected]dffd8a912014-06-30 23:24:31440 sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources,
441 ".", "//chrome")
442 }
[email protected]b46e7e92014-07-22 21:49:52443 if (printing_mode == 1) {
[email protected]dffd8a912014-06-30 23:24:31444 # Full printing on top of the above.
445 sources += rebase_path(gypi_values.chrome_browser_full_printing_sources,
446 ".", "//chrome")
[email protected]b46e7e92014-07-22 21:49:52447 } else if (printing_mode == 2) {
[email protected]dffd8a912014-06-30 23:24:31448 # Partial-only printing support.
449 sources += rebase_path(
450 gypi_values.chrome_browser_basic_only_printing_sources,
451 ".", "//chrome")
452 }
453 }
454 if (enable_captive_portal_detection) {
455 sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources,
456 ".", "//chrome")
457 }
458 if (enable_session_service) {
459 sources += rebase_path(gypi_values.chrome_browser_session_service_sources,
460 ".", "//chrome")
461 }
462
463 if (is_android || is_ios) {
464 # Mobile.
465 sources += rebase_path(gypi_values.chrome_browser_mobile_sources,
466 ".", "//chrome")
467 } else {
468 # Non-mobile.
469 sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
470 ".", "//chrome")
reillyge471fab2014-08-29 01:58:43471 deps += [
reillyge471fab2014-08-29 01:58:43472 "//device/core",
reillygd77718d2014-09-04 00:57:56473 "//device/usb",
reillyge471fab2014-08-29 01:58:43474 ]
[email protected]dffd8a912014-06-30 23:24:31475 }
476
477 if (is_android) {
478 sources += rebase_path(gypi_values.chrome_browser_android_sources,
479 ".", "//chrome")
480 deps += [
James Robinson2ed4d692014-09-17 05:20:58481 ":jni_headers",
[email protected]55699f392014-08-20 22:16:30482 "//components/cdm/browser",
[email protected]dffd8a912014-06-30 23:24:31483 #"../components/components.gyp:web_contents_delegate_android", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31484 ]
485 deps -= [
[email protected]fca567b2014-07-02 17:37:34486 "//third_party/libaddressinput",
[email protected]abd4b682014-07-16 20:26:30487 "//components/feedback",
488 "//components/storage_monitor",
[email protected]abd4b682014-07-16 20:26:30489 "//components/web_modal",
[email protected]dffd8a912014-06-30 23:24:31490 ]
491 } else {
492 sources += rebase_path(gypi_values.chrome_browser_non_android_sources,
493 ".", "//chrome")
494 }
495
496 if (is_mac) {
497 deps += [
[email protected]6b5d2f92014-07-30 00:40:03498 "//third_party/google_toolbox_for_mac",
[email protected]dffd8a912014-06-30 23:24:31499 #"../third_party/mozilla/mozilla.gyp:mozilla", TODO(GYP)
500 ]
501 libs += [
502 "Accelerate.framework",
503 "AddressBook.framework",
504 "AudioUnit.framework",
505 "DiskArbitration.framework",
506 "IOKit.framework",
507 "ImageCaptureCore.framework",
508 "OpenGL.framework",
509 "QuartzCore.framework",
510 "SecurityInterface.framework",
511 ]
512 }
513
514 if (enable_rlz) {
515 sources += rebase_path(gypi_values.chrome_browser_rlz_sources,
516 ".", "//chrome")
517 deps += [ "//rlz:rlz_lib" ]
518 }
519
520 # TODO(GYP)
521 # Temporary fix to break the browser target into smaller chunks so it
522 # will link with goma builds.
523 #["OS=="win" and chromium_win_pch==0", {
524 # "msvs_shard": 4,
525 #}],
526
527 if (is_win) {
528 sources += rebase_path(gypi_values.chrome_browser_win_sources,
529 ".", "//chrome")
Brett Wilsone53895272014-09-23 23:41:46530 public_deps += [
531 "//ui/views",
532 "//ui/views/controls/webview",
533 ]
[email protected]dffd8a912014-06-30 23:24:31534 deps += [
[email protected]55699f392014-08-20 22:16:30535 "//chrome:version_header",
536 "//chrome/installer/util:strings",
537 "//third_party/iaccessible2",
538 "//third_party/isimpledom",
[email protected]dffd8a912014-06-30 23:24:31539 "//third_party/wtl",
540 #"chrome_process_finder", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31541 #"../chrome_elf/chrome_elf.gyp:chrome_elf", TODO(GYP)
542 #"../chrome_elf/chrome_elf.gyp:chrome_elf_constants", TODO(GYP)
543 #"../chrome_elf/chrome_elf.gyp:dll_hash", TODO(GYP)
544 #"../google_update/google_update.gyp:google_update", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31545 #"../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31546 #"../win8/win8.gyp:metro_viewer", TODO(GYP)
547 ]
[email protected]dffd8a912014-06-30 23:24:31548 } else {
549 # Non-Windows.
550 sources += rebase_path(gypi_values.chrome_browser_non_win_sources,
551 ".", "//chrome")
[email protected]f6dc4ae2014-07-30 00:10:37552 if (toolkit_views) {
[email protected]dffd8a912014-06-30 23:24:31553 deps += [
[email protected]55699f392014-08-20 22:16:30554 "//ui/views",
555 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31556 ]
557 # TODO(GYP) why is this needed? Very susicious.
558 # "include_dirs": [
559 # "<(INTERMEDIATE_DIR)/chrome",
560 # ],
561 }
562 }
563
564 if (is_linux) {
565 sources += rebase_path(gypi_values.chrome_browser_linux_sources,
566 ".", "//chrome")
567 if (use_aura) {
568 configs += [
569 "//build/config/linux:dbus",
570 "//build/config/linux:fontconfig",
571 ]
572 deps += [
573 "//dbus",
574 ]
575 }
576 if (use_x11) {
577 configs += [ "//build/config/linux:x11" ]
578 deps += [ "//ui/gfx/x" ]
579 }
580 }
581
582 if (is_desktop_linux) {
583 sources += rebase_path(gypi_values.chrome_browser_desktop_linux_sources,
584 ".", "//chrome")
585 }
586 if (enable_plugin_installation) {
587 sources += rebase_path(
588 gypi_values.chrome_browser_plugin_installation_sources,
589 ".", "//chrome")
590 }
591 if (enable_app_list) {
592 deps += [
[email protected]55699f392014-08-20 22:16:30593 "//ui/app_list",
[email protected]dffd8a912014-06-30 23:24:31594 ]
595 }
596 if (enable_managed_users) {
597 sources += rebase_path(
598 gypi_values.chrome_browser_supervised_user_sources,
599 ".", "//chrome")
600 }
601 if (enable_webrtc) {
602 sources += rebase_path(
603 gypi_values.chrome_browser_webrtc_sources,
604 ".", "//chrome")
605 }
606 if (enable_service_discovery) {
607 sources += rebase_path(
608 gypi_values.chrome_browser_service_discovery_sources,
609 ".", "//chrome")
610 }
611 if (enable_mdns) {
612 sources += rebase_path(
613 gypi_values.chrome_browser_mdns_sources,
614 ".", "//chrome")
615 }
616 if (!enable_autofill_dialog || is_android || is_ios) {
617 sources -= [
618 "autofill/validation_rules_storage_factory.cc",
619 "autofill/validation_rules_storage_factory.h",
620 ]
621 }
622 if (enable_wifi_bootstrapping) {
623 sources += rebase_path(
624 gypi_values.chrome_browser_wifi_bootstrapping_sources,
625 ".", "//chrome")
626 if (is_win || is_mac) {
627 # TODO(brettw) as of this writing wifi bootstrapping is set on Windows
628 # and Mac, so this test is meaningless. Can we merge these lists?
629 sources += rebase_path(
630 gypi_values.chrome_browser_win_mac_wifi_bootstrapping_sources,
631 ".", "//chrome")
632 }
633 }
634}
635
James Robinson2ed4d692014-09-17 05:20:58636if (is_android) {
637 # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers
638 generate_jni("jni_headers") {
639 sources = rebase_path(
640 gypi_values.chrome_browser_jni_sources, ".", "//chrome")
641 jni_package = "chrome"
642 }
643}
644
[email protected]77ce8022014-06-16 19:29:56645# GYP version: chrome/chrome_resources.gyp:chrome_resources
646# (generate_browser_resources action)
647grit("resources") {
648 source = "browser_resources.grd"
[email protected]48885492014-08-13 11:22:41649 output_dir = "$root_gen_dir/chrome"
[email protected]cb0c67a2014-07-22 16:37:26650 outputs = [
651 "grit/browser_resources.h",
652 "browser_resources.pak",
653 ]
[email protected]77ce8022014-06-16 19:29:56654
655 omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js"
656
657 grit_flags = [
658 "-E", "about_credits_file=" +
659 rebase_path(about_credits_file, root_build_dir),
660 "-E", "additional_modules_list_file=" +
661 rebase_path(additional_modules_list_file, root_build_dir),
662 "-E", "omnibox_mojom_file=" +
663 rebase_path(omnibox_mojom_file, root_build_dir),
664 ]
665
666 deps = [
667 ":about_credits",
668 ":chrome_internal_resources_gen",
[email protected]77ce8022014-06-16 19:29:56669 "//chrome/browser/ui/webui/omnibox:mojo_bindings",
Brett Wilson4263a742014-09-10 00:02:24670 "//mojo/environment:chromium",
[email protected]77ce8022014-06-16 19:29:56671 ]
672}
673
674# GYP version: chrome/chrome_resource.gyp:about_credits
675action("about_credits") {
676 script = "//tools/licenses.py"
677
678 # TODO(phajdan.jr): input dependencies so this can be regenerated
679 # automatically when one of the credits changes. The way this should work is
680 # that licenses.py should write a .d file listing the input dependencies (see
681 # "depfile" in GN).
682 outputs = [ about_credits_file ]
683
684 args = [
685 "credits",
686 rebase_path(about_credits_file, root_build_dir),
687 ]
688}
689
690# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
engedy99d0e11b2014-09-30 13:32:41691if (is_chrome_branded) {
[email protected]77ce8022014-06-16 19:29:56692 action("chrome_internal_resources_gen") {
engedy99d0e11b2014-09-30 13:32:41693 script = "internal/transform_additional_modules_list.py"
694 sources = [ "internal/resources/additional_modules_list.input" ]
695 outputs = [ additional_modules_list_file ]
696 args = rebase_path(sources, root_build_dir) +
697 rebase_path(outputs, root_build_dir)
[email protected]77ce8022014-06-16 19:29:56698 }
699} else {
700 group("chrome_internal_resources_gen") {
701 # Empty placeholder.
702 }
703}
Brett Wilson052ce132014-09-12 19:46:29704
705# In GYP this is part of test_support_common.
706source_set("test_support") {
707 testonly = true
708
709 # Always include this via the main test support target.
710 visibility = [ "//chrome/test:test_support" ]
711
712 sources = [
713 "browsing_data/mock_browsing_data_appcache_helper.cc",
714 "browsing_data/mock_browsing_data_appcache_helper.h",
715 "browsing_data/mock_browsing_data_channel_id_helper.cc",
716 "browsing_data/mock_browsing_data_channel_id_helper.h",
717 "browsing_data/mock_browsing_data_cookie_helper.cc",
718 "browsing_data/mock_browsing_data_cookie_helper.h",
719 "browsing_data/mock_browsing_data_database_helper.cc",
720 "browsing_data/mock_browsing_data_database_helper.h",
721 "browsing_data/mock_browsing_data_file_system_helper.cc",
722 "browsing_data/mock_browsing_data_file_system_helper.h",
723 "browsing_data/mock_browsing_data_flash_lso_helper.cc",
724 "browsing_data/mock_browsing_data_flash_lso_helper.h",
725 "browsing_data/mock_browsing_data_indexed_db_helper.cc",
726 "browsing_data/mock_browsing_data_indexed_db_helper.h",
727 "browsing_data/mock_browsing_data_local_storage_helper.cc",
728 "browsing_data/mock_browsing_data_local_storage_helper.h",
729 "browsing_data/mock_browsing_data_quota_helper.cc",
730 "browsing_data/mock_browsing_data_quota_helper.h",
731 "browsing_data/mock_browsing_data_service_worker_helper.cc",
732 "browsing_data/mock_browsing_data_service_worker_helper.h",
733 "download/download_test_file_activity_observer.cc",
734 "download/download_test_file_activity_observer.h",
735 "download/test_download_shelf.cc",
736 "download/test_download_shelf.h",
737 "extensions/extension_action_test_util.cc",
738 "extensions/extension_action_test_util.h",
739 "invalidation/fake_invalidation_service.cc",
740 "invalidation/fake_invalidation_service.h",
741 "media/fake_desktop_media_list.cc",
742 "media/fake_desktop_media_list.h",
743 "net/dns_probe_test_util.cc",
744 "net/dns_probe_test_util.h",
745 "net/url_request_mock_util.cc",
746 "net/url_request_mock_util.h",
747 "notifications/notification_test_util.cc",
748 "notifications/notification_test_util.h",
749 "password_manager/mock_password_store_service.cc",
750 "password_manager/mock_password_store_service.h",
751 "password_manager/null_password_store_service.cc",
752 "password_manager/null_password_store_service.h",
753 "password_manager/test_password_store_service.cc",
754 "password_manager/test_password_store_service.h",
755 "prefs/pref_service_mock_factory.cc",
756 "prefs/pref_service_mock_factory.h",
757 "profile_resetter/profile_resetter_test_base.cc",
758 "profile_resetter/profile_resetter_test_base.h",
759 "search_engines/template_url_service_factory_test_util.cc",
760 "search_engines/template_url_service_factory_test_util.h",
761 "search_engines/template_url_service_test_util.cc",
762 "search_engines/template_url_service_test_util.h",
763 "sessions/session_service_test_helper.cc",
764 "sessions/session_service_test_helper.h",
765 "signin/fake_account_reconcilor.cc",
766 "signin/fake_account_reconcilor.h",
767 "signin/fake_account_tracker_service.cc",
768 "signin/fake_account_tracker_service.h",
769 "signin/fake_profile_oauth2_token_service.cc",
770 "signin/fake_profile_oauth2_token_service.h",
771 "signin/fake_profile_oauth2_token_service_builder.cc",
772 "signin/fake_profile_oauth2_token_service_builder.h",
773 "signin/fake_signin_manager.cc",
774 "signin/fake_signin_manager.h",
775 "ssl/ssl_client_auth_requestor_mock.cc",
776 "ssl/ssl_client_auth_requestor_mock.h",
Brett Wilson052ce132014-09-12 19:46:29777 "sync/profile_sync_components_factory_mock.cc",
778 "sync/profile_sync_components_factory_mock.h",
779 "sync/profile_sync_service_mock.cc",
780 "sync/profile_sync_service_mock.h",
781 ]
782
Brett Wilsone53895272014-09-23 23:41:46783 public_deps = [
Brett Wilson052ce132014-09-12 19:46:29784 ":browser",
Brett Wilsone53895272014-09-23 23:41:46785 "//chrome/browser/ui:test_support",
786 ]
787 deps = [
Brett Wilson052ce132014-09-12 19:46:29788 "//base:prefs_test_support",
789 "//chrome/browser",
Brett Wilson052ce132014-09-12 19:46:29790 "//chrome/common",
791 "//chrome/common/safe_browsing:proto",
792 "//components/invalidation",
793 "//components/invalidation:test_support",
794 "//components/password_manager/core/browser:test_support",
795 "//components/search_engines:test_support",
796 "//content/test:test_support",
797 "//chrome/app/theme:theme_resources",
798 "//net:test_support",
799 "//skia",
800 "//testing/gmock",
801 "//testing/gtest",
802 "//ui/gfx",
803 ]
804
Brett Wilson052ce132014-09-12 19:46:29805 if (!is_ios) {
806 deps += [
807 "//components/sessions:test_support",
Brett Wilson052ce132014-09-12 19:46:29808 "//google_apis:test_support",
809 ]
810 }
811
James Robinson2ed4d692014-09-17 05:20:58812 if (enable_extensions) {
813 deps += [
814 "//extensions:test_support",
815 ]
816 }
817
Brett Wilson052ce132014-09-12 19:46:29818 if (is_chromeos) {
819 sources += [
820 "chromeos/app_mode/fake_cws.cc",
821 "chromeos/app_mode/fake_cws.h",
822 "chromeos/file_manager/fake_disk_mount_manager.cc",
823 "chromeos/file_manager/fake_disk_mount_manager.h",
824 "chromeos/input_method/mock_candidate_window_controller.cc",
825 "chromeos/input_method/mock_candidate_window_controller.h",
826 "chromeos/input_method/mock_input_method_engine.cc",
827 "chromeos/input_method/mock_input_method_engine.h",
828 "chromeos/input_method/mock_input_method_manager.cc",
829 "chromeos/input_method/mock_input_method_manager.h",
830 "chromeos/login/fake_login_utils.cc",
831 "chromeos/login/fake_login_utils.h",
832 "chromeos/login/mock_login_utils.cc",
833 "chromeos/login/mock_login_utils.h",
834 "chromeos/login/users/avatar/mock_user_image_manager.cc",
835 "chromeos/login/users/avatar/mock_user_image_manager.h",
836 "chromeos/login/users/fake_supervised_user_manager.cc",
837 "chromeos/login/users/fake_supervised_user_manager.h",
838 "chromeos/login/users/fake_user_manager.cc",
839 "chromeos/login/users/fake_user_manager.h",
840 "chromeos/login/users/mock_user_manager.cc",
841 "chromeos/login/users/mock_user_manager.h",
842 "chromeos/login/test/oobe_screen_waiter.cc",
843 "chromeos/login/test/oobe_screen_waiter.h",
844 "chromeos/login/test/js_checker.cc",
845 "chromeos/login/test/js_checker.h",
846 "chromeos/login/ui/mock_login_display.cc",
847 "chromeos/login/ui/mock_login_display.h",
848 "chromeos/login/ui/mock_login_display_host.cc",
849 "chromeos/login/ui/mock_login_display_host.h",
850 "chromeos/net/network_portal_detector_test_utils.cc",
851 "chromeos/net/network_portal_detector_test_utils.h",
852 "chromeos/policy/cloud_external_data_manager_base_test_util.cc",
853 "chromeos/policy/cloud_external_data_manager_base_test_util.h",
854 "chromeos/policy/device_policy_builder.cc",
855 "chromeos/policy/device_policy_builder.h",
856 "chromeos/policy/fake_device_cloud_policy_initializer.cc",
857 "chromeos/policy/fake_device_cloud_policy_initializer.h",
858 "chromeos/policy/stub_enterprise_install_attributes.cc",
859 "chromeos/policy/stub_enterprise_install_attributes.h",
860 "chromeos/settings/device_settings_test_helper.cc",
861 "chromeos/settings/device_settings_test_helper.h",
862 "chromeos/system/fake_input_device_settings.cc",
863 "chromeos/system/fake_input_device_settings.h",
864 ]
865 configs += [ "//build/config/linux:dbus" ]
mukai6ba73552014-10-09 19:05:17866 deps += [ "//chromeos:test_support" ]
Brett Wilson052ce132014-09-12 19:46:29867 }
868
869 if (enable_configuration_policy) {
870 sources += [
871 "policy/test/local_policy_test_server.cc",
872 "policy/test/local_policy_test_server.h",
873 ]
Brett Wilsone53895272014-09-23 23:41:46874 public_deps += [
Brett Wilson052ce132014-09-12 19:46:29875 "//components/policy:policy_component_test_support",
876 "//components/policy:test_support",
877 ]
Brett Wilson052ce132014-09-12 19:46:29878 }
879
880 if (safe_browsing_mode == 1) {
881 sources += [
882 "extensions/fake_safe_browsing_database_manager.cc",
883 "extensions/fake_safe_browsing_database_manager.h",
884 ]
885 }
886
887 if (enable_extensions) {
888 sources += [
889 "drive/dummy_drive_service.cc",
890 "drive/dummy_drive_service.h",
891 "drive/fake_drive_service.cc",
892 "drive/fake_drive_service.h",
893 "drive/test_util.cc",
894 "drive/test_util.h",
895 "extensions/api/messaging/native_messaging_test_util.cc",
896 "extensions/api/messaging/native_messaging_test_util.h",
897 "extensions/extension_notification_observer.cc",
898 "extensions/extension_notification_observer.h",
Brett Wilson052ce132014-09-12 19:46:29899 "extensions/mock_extension_special_storage_policy.cc",
900 "extensions/mock_extension_special_storage_policy.h",
901 "extensions/test_blacklist.cc",
902 "extensions/test_blacklist.h",
903 "extensions/test_blacklist_state_fetcher.cc",
904 "extensions/test_blacklist_state_fetcher.h",
905 "extensions/test_extension_environment.cc",
906 "extensions/test_extension_environment.h",
907 "extensions/test_extension_prefs.cc",
908 "extensions/test_extension_prefs.h",
909 "extensions/test_extension_service.cc",
910 "extensions/test_extension_service.h",
911 "extensions/test_extension_system.cc",
912 "extensions/test_extension_system.h",
913 "media_galleries/media_galleries_test_util.cc",
914 "media_galleries/media_galleries_test_util.h",
915 ]
916 deps += [
917 "//components/storage_monitor:test_support",
918 ]
919 }
920
921 if (enable_mdns) {
922 sources += [
923 "local_discovery/test_service_discovery_client.cc",
924 "local_discovery/test_service_discovery_client.h",
925 ]
926 }
927
928 if (enable_app_list) {
929 sources += [
930 "ui/app_list/test/chrome_app_list_test_support.cc",
931 "ui/app_list/test/chrome_app_list_test_support.h",
932 ]
933 }
934
935 if (enable_wifi_bootstrapping) {
936 sources += [
937 "local_discovery/wifi/mock_wifi_manager.cc",
938 "local_discovery/wifi/mock_wifi_manager.h",
939 ]
940 }
941}