blob: 8181e41c37ef4f86bd5da4905789310b9cc538ab [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") {
28 configs += [ "//build/config/compiler:wexit_time_destructors" ]
29 defines = []
30 sources = []
31 libs = []
32 ldflags = []
33
34 # iOS/non-iOS shared deps. New dependencies should generally be added in the
35 # non-iOS deps below.
Brett Wilsone53895272014-09-23 23:41:4636 public_deps = [
37 "//components/autofill/core/browser",
38 "//content/public/browser",
39 "//sql",
40 "//sync",
41 ]
[email protected]dffd8a912014-06-30 23:24:3142 deps = [
43 "//base/allocator",
44 "//chrome:extra_resources",
45 "//chrome:resources",
46 "//chrome:strings",
[email protected]797b25042014-07-01 23:54:1747 "//chrome/app:generated_resources_map",
[email protected]855b7de2014-07-08 21:02:4548 "//chrome/app/resources:platform_locale_settings",
[email protected]797b25042014-07-01 23:54:1749 "//chrome/app/theme:theme_resources",
[email protected]855b7de2014-07-08 21:02:4550 "//chrome/browser/history:in_memory_url_index_cache_proto",
[email protected]855b7de2014-07-08 21:02:4551 "//chrome/browser/net:cert_logger_proto",
[email protected]797b25042014-07-01 23:54:1752 "//chrome/browser/net:probe_message_proto",
[email protected]abd4b682014-07-16 20:26:3053 "//chrome/browser/ui",
[email protected]dffd8a912014-06-30 23:24:3154 "//chrome/common",
55 "//chrome/common/net",
[email protected]604828c2014-07-02 20:39:1256 "//components/autofill/core/browser",
Brett Wilson1c693992014-08-25 19:10:0157 "//components/bookmarks/browser",
[email protected]b9f4c682014-07-10 22:00:3758 "//components/captive_portal",
[email protected]fca567b2014-07-02 17:37:3459 "//components/cloud_devices/common",
Brett Wilson1c693992014-08-25 19:10:0160 "//components/component_updater",
vasiliiac461392014-09-18 11:35:1761 "//components/content_settings/core/browser",
[email protected]08f71012014-07-25 10:27:5462 "//components/content_settings/core/common",
[email protected]478ed232014-08-19 02:10:5563 "//components/crx_file",
[email protected]b9f4c682014-07-10 22:00:3764 "//components/data_reduction_proxy/browser",
[email protected]273ae5ab2014-07-09 21:10:2565 "//components/domain_reliability",
66 "//components/favicon_base",
67 "//components/favicon/core",
[email protected]abd4b682014-07-16 20:26:3068 "//components/feedback",
69 "//components/gcm_driver",
Brett Wilson1c693992014-08-25 19:10:0170 "//components/google/core/browser",
[email protected]273ae5ab2014-07-09 21:10:2571 "//components/history/core/browser",
72 "//components/history/core/common",
Brett Wilson1c693992014-08-25 19:10:0173 "//components/infobars/core",
74 "//components/invalidation",
gunsch1afc65172014-09-16 00:03:3275 "//components/metrics:gpu",
[email protected]fca567b2014-07-02 17:37:3476 "//components/metrics:net",
gunsch840bc412014-09-18 19:38:0677 "//components/metrics:profiler",
Brett Wilson1c693992014-08-25 19:10:0178 "//components/metrics/proto:proto",
oshimac6ff18d2014-09-18 18:26:5079 "//components/native_app_window",
[email protected]fca567b2014-07-02 17:37:3480 "//components/navigation_metrics",
Brett Wilson1c693992014-08-25 19:10:0181 "//components/network_time",
82 "//components/omaha_query_params",
[email protected]b1c5ab682014-08-07 11:53:1783 "//components/omnibox",
[email protected]fca567b2014-07-02 17:37:3484 "//components/os_crypt",
Brett Wilson1c693992014-08-25 19:10:0185 "//components/password_manager/core/browser",
86 "//components/password_manager/core/common",
[email protected]fca567b2014-07-02 17:37:3487 "//components/policy:policy_component",
Brett Wilson1c693992014-08-25 19:10:0188 "//components/precache/core",
[email protected]fca567b2014-07-02 17:37:3489 "//components/query_parser",
[email protected]b9f4c682014-07-10 22:00:3790 "//components/rappor",
Brett Wilson1c693992014-08-25 19:10:0191 "//components/renderer_context_menu",
[email protected]720b10492014-07-23 08:48:4092 "//components/search",
Brett Wilson1c693992014-08-25 19:10:0193 "//components/search_engines",
94 "//components/search_provider_logos",
[email protected]abd4b682014-07-16 20:26:3095 "//components/signin/core/browser",
96 "//components/startup_metric_utils",
[email protected]797b25042014-07-01 23:54:1797 "//components/strings",
[email protected]bdceb3ba2014-07-25 16:47:4898 "//components/suggestions",
Brett Wilson1c693992014-08-25 19:10:0199 "//components/sync_driver",
[email protected]b9f4c682014-07-10 22:00:37100 "//components/translate/core/browser",
101 "//components/translate/core/common",
[email protected]273ae5ab2014-07-09 21:10:25102 "//components/url_fixer",
[email protected]fca567b2014-07-02 17:37:34103 "//components/user_prefs",
[email protected]bf4545f2014-07-11 19:49:46104 "//components/webdata/common",
[email protected]dffd8a912014-06-30 23:24:31105 "//content/public/browser",
106 "//content/public/common",
[email protected]604828c2014-07-02 20:39:12107 "//courgette:courgette_lib",
[email protected]dffd8a912014-06-30 23:24:31108 "//crypto",
[email protected]604828c2014-07-02 20:39:12109 "//google_apis",
Brett Wilson8f1323042014-09-11 16:58:56110 "//gpu/config",
ajwongf7b1cb692014-08-23 21:36:22111 "//jingle:notifier",
[email protected]dffd8a912014-06-30 23:24:31112 "//skia",
113 "//sql",
114 "//sync",
[email protected]797b25042014-07-01 23:54:17115 "//third_party/cacheinvalidation",
[email protected]dffd8a912014-06-30 23:24:31116 "//third_party/icu",
117 "//third_party/libxml",
ajwongf7b1cb692014-08-23 21:36:22118 "//third_party/libjingle",
[email protected]dffd8a912014-06-30 23:24:31119 "//third_party/widevine/cdm:version_h",
120 "//third_party/zlib",
121 "//third_party/zlib:minizip",
122 "//third_party/zlib:zip",
123 "//ui/base",
124 "//ui/events",
125 "//ui/gfx",
126 "//ui/gfx/geometry",
[email protected]a1d7d4f2014-07-16 21:33:36127 "//ui/message_center",
128 "//ui/shell_dialogs",
[email protected]dffd8a912014-06-30 23:24:31129 "//ui/strings",
[email protected]797b25042014-07-01 23:54:17130 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31131 ]
132
danduongd81789642014-09-23 02:50:00133 sources += rebase_path(gypi_values.chrome_browser_undo_sources,
134 ".", "//chrome")
135
[email protected]dffd8a912014-06-30 23:24:31136 if (!is_ios) {
137 sources += rebase_path(gypi_values.chrome_browser_non_ios_sources,
138 ".", "//chrome")
139 #TODO(GYP) Add these sources:
140 # # These files are generated by GRIT.
141 # '<(grit_out_dir)/grit/component_extension_resources_map.cc',
142 # '<(grit_out_dir)/grit/theme_resources_map.cc',
[email protected]a3c134352014-07-11 19:23:19143 # '<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/ui_resources_map.cc',
[email protected]dffd8a912014-06-30 23:24:31144 #
145 # # This file is generated by
146 # # chrome/browser/metrics/variations/generate_resources_map.py
147 # '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc',
148
[email protected]1bb1a6002014-07-24 23:58:56149 defines = nacl_defines
[email protected]797b25042014-07-01 23:54:17150
[email protected]dffd8a912014-06-30 23:24:31151 deps += [
Brett Wilson1c693992014-08-25 19:10:01152 "//apps",
[email protected]dffd8a912014-06-30 23:24:31153 "//cc",
[email protected]55699f392014-08-20 22:16:30154 "//chrome/browser/devtools",
[email protected]55699f392014-08-20 22:16:30155 "//chrome/installer/util",
[email protected]b9f4c682014-07-10 22:00:37156 "//components/autofill/content/browser",
157 "//components/dom_distiller/content",
[email protected]fca567b2014-07-02 17:37:34158 "//components/keyed_service/content",
[email protected]55699f392014-08-20 22:16:30159 "//components/navigation_interception",
160 "//components/password_manager/content/browser",
161 "//components/precache/content",
162 "//components/sessions",
[email protected]abd4b682014-07-16 20:26:30163 "//components/storage_monitor",
[email protected]b9f4c682014-07-10 22:00:37164 "//components/translate/content/browser",
[email protected]fca567b2014-07-02 17:37:34165 "//components/url_matcher",
[email protected]dffd8a912014-06-30 23:24:31166 "//components/visitedlink/browser",
167 "//components/visitedlink/common",
hanxi149b92d2014-09-11 21:57:18168 "//components/web_cache/browser",
[email protected]b9f4c682014-07-10 22:00:37169 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:08170 "//content/app/resources",
[email protected]55699f392014-08-20 22:16:30171 "//media",
172 "//media/cast:net",
[email protected]604828c2014-07-02 20:39:12173 "//mojo/environment:chromium",
174 "//mojo/public/cpp/bindings",
175 "//mojo/public/js/bindings",
176 "//mojo/system",
Brett Wilson83fd4242014-09-02 19:45:33177 "//net:extras",
[email protected]dffd8a912014-06-30 23:24:31178 "//net:net_with_v8",
pilgrim4af8c212014-09-05 17:30:15179 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:24180 "//storage/common",
[email protected]4eebe74d2014-08-13 02:54:46181 "//third_party/WebKit/public:resources",
[email protected]dffd8a912014-06-30 23:24:31182 "//third_party/expat",
183 "//third_party/leveldatabase",
[email protected]fca567b2014-07-02 17:37:34184 "//third_party/libaddressinput",
[email protected]dffd8a912014-06-30 23:24:31185 "//third_party/libyuv",
186 "//third_party/npapi",
187 "//third_party/re2",
188 "//third_party/smhasher:cityhash",
Brett Wilson83fd4242014-09-02 19:45:33189 "//third_party/webrtc/modules/desktop_capture",
[email protected]dffd8a912014-06-30 23:24:31190 "//ui/gl",
191 "//ui/surface",
[email protected]604828c2014-07-02 20:39:12192 "//ui/web_dialogs",
[email protected]fca567b2014-07-02 17:37:34193 "//v8",
[email protected]dffd8a912014-06-30 23:24:31194 ## TODO(tonyg): Remove this dependency (crbug.com/280157).
[email protected]55699f392014-08-20 22:16:30195 #"../testing/perf/perf_test.gyp:*", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31196 ]
197 } else { # iOS
198 sources += rebase_path(gypi_values.chrome_browser_ios_sources,
199 ".", "//chrome")
200 deps += [
201 "//net",
202 ]
203 libs += [
204 "CoreTelephony.framework",
205 "CoreText.framework",
206 "MobileCoreServices.framework",
207 "QuartzCore.framework",
208 ]
209 ldflags += [ "-weak_framework", "CoreImage" ]
210 }
211
212 if (is_win || is_mac) {
213 sources += rebase_path(gypi_values.chrome_browser_win_mac_sources,
214 ".", "//chrome")
215 }
216 if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) {
217 sources += [
218 "net/disk_cache_dir_policy_handler.cc",
219 "net/disk_cache_dir_policy_handler.h",
220 ]
221 }
222 if (!is_android && !is_ios && enable_configuration_policy) {
223 sources += [
224 "download/download_dir_policy_handler.cc",
225 "download/download_dir_policy_handler.h",
226 ]
227 }
228 if (is_mac) {
229 sources += rebase_path(gypi_values.chrome_browser_mac_sources,
230 ".", "//chrome")
231 deps += [
232 #"app_shim" TODO(GYP)
tapted63829f72014-09-24 23:50:50233 #"browser_app_shim" TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31234 ]
235 }
oshimac6ff18d2014-09-18 18:26:50236 if (!toolkit_views) {
237 deps -= [ "//components/native_app_window" ]
238 }
[email protected]dffd8a912014-06-30 23:24:31239 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 }
276 # ["debug_devtools==1", { TODO(GYP)
277 # "defines": [
278 # "DEBUG_DEVTOOLS=1",
James Robinson2ed4d692014-09-17 05:20:58279 # }],
[email protected]dffd8a912014-06-30 23:24:31280 if (enable_configuration_policy) {
281 sources += rebase_path(
282 gypi_values.chrome_browser_policy_shared_with_ios_sources,
283 ".", "//chrome")
284 deps += [
[email protected]604828c2014-07-02 20:39:12285 "//components/policy",
[email protected]797b25042014-07-01 23:54:17286 "//components/policy/proto",
[email protected]dffd8a912014-06-30 23:24:31287 ]
288 if (!is_ios) {
289 sources += rebase_path(
290 gypi_values.chrome_browser_policy_non_ios_sources,
291 ".", "//chrome")
292 }
293 if (!is_chromeos) {
294 sources += rebase_path(
295 gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources,
296 ".", "//chrome")
297 }
298 if (is_win || is_mac || is_desktop_linux) {
299 sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
300 ".", "//chrome")
301 }
James Robinson2ed4d692014-09-17 05:20:58302 if (!is_android && !is_ios) { # Non-mobile
[email protected]dffd8a912014-06-30 23:24:31303 deps += [
Brett Wilson642752142014-08-26 19:05:21304 "//chrome/browser/policy:path_parser",
[email protected]dffd8a912014-06-30 23:24:31305 ]
306 }
307 } else {
308 # Configuration policy disabled.
309 sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources,
310 ".", "//chrome")
311 }
312
313 if (enable_plugins) {
314 sources += rebase_path(gypi_values.chrome_browser_plugins_sources,
315 ".", "//chrome")
316 deps += [
James Robinson2ed4d692014-09-17 05:20:58317 "//components/pdf/browser",
[email protected]dffd8a912014-06-30 23:24:31318 "//ppapi:ppapi_ipc",
thestig11b815e92014-08-26 00:32:14319 "//third_party/adobe/flash:flapper_version_h",
[email protected]dffd8a912014-06-30 23:24:31320 ]
321 }
322 if (safe_browsing_mode != 0) {
323 sources += rebase_path(
324 gypi_values.chrome_browser_basic_safe_browsing_sources,
325 ".", "//chrome")
326 deps += [
[email protected]fca567b2014-07-02 17:37:34327 "//chrome/browser/safe_browsing:chunk_proto",
mattm022138b52014-09-23 01:05:45328 "//chrome/browser/safe_browsing:metadata_proto",
[email protected]fca567b2014-07-02 17:37:34329 "//chrome/browser/safe_browsing:report_proto",
[email protected]dffd8a912014-06-30 23:24:31330 ]
331 if (safe_browsing_mode == 1) {
332 sources += rebase_path(
333 gypi_values.chrome_browser_full_safe_browsing_sources,
334 ".", "//chrome")
335 defines += [ "FULL_SAFE_BROWSING" ]
336 deps += [
[email protected]fca567b2014-07-02 17:37:34337 "//chrome/common/safe_browsing:proto",
[email protected]dffd8a912014-06-30 23:24:31338 ]
339 } else if (safe_browsing_mode == 2) {
340 defines += [ "MOBILE_SAFE_BROWSING" ]
341 }
342 }
343
344 if (is_linux) {
[email protected]797b25042014-07-01 23:54:17345 configs += [ "//build/config/linux:udev" ]
346 deps += [ "//device/media_transfer_protocol" ]
[email protected]dffd8a912014-06-30 23:24:31347 }
348 if (is_linux && !is_chromeos) {
[email protected]fd98b612014-07-09 22:11:47349 deps += [ "//third_party/speech-dispatcher" ]
[email protected]dffd8a912014-06-30 23:24:31350 }
351
352 if (is_chromeos) {
353 sources += rebase_path(gypi_values.chrome_browser_chromeos_sources,
354 ".", "//chrome")
355 deps += [
356 #"browser_chromeos", TODO(GYP)
357 ]
358 } else {
359 # Non-ChromeOS.
360 sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources,
361 ".", "//chrome")
362 }
363
364 if (use_cups) {
[email protected]604828c2014-07-02 20:39:12365 configs += [ "//printing:cups" ]
[email protected]dffd8a912014-06-30 23:24:31366 }
367 if (is_desktop_linux) {
368 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources,
369 ".", "//chrome")
[email protected]fca567b2014-07-02 17:37:34370 configs += [ "//build/config/linux:gnome_keyring" ]
[email protected]dffd8a912014-06-30 23:24:31371 }
372 if (use_aura) {
373 sources += rebase_path(gypi_values.chrome_browser_aura_sources,
374 ".", "//chrome")
375 deps += [
[email protected]fca567b2014-07-02 17:37:34376 "//ui/aura",
377 "//ui/compositor",
[email protected]604828c2014-07-02 20:39:12378 "//ui/keyboard",
[email protected]dffd8a912014-06-30 23:24:31379 ]
380 }
381 if (ui_compositor_image_transport) {
382 deps += [ "//ui/gl" ]
383 }
384
[email protected]855b7de2014-07-08 21:02:45385 if (use_ash) {
386 sources += rebase_path(gypi_values.chrome_browser_ash_sources,
387 ".", "//chrome")
388 }
389
[email protected]dffd8a912014-06-30 23:24:31390 if (use_x11) {
391 sources += rebase_path(gypi_values.chrome_browser_x11_sources,
392 ".", "//chrome")
393 if (!is_chromeos) {
[email protected]fca567b2014-07-02 17:37:34394 configs += [ "//build/config/linux:xscrnsaver" ]
[email protected]dffd8a912014-06-30 23:24:31395 }
396 }
397 if (is_posix && !is_mac && !is_ios) {
398 sources += [
rseseka0a7a042014-09-18 23:59:20399 "//chrome/app/chrome_crash_reporter_client.cc",
400 "//chrome/app/chrome_crash_reporter_client.h",
[email protected]dffd8a912014-06-30 23:24:31401 ]
402 deps += [
Robert Sesekabcd8102014-08-27 16:12:44403 "//components/crash/app",
404 "//components/crash/browser",
[email protected]dffd8a912014-06-30 23:24:31405 ]
406 }
407 if (use_nss_certs) {
408 sources += rebase_path(gypi_values.chrome_browser_nss_sources,
409 ".", "//chrome")
410 }
411 if (enable_notifications) {
412 sources += rebase_path(gypi_values.chrome_browser_notifications_sources,
413 ".", "//chrome")
414 if (!is_android) {
415 sources += rebase_path(
416 gypi_values.chrome_browser_non_android_notifications_sources,
417 ".", "//chrome")
418 }
419 }
420 if (enable_themes) {
421 sources += rebase_path(gypi_values.chrome_browser_themes_sources,
422 ".", "//chrome")
423 }
424
[email protected]b46e7e92014-07-22 21:49:52425 if (printing_mode != 0) {
[email protected]dffd8a912014-06-30 23:24:31426 # Some form of printing support.
427 sources += rebase_path(gypi_values.chrome_browser_basic_printing_sources,
428 ".", "//chrome")
429 deps += [
[email protected]55699f392014-08-20 22:16:30430 "//printing",
[email protected]dffd8a912014-06-30 23:24:31431 ]
vitalybuka36259ca2014-08-28 23:42:24432 if (is_win) {
[email protected]dffd8a912014-06-30 23:24:31433 sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources,
434 ".", "//chrome")
435 }
[email protected]b46e7e92014-07-22 21:49:52436 if (printing_mode == 1) {
[email protected]dffd8a912014-06-30 23:24:31437 # Full printing on top of the above.
438 sources += rebase_path(gypi_values.chrome_browser_full_printing_sources,
439 ".", "//chrome")
[email protected]b46e7e92014-07-22 21:49:52440 } else if (printing_mode == 2) {
[email protected]dffd8a912014-06-30 23:24:31441 # Partial-only printing support.
442 sources += rebase_path(
443 gypi_values.chrome_browser_basic_only_printing_sources,
444 ".", "//chrome")
445 }
446 }
447 if (enable_captive_portal_detection) {
448 sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources,
449 ".", "//chrome")
450 }
451 if (enable_session_service) {
452 sources += rebase_path(gypi_values.chrome_browser_session_service_sources,
453 ".", "//chrome")
454 }
455
456 if (is_android || is_ios) {
457 # Mobile.
458 sources += rebase_path(gypi_values.chrome_browser_mobile_sources,
459 ".", "//chrome")
460 } else {
461 # Non-mobile.
462 sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
463 ".", "//chrome")
reillyge471fab2014-08-29 01:58:43464 deps += [
reillyge471fab2014-08-29 01:58:43465 "//device/core",
reillygd77718d2014-09-04 00:57:56466 "//device/usb",
reillyge471fab2014-08-29 01:58:43467 ]
[email protected]dffd8a912014-06-30 23:24:31468 }
469
470 if (is_android) {
471 sources += rebase_path(gypi_values.chrome_browser_android_sources,
472 ".", "//chrome")
473 deps += [
James Robinson2ed4d692014-09-17 05:20:58474 ":jni_headers",
[email protected]55699f392014-08-20 22:16:30475 "//components/cdm/browser",
[email protected]dffd8a912014-06-30 23:24:31476 #"../components/components.gyp:web_contents_delegate_android", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31477 ]
478 deps -= [
[email protected]fca567b2014-07-02 17:37:34479 "//third_party/libaddressinput",
[email protected]abd4b682014-07-16 20:26:30480 "//components/feedback",
481 "//components/storage_monitor",
[email protected]abd4b682014-07-16 20:26:30482 "//components/web_modal",
[email protected]dffd8a912014-06-30 23:24:31483 ]
484 } else {
485 sources += rebase_path(gypi_values.chrome_browser_non_android_sources,
486 ".", "//chrome")
487 }
488
489 if (is_mac) {
490 deps += [
[email protected]6b5d2f92014-07-30 00:40:03491 "//third_party/google_toolbox_for_mac",
[email protected]dffd8a912014-06-30 23:24:31492 #"../third_party/mozilla/mozilla.gyp:mozilla", TODO(GYP)
493 ]
494 libs += [
495 "Accelerate.framework",
496 "AddressBook.framework",
497 "AudioUnit.framework",
498 "DiskArbitration.framework",
499 "IOKit.framework",
500 "ImageCaptureCore.framework",
501 "OpenGL.framework",
502 "QuartzCore.framework",
503 "SecurityInterface.framework",
504 ]
505 }
506
507 if (enable_rlz) {
508 sources += rebase_path(gypi_values.chrome_browser_rlz_sources,
509 ".", "//chrome")
510 deps += [ "//rlz:rlz_lib" ]
511 }
512
513 # TODO(GYP)
514 # Temporary fix to break the browser target into smaller chunks so it
515 # will link with goma builds.
516 #["OS=="win" and chromium_win_pch==0", {
517 # "msvs_shard": 4,
518 #}],
519
520 if (is_win) {
521 sources += rebase_path(gypi_values.chrome_browser_win_sources,
522 ".", "//chrome")
Brett Wilsone53895272014-09-23 23:41:46523 public_deps += [
524 "//ui/views",
525 "//ui/views/controls/webview",
526 ]
[email protected]dffd8a912014-06-30 23:24:31527 deps += [
[email protected]55699f392014-08-20 22:16:30528 "//chrome:version_header",
529 "//chrome/installer/util:strings",
530 "//third_party/iaccessible2",
531 "//third_party/isimpledom",
[email protected]dffd8a912014-06-30 23:24:31532 "//third_party/wtl",
533 #"chrome_process_finder", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31534 #"../chrome_elf/chrome_elf.gyp:chrome_elf", TODO(GYP)
535 #"../chrome_elf/chrome_elf.gyp:chrome_elf_constants", TODO(GYP)
536 #"../chrome_elf/chrome_elf.gyp:dll_hash", TODO(GYP)
537 #"../google_update/google_update.gyp:google_update", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31538 #"../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31539 #"../win8/win8.gyp:metro_viewer", TODO(GYP)
540 ]
[email protected]dffd8a912014-06-30 23:24:31541 } else {
542 # Non-Windows.
543 sources += rebase_path(gypi_values.chrome_browser_non_win_sources,
544 ".", "//chrome")
[email protected]f6dc4ae2014-07-30 00:10:37545 if (toolkit_views) {
[email protected]dffd8a912014-06-30 23:24:31546 deps += [
[email protected]55699f392014-08-20 22:16:30547 "//ui/views",
548 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31549 ]
550 # TODO(GYP) why is this needed? Very susicious.
551 # "include_dirs": [
552 # "<(INTERMEDIATE_DIR)/chrome",
553 # ],
554 }
555 }
556
557 if (is_linux) {
558 sources += rebase_path(gypi_values.chrome_browser_linux_sources,
559 ".", "//chrome")
560 if (use_aura) {
561 configs += [
562 "//build/config/linux:dbus",
563 "//build/config/linux:fontconfig",
564 ]
565 deps += [
566 "//dbus",
567 ]
568 }
569 if (use_x11) {
570 configs += [ "//build/config/linux:x11" ]
571 deps += [ "//ui/gfx/x" ]
572 }
573 }
574
575 if (is_desktop_linux) {
576 sources += rebase_path(gypi_values.chrome_browser_desktop_linux_sources,
577 ".", "//chrome")
578 }
579 if (enable_plugin_installation) {
580 sources += rebase_path(
581 gypi_values.chrome_browser_plugin_installation_sources,
582 ".", "//chrome")
583 }
584 if (enable_app_list) {
585 deps += [
[email protected]55699f392014-08-20 22:16:30586 "//ui/app_list",
[email protected]dffd8a912014-06-30 23:24:31587 ]
588 }
589 if (enable_managed_users) {
590 sources += rebase_path(
591 gypi_values.chrome_browser_supervised_user_sources,
592 ".", "//chrome")
593 }
594 if (enable_webrtc) {
595 sources += rebase_path(
596 gypi_values.chrome_browser_webrtc_sources,
597 ".", "//chrome")
598 }
599 if (enable_service_discovery) {
600 sources += rebase_path(
601 gypi_values.chrome_browser_service_discovery_sources,
602 ".", "//chrome")
603 }
604 if (enable_mdns) {
605 sources += rebase_path(
606 gypi_values.chrome_browser_mdns_sources,
607 ".", "//chrome")
608 }
609 if (!enable_autofill_dialog || is_android || is_ios) {
610 sources -= [
611 "autofill/validation_rules_storage_factory.cc",
612 "autofill/validation_rules_storage_factory.h",
613 ]
614 }
615 if (enable_wifi_bootstrapping) {
616 sources += rebase_path(
617 gypi_values.chrome_browser_wifi_bootstrapping_sources,
618 ".", "//chrome")
619 if (is_win || is_mac) {
620 # TODO(brettw) as of this writing wifi bootstrapping is set on Windows
621 # and Mac, so this test is meaningless. Can we merge these lists?
622 sources += rebase_path(
623 gypi_values.chrome_browser_win_mac_wifi_bootstrapping_sources,
624 ".", "//chrome")
625 }
626 }
627}
628
James Robinson2ed4d692014-09-17 05:20:58629if (is_android) {
630 # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers
631 generate_jni("jni_headers") {
632 sources = rebase_path(
633 gypi_values.chrome_browser_jni_sources, ".", "//chrome")
634 jni_package = "chrome"
635 }
636}
637
[email protected]77ce8022014-06-16 19:29:56638# GYP version: chrome/chrome_resources.gyp:chrome_resources
639# (generate_browser_resources action)
640grit("resources") {
641 source = "browser_resources.grd"
[email protected]48885492014-08-13 11:22:41642 output_dir = "$root_gen_dir/chrome"
[email protected]cb0c67a2014-07-22 16:37:26643 outputs = [
644 "grit/browser_resources.h",
645 "browser_resources.pak",
646 ]
[email protected]77ce8022014-06-16 19:29:56647
648 omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js"
649
650 grit_flags = [
651 "-E", "about_credits_file=" +
652 rebase_path(about_credits_file, root_build_dir),
653 "-E", "additional_modules_list_file=" +
654 rebase_path(additional_modules_list_file, root_build_dir),
655 "-E", "omnibox_mojom_file=" +
656 rebase_path(omnibox_mojom_file, root_build_dir),
657 ]
658
659 deps = [
660 ":about_credits",
661 ":chrome_internal_resources_gen",
[email protected]77ce8022014-06-16 19:29:56662 "//chrome/browser/ui/webui/omnibox:mojo_bindings",
Brett Wilson4263a742014-09-10 00:02:24663 "//mojo/environment:chromium",
[email protected]77ce8022014-06-16 19:29:56664 ]
665}
666
667# GYP version: chrome/chrome_resource.gyp:about_credits
668action("about_credits") {
669 script = "//tools/licenses.py"
670
671 # TODO(phajdan.jr): input dependencies so this can be regenerated
672 # automatically when one of the credits changes. The way this should work is
673 # that licenses.py should write a .d file listing the input dependencies (see
674 # "depfile" in GN).
675 outputs = [ about_credits_file ]
676
677 args = [
678 "credits",
679 rebase_path(about_credits_file, root_build_dir),
680 ]
681}
682
683# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
684# TODO(GYP) write internal action
685if (false) { #if (is_chrome_branded) {
686 action("chrome_internal_resources_gen") {
687 # TODO(GYP)
688 }
689} else {
690 group("chrome_internal_resources_gen") {
691 # Empty placeholder.
692 }
693}
Brett Wilson052ce132014-09-12 19:46:29694
695# In GYP this is part of test_support_common.
696source_set("test_support") {
697 testonly = true
698
699 # Always include this via the main test support target.
700 visibility = [ "//chrome/test:test_support" ]
701
702 sources = [
703 "browsing_data/mock_browsing_data_appcache_helper.cc",
704 "browsing_data/mock_browsing_data_appcache_helper.h",
705 "browsing_data/mock_browsing_data_channel_id_helper.cc",
706 "browsing_data/mock_browsing_data_channel_id_helper.h",
707 "browsing_data/mock_browsing_data_cookie_helper.cc",
708 "browsing_data/mock_browsing_data_cookie_helper.h",
709 "browsing_data/mock_browsing_data_database_helper.cc",
710 "browsing_data/mock_browsing_data_database_helper.h",
711 "browsing_data/mock_browsing_data_file_system_helper.cc",
712 "browsing_data/mock_browsing_data_file_system_helper.h",
713 "browsing_data/mock_browsing_data_flash_lso_helper.cc",
714 "browsing_data/mock_browsing_data_flash_lso_helper.h",
715 "browsing_data/mock_browsing_data_indexed_db_helper.cc",
716 "browsing_data/mock_browsing_data_indexed_db_helper.h",
717 "browsing_data/mock_browsing_data_local_storage_helper.cc",
718 "browsing_data/mock_browsing_data_local_storage_helper.h",
719 "browsing_data/mock_browsing_data_quota_helper.cc",
720 "browsing_data/mock_browsing_data_quota_helper.h",
721 "browsing_data/mock_browsing_data_service_worker_helper.cc",
722 "browsing_data/mock_browsing_data_service_worker_helper.h",
723 "download/download_test_file_activity_observer.cc",
724 "download/download_test_file_activity_observer.h",
725 "download/test_download_shelf.cc",
726 "download/test_download_shelf.h",
727 "extensions/extension_action_test_util.cc",
728 "extensions/extension_action_test_util.h",
729 "invalidation/fake_invalidation_service.cc",
730 "invalidation/fake_invalidation_service.h",
731 "media/fake_desktop_media_list.cc",
732 "media/fake_desktop_media_list.h",
733 "net/dns_probe_test_util.cc",
734 "net/dns_probe_test_util.h",
735 "net/url_request_mock_util.cc",
736 "net/url_request_mock_util.h",
737 "notifications/notification_test_util.cc",
738 "notifications/notification_test_util.h",
739 "password_manager/mock_password_store_service.cc",
740 "password_manager/mock_password_store_service.h",
741 "password_manager/null_password_store_service.cc",
742 "password_manager/null_password_store_service.h",
743 "password_manager/test_password_store_service.cc",
744 "password_manager/test_password_store_service.h",
745 "prefs/pref_service_mock_factory.cc",
746 "prefs/pref_service_mock_factory.h",
747 "profile_resetter/profile_resetter_test_base.cc",
748 "profile_resetter/profile_resetter_test_base.h",
749 "search_engines/template_url_service_factory_test_util.cc",
750 "search_engines/template_url_service_factory_test_util.h",
751 "search_engines/template_url_service_test_util.cc",
752 "search_engines/template_url_service_test_util.h",
753 "sessions/session_service_test_helper.cc",
754 "sessions/session_service_test_helper.h",
755 "signin/fake_account_reconcilor.cc",
756 "signin/fake_account_reconcilor.h",
757 "signin/fake_account_tracker_service.cc",
758 "signin/fake_account_tracker_service.h",
759 "signin/fake_profile_oauth2_token_service.cc",
760 "signin/fake_profile_oauth2_token_service.h",
761 "signin/fake_profile_oauth2_token_service_builder.cc",
762 "signin/fake_profile_oauth2_token_service_builder.h",
763 "signin/fake_signin_manager.cc",
764 "signin/fake_signin_manager.h",
765 "ssl/ssl_client_auth_requestor_mock.cc",
766 "ssl/ssl_client_auth_requestor_mock.h",
767 "sync/glue/local_device_info_provider_mock.cc",
768 "sync/glue/local_device_info_provider_mock.h",
769 "sync/profile_sync_components_factory_mock.cc",
770 "sync/profile_sync_components_factory_mock.h",
771 "sync/profile_sync_service_mock.cc",
772 "sync/profile_sync_service_mock.h",
773 ]
774
Brett Wilsone53895272014-09-23 23:41:46775 public_deps = [
Brett Wilson052ce132014-09-12 19:46:29776 ":browser",
Brett Wilsone53895272014-09-23 23:41:46777 "//chrome/browser/ui:test_support",
778 ]
779 deps = [
Brett Wilson052ce132014-09-12 19:46:29780 "//base:prefs_test_support",
781 "//chrome/browser",
Brett Wilson052ce132014-09-12 19:46:29782 "//chrome/common",
783 "//chrome/common/safe_browsing:proto",
784 "//components/invalidation",
785 "//components/invalidation:test_support",
786 "//components/password_manager/core/browser:test_support",
787 "//components/search_engines:test_support",
788 "//content/test:test_support",
789 "//chrome/app/theme:theme_resources",
790 "//net:test_support",
791 "//skia",
792 "//testing/gmock",
793 "//testing/gtest",
794 "//ui/gfx",
795 ]
796
Brett Wilson052ce132014-09-12 19:46:29797 if (!is_ios) {
798 deps += [
799 "//components/sessions:test_support",
Brett Wilson052ce132014-09-12 19:46:29800 "//google_apis:test_support",
801 ]
802 }
803
James Robinson2ed4d692014-09-17 05:20:58804 if (enable_extensions) {
805 deps += [
806 "//extensions:test_support",
807 ]
808 }
809
Brett Wilson052ce132014-09-12 19:46:29810 if (is_chromeos) {
811 sources += [
812 "chromeos/app_mode/fake_cws.cc",
813 "chromeos/app_mode/fake_cws.h",
814 "chromeos/file_manager/fake_disk_mount_manager.cc",
815 "chromeos/file_manager/fake_disk_mount_manager.h",
816 "chromeos/input_method/mock_candidate_window_controller.cc",
817 "chromeos/input_method/mock_candidate_window_controller.h",
818 "chromeos/input_method/mock_input_method_engine.cc",
819 "chromeos/input_method/mock_input_method_engine.h",
820 "chromeos/input_method/mock_input_method_manager.cc",
821 "chromeos/input_method/mock_input_method_manager.h",
822 "chromeos/login/fake_login_utils.cc",
823 "chromeos/login/fake_login_utils.h",
824 "chromeos/login/mock_login_utils.cc",
825 "chromeos/login/mock_login_utils.h",
826 "chromeos/login/users/avatar/mock_user_image_manager.cc",
827 "chromeos/login/users/avatar/mock_user_image_manager.h",
828 "chromeos/login/users/fake_supervised_user_manager.cc",
829 "chromeos/login/users/fake_supervised_user_manager.h",
830 "chromeos/login/users/fake_user_manager.cc",
831 "chromeos/login/users/fake_user_manager.h",
832 "chromeos/login/users/mock_user_manager.cc",
833 "chromeos/login/users/mock_user_manager.h",
834 "chromeos/login/test/oobe_screen_waiter.cc",
835 "chromeos/login/test/oobe_screen_waiter.h",
836 "chromeos/login/test/js_checker.cc",
837 "chromeos/login/test/js_checker.h",
838 "chromeos/login/ui/mock_login_display.cc",
839 "chromeos/login/ui/mock_login_display.h",
840 "chromeos/login/ui/mock_login_display_host.cc",
841 "chromeos/login/ui/mock_login_display_host.h",
842 "chromeos/net/network_portal_detector_test_utils.cc",
843 "chromeos/net/network_portal_detector_test_utils.h",
844 "chromeos/policy/cloud_external_data_manager_base_test_util.cc",
845 "chromeos/policy/cloud_external_data_manager_base_test_util.h",
846 "chromeos/policy/device_policy_builder.cc",
847 "chromeos/policy/device_policy_builder.h",
848 "chromeos/policy/fake_device_cloud_policy_initializer.cc",
849 "chromeos/policy/fake_device_cloud_policy_initializer.h",
850 "chromeos/policy/stub_enterprise_install_attributes.cc",
851 "chromeos/policy/stub_enterprise_install_attributes.h",
852 "chromeos/settings/device_settings_test_helper.cc",
853 "chromeos/settings/device_settings_test_helper.h",
854 "chromeos/system/fake_input_device_settings.cc",
855 "chromeos/system/fake_input_device_settings.h",
856 ]
857 configs += [ "//build/config/linux:dbus" ]
858 #deps += [ "//chromeos:test_support" ] TODO(GYP)
859 }
860
861 if (enable_configuration_policy) {
862 sources += [
863 "policy/test/local_policy_test_server.cc",
864 "policy/test/local_policy_test_server.h",
865 ]
Brett Wilsone53895272014-09-23 23:41:46866 public_deps += [
Brett Wilson052ce132014-09-12 19:46:29867 "//components/policy:policy_component_test_support",
868 "//components/policy:test_support",
869 ]
Brett Wilson052ce132014-09-12 19:46:29870 }
871
872 if (safe_browsing_mode == 1) {
873 sources += [
874 "extensions/fake_safe_browsing_database_manager.cc",
875 "extensions/fake_safe_browsing_database_manager.h",
876 ]
877 }
878
879 if (enable_extensions) {
880 sources += [
881 "drive/dummy_drive_service.cc",
882 "drive/dummy_drive_service.h",
883 "drive/fake_drive_service.cc",
884 "drive/fake_drive_service.h",
885 "drive/test_util.cc",
886 "drive/test_util.h",
887 "extensions/api/messaging/native_messaging_test_util.cc",
888 "extensions/api/messaging/native_messaging_test_util.h",
889 "extensions/extension_notification_observer.cc",
890 "extensions/extension_notification_observer.h",
Brett Wilson052ce132014-09-12 19:46:29891 "extensions/mock_extension_special_storage_policy.cc",
892 "extensions/mock_extension_special_storage_policy.h",
893 "extensions/test_blacklist.cc",
894 "extensions/test_blacklist.h",
895 "extensions/test_blacklist_state_fetcher.cc",
896 "extensions/test_blacklist_state_fetcher.h",
897 "extensions/test_extension_environment.cc",
898 "extensions/test_extension_environment.h",
899 "extensions/test_extension_prefs.cc",
900 "extensions/test_extension_prefs.h",
901 "extensions/test_extension_service.cc",
902 "extensions/test_extension_service.h",
903 "extensions/test_extension_system.cc",
904 "extensions/test_extension_system.h",
905 "media_galleries/media_galleries_test_util.cc",
906 "media_galleries/media_galleries_test_util.h",
907 ]
908 deps += [
909 "//components/storage_monitor:test_support",
910 ]
911 }
912
913 if (enable_mdns) {
914 sources += [
915 "local_discovery/test_service_discovery_client.cc",
916 "local_discovery/test_service_discovery_client.h",
917 ]
918 }
919
920 if (enable_app_list) {
921 sources += [
922 "ui/app_list/test/chrome_app_list_test_support.cc",
923 "ui/app_list/test/chrome_app_list_test_support.h",
924 ]
925 }
926
927 if (enable_wifi_bootstrapping) {
928 sources += [
929 "local_discovery/wifi/mock_wifi_manager.cc",
930 "local_discovery/wifi/mock_wifi_manager.h",
931 ]
932 }
933}