blob: 4310ebbc5165dd074b9ad23168a6993d555da024 [file] [log] [blame]
[email protected]77ce8022014-06-16 19:29:561# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]dffd8a912014-06-30 23:24:315import("//build/config/crypto.gni")
6import("//build/config/features.gni")
7import("//build/config/ui.gni")
[email protected]449ceab2014-07-29 22:43:518import("//components/nacl/nacl_defines.gni")
James Robinson2ed4d692014-09-17 05:20:589# //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which
10# produces a conflict for the "grit" template so we have to only include one.
11if (is_android) {
12 import("//build/config/android/rules.gni")
13} else {
14 import("//tools/grit/grit_rule.gni")
15}
cmasone0a9e4ca2014-10-16 16:40:4916if (is_desktop_linux) {
17 import("//build/config/linux/pkg_config.gni")
18}
[email protected]77ce8022014-06-16 19:29:5619
20about_credits_file = "$target_gen_dir/about_credits.html"
21additional_modules_list_file =
22 "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"
23
[email protected]797b25042014-07-01 23:54:1724gypi_values = exec_script(
25 "//build/gypi_to_gn.py",
26 [ rebase_path("../chrome_browser.gypi") ],
27 "scope",
28 [ "../chrome_browser.gypi" ])
[email protected]dffd8a912014-06-30 23:24:3129
cmasone0a9e4ca2014-10-16 16:40:4930if (is_desktop_linux) {
31 pkg_config("gnome_keyring") {
32 packages = [ "gnome-keyring-1" ]
33 }
34}
35
[email protected]dffd8a912014-06-30 23:24:3136static_library("browser") {
apavlove749bca2014-09-30 11:07:4137 configs += [
38 "//build/config/compiler:wexit_time_destructors",
39 "//third_party/WebKit/public:debug_devtools",
40 ]
[email protected]dffd8a912014-06-30 23:24:3141 defines = []
42 sources = []
43 libs = []
44 ldflags = []
45
46 # iOS/non-iOS shared deps. New dependencies should generally be added in the
47 # non-iOS deps below.
Brett Wilsone53895272014-09-23 23:41:4648 public_deps = [
49 "//components/autofill/core/browser",
50 "//content/public/browser",
51 "//sql",
52 "//sync",
53 ]
[email protected]dffd8a912014-06-30 23:24:3154 deps = [
55 "//base/allocator",
56 "//chrome:extra_resources",
57 "//chrome:resources",
58 "//chrome:strings",
[email protected]797b25042014-07-01 23:54:1759 "//chrome/app:generated_resources_map",
[email protected]855b7de2014-07-08 21:02:4560 "//chrome/app/resources:platform_locale_settings",
[email protected]797b25042014-07-01 23:54:1761 "//chrome/app/theme:theme_resources",
[email protected]855b7de2014-07-08 21:02:4562 "//chrome/browser/history:in_memory_url_index_cache_proto",
[email protected]855b7de2014-07-08 21:02:4563 "//chrome/browser/net:cert_logger_proto",
[email protected]797b25042014-07-01 23:54:1764 "//chrome/browser/net:probe_message_proto",
[email protected]abd4b682014-07-16 20:26:3065 "//chrome/browser/ui",
[email protected]dffd8a912014-06-30 23:24:3166 "//chrome/common",
67 "//chrome/common/net",
[email protected]604828c2014-07-02 20:39:1268 "//components/autofill/core/browser",
Brett Wilson1c693992014-08-25 19:10:0169 "//components/bookmarks/browser",
[email protected]b9f4c682014-07-10 22:00:3770 "//components/captive_portal",
[email protected]fca567b2014-07-02 17:37:3471 "//components/cloud_devices/common",
Brett Wilson1c693992014-08-25 19:10:0172 "//components/component_updater",
vasiliiac461392014-09-18 11:35:1773 "//components/content_settings/core/browser",
[email protected]08f71012014-07-25 10:27:5474 "//components/content_settings/core/common",
[email protected]478ed232014-08-19 02:10:5575 "//components/crx_file",
megjablon3476e042014-10-14 19:21:5976 "//components/data_reduction_proxy/core/browser",
[email protected]273ae5ab2014-07-09 21:10:2577 "//components/domain_reliability",
noyaudaaac3a2014-10-08 11:11:1178 "//components/enhanced_bookmarks",
[email protected]273ae5ab2014-07-09 21:10:2579 "//components/favicon_base",
80 "//components/favicon/core",
[email protected]abd4b682014-07-16 20:26:3081 "//components/feedback",
82 "//components/gcm_driver",
Brett Wilson1c693992014-08-25 19:10:0183 "//components/google/core/browser",
[email protected]273ae5ab2014-07-09 21:10:2584 "//components/history/core/browser",
85 "//components/history/core/common",
Brett Wilson1c693992014-08-25 19:10:0186 "//components/infobars/core",
87 "//components/invalidation",
gunsch1afc65172014-09-16 00:03:3288 "//components/metrics:gpu",
[email protected]fca567b2014-07-02 17:37:3489 "//components/metrics:net",
gunsch840bc412014-09-18 19:38:0690 "//components/metrics:profiler",
Brett Wilson1c693992014-08-25 19:10:0191 "//components/metrics/proto:proto",
[email protected]fca567b2014-07-02 17:37:3492 "//components/navigation_metrics",
Brett Wilson1c693992014-08-25 19:10:0193 "//components/network_time",
rockot89e757c2014-11-13 18:40:0794 "//components/omaha_client",
[email protected]b1c5ab682014-08-07 11:53:1795 "//components/omnibox",
[email protected]fca567b2014-07-02 17:37:3496 "//components/os_crypt",
Brett Wilson1c693992014-08-25 19:10:0197 "//components/password_manager/core/browser",
98 "//components/password_manager/core/common",
[email protected]fca567b2014-07-02 17:37:3499 "//components/policy:policy_component",
Brett Wilson1c693992014-08-25 19:10:01100 "//components/precache/core",
[email protected]fca567b2014-07-02 17:37:34101 "//components/query_parser",
[email protected]b9f4c682014-07-10 22:00:37102 "//components/rappor",
Brett Wilson1c693992014-08-25 19:10:01103 "//components/renderer_context_menu",
[email protected]720b10492014-07-23 08:48:40104 "//components/search",
Brett Wilson1c693992014-08-25 19:10:01105 "//components/search_engines",
106 "//components/search_provider_logos",
[email protected]abd4b682014-07-16 20:26:30107 "//components/signin/core/browser",
108 "//components/startup_metric_utils",
[email protected]797b25042014-07-01 23:54:17109 "//components/strings",
mathp60143a32014-10-08 14:52:45110 "//components/suggestions",
Brett Wilson1c693992014-08-25 19:10:01111 "//components/sync_driver",
[email protected]b9f4c682014-07-10 22:00:37112 "//components/translate/core/browser",
113 "//components/translate/core/common",
[email protected]273ae5ab2014-07-09 21:10:25114 "//components/url_fixer",
[email protected]fca567b2014-07-02 17:37:34115 "//components/user_prefs",
isherman3be67db2014-10-24 05:57:44116 "//components/variations",
117 "//components/variations/net",
[email protected]bf4545f2014-07-11 19:49:46118 "//components/webdata/common",
[email protected]dffd8a912014-06-30 23:24:31119 "//content/public/browser",
120 "//content/public/common",
[email protected]604828c2014-07-02 20:39:12121 "//courgette:courgette_lib",
[email protected]dffd8a912014-06-30 23:24:31122 "//crypto",
[email protected]604828c2014-07-02 20:39:12123 "//google_apis",
Brett Wilson8f1323042014-09-11 16:58:56124 "//gpu/config",
ajwongf7b1cb692014-08-23 21:36:22125 "//jingle:notifier",
[email protected]dffd8a912014-06-30 23:24:31126 "//skia",
127 "//sql",
128 "//sync",
[email protected]797b25042014-07-01 23:54:17129 "//third_party/cacheinvalidation",
[email protected]dffd8a912014-06-30 23:24:31130 "//third_party/icu",
131 "//third_party/libxml",
ajwongf7b1cb692014-08-23 21:36:22132 "//third_party/libjingle",
[email protected]dffd8a912014-06-30 23:24:31133 "//third_party/widevine/cdm:version_h",
134 "//third_party/zlib",
135 "//third_party/zlib:minizip",
136 "//third_party/zlib:zip",
137 "//ui/base",
cjhopman09981a92014-10-27 17:11:18138 "//ui/events:events_base",
[email protected]dffd8a912014-06-30 23:24:31139 "//ui/gfx",
140 "//ui/gfx/geometry",
[email protected]a1d7d4f2014-07-16 21:33:36141 "//ui/message_center",
142 "//ui/shell_dialogs",
[email protected]dffd8a912014-06-30 23:24:31143 "//ui/strings",
[email protected]797b25042014-07-01 23:54:17144 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31145 ]
146
danduongd81789642014-09-23 02:50:00147 sources += rebase_path(gypi_values.chrome_browser_undo_sources,
148 ".", "//chrome")
149
[email protected]dffd8a912014-06-30 23:24:31150 if (!is_ios) {
151 sources += rebase_path(gypi_values.chrome_browser_non_ios_sources,
152 ".", "//chrome")
153 #TODO(GYP) Add these sources:
154 # # These files are generated by GRIT.
155 # '<(grit_out_dir)/grit/component_extension_resources_map.cc',
156 # '<(grit_out_dir)/grit/theme_resources_map.cc',
[email protected]a3c134352014-07-11 19:23:19157 # '<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/ui_resources_map.cc',
[email protected]dffd8a912014-06-30 23:24:31158 #
159 # # This file is generated by
160 # # chrome/browser/metrics/variations/generate_resources_map.py
161 # '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc',
162
[email protected]1bb1a6002014-07-24 23:58:56163 defines = nacl_defines
[email protected]797b25042014-07-01 23:54:17164
[email protected]dffd8a912014-06-30 23:24:31165 deps += [
Brett Wilson1c693992014-08-25 19:10:01166 "//apps",
[email protected]dffd8a912014-06-30 23:24:31167 "//cc",
[email protected]55699f392014-08-20 22:16:30168 "//chrome/browser/devtools",
[email protected]55699f392014-08-20 22:16:30169 "//chrome/installer/util",
oshima758abebc2014-11-06 10:55:50170 "//components/app_modal_dialogs",
[email protected]b9f4c682014-07-10 22:00:37171 "//components/autofill/content/browser",
172 "//components/dom_distiller/content",
[email protected]fca567b2014-07-02 17:37:34173 "//components/keyed_service/content",
[email protected]55699f392014-08-20 22:16:30174 "//components/navigation_interception",
175 "//components/password_manager/content/browser",
176 "//components/precache/content",
rohitraod16f44e2014-10-24 15:34:35177 "//components/sessions:sessions_content",
[email protected]abd4b682014-07-16 20:26:30178 "//components/storage_monitor",
[email protected]b9f4c682014-07-10 22:00:37179 "//components/translate/content/browser",
[email protected]fca567b2014-07-02 17:37:34180 "//components/url_matcher",
[email protected]dffd8a912014-06-30 23:24:31181 "//components/visitedlink/browser",
182 "//components/visitedlink/common",
hanxi149b92d2014-09-11 21:57:18183 "//components/web_cache/browser",
[email protected]b9f4c682014-07-10 22:00:37184 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:08185 "//content/app/resources",
[email protected]55699f392014-08-20 22:16:30186 "//media",
187 "//media/cast:net",
cjhopman09981a92014-10-27 17:11:18188 "//mojo/common",
jamesra03ae492014-10-03 04:26:48189 "//mojo/edk/system",
[email protected]604828c2014-07-02 20:39:12190 "//mojo/environment:chromium",
191 "//mojo/public/cpp/bindings",
jamesr60a7dbf2014-11-07 01:24:51192 "//mojo/public/js",
Brett Wilson83fd4242014-09-02 19:45:33193 "//net:extras",
[email protected]dffd8a912014-06-30 23:24:31194 "//net:net_with_v8",
pilgrim4af8c212014-09-05 17:30:15195 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:24196 "//storage/common",
[email protected]4eebe74d2014-08-13 02:54:46197 "//third_party/WebKit/public:resources",
[email protected]dffd8a912014-06-30 23:24:31198 "//third_party/expat",
199 "//third_party/leveldatabase",
[email protected]fca567b2014-07-02 17:37:34200 "//third_party/libaddressinput",
[email protected]dffd8a912014-06-30 23:24:31201 "//third_party/libyuv",
202 "//third_party/npapi",
203 "//third_party/re2",
204 "//third_party/smhasher:cityhash",
Brett Wilson83fd4242014-09-02 19:45:33205 "//third_party/webrtc/modules/desktop_capture",
[email protected]dffd8a912014-06-30 23:24:31206 "//ui/gl",
207 "//ui/surface",
[email protected]604828c2014-07-02 20:39:12208 "//ui/web_dialogs",
[email protected]fca567b2014-07-02 17:37:34209 "//v8",
[email protected]dffd8a912014-06-30 23:24:31210 ## TODO(tonyg): Remove this dependency (crbug.com/280157).
[email protected]55699f392014-08-20 22:16:30211 #"../testing/perf/perf_test.gyp:*", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31212 ]
213 } else { # iOS
214 sources += rebase_path(gypi_values.chrome_browser_ios_sources,
215 ".", "//chrome")
216 deps += [
217 "//net",
218 ]
219 libs += [
220 "CoreTelephony.framework",
221 "CoreText.framework",
222 "MobileCoreServices.framework",
223 "QuartzCore.framework",
224 ]
225 ldflags += [ "-weak_framework", "CoreImage" ]
226 }
227
228 if (is_win || is_mac) {
229 sources += rebase_path(gypi_values.chrome_browser_win_mac_sources,
230 ".", "//chrome")
231 }
232 if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) {
233 sources += [
234 "net/disk_cache_dir_policy_handler.cc",
235 "net/disk_cache_dir_policy_handler.h",
236 ]
237 }
238 if (!is_android && !is_ios && enable_configuration_policy) {
239 sources += [
240 "download/download_dir_policy_handler.cc",
241 "download/download_dir_policy_handler.h",
242 ]
243 }
244 if (is_mac) {
245 sources += rebase_path(gypi_values.chrome_browser_mac_sources,
246 ".", "//chrome")
247 deps += [
248 #"app_shim" TODO(GYP)
tapted63829f72014-09-24 23:50:50249 #"browser_app_shim" TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31250 ]
251 }
erikchen96e537d52014-10-28 23:43:17252 if (is_mac || is_ios) {
253 sources += rebase_path(gypi_values.chrome_browser_mac_ios_sources,
254 ".", "//chrome")
255 }
[email protected]dffd8a912014-06-30 23:24:31256 if (enable_extensions) {
Brett Wilsone53895272014-09-23 23:41:46257 public_deps += [ "//chrome/browser/extensions" ]
[email protected]cc5b3be2014-08-15 23:24:52258 deps += [
[email protected]cc5b3be2014-08-15 23:24:52259 "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
thestige33aa2422014-09-22 22:16:30260 "//chrome/common/extensions/api",
261 "//chrome/common/extensions/api:api_registration",
oshima758abebc2014-11-06 10:55:50262 "//extensions/components/javascript_dialog_extensions_client",
[email protected]cc5b3be2014-08-15 23:24:52263 ]
[email protected]dffd8a912014-06-30 23:24:31264 sources += rebase_path(gypi_values.chrome_browser_extensions_sources,
265 ".", "//chrome")
266 }
267 if (enable_background) {
268 sources += rebase_path(gypi_values.chrome_browser_background_sources,
269 ".", "//chrome")
jamesr29ea2d122014-10-23 10:30:27270 if (!use_aura || is_win || is_chromeos) {
[email protected]dffd8a912014-06-30 23:24:31271 sources -= [ "background/background_mode_manager_aura.cc" ]
272 }
thestig52a87b3b2014-10-23 22:02:38273 defines += [ "ENABLE_BACKGROUND=1" ]
[email protected]dffd8a912014-06-30 23:24:31274 }
275 if (enable_task_manager) {
276 sources += rebase_path(gypi_values.chrome_browser_task_manager_sources,
277 ".", "//chrome")
278 }
279 if (enable_spellcheck) {
280 sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources,
281 ".", "//chrome")
282 deps += [ "//third_party/hunspell" ]
283 }
284 if (enable_nacl) {
285 sources += rebase_path(gypi_values.chrome_browser_nacl_sources,
286 ".", "//chrome")
287 #deps += [ "//components/nacl:nacl_browser" ] TODO(GYP)
288 }
apavlove749bca2014-09-30 11:07:41289
[email protected]dffd8a912014-06-30 23:24:31290 if (enable_configuration_policy) {
291 sources += rebase_path(
292 gypi_values.chrome_browser_policy_shared_with_ios_sources,
293 ".", "//chrome")
294 deps += [
[email protected]604828c2014-07-02 20:39:12295 "//components/policy",
[email protected]797b25042014-07-01 23:54:17296 "//components/policy/proto",
[email protected]dffd8a912014-06-30 23:24:31297 ]
298 if (!is_ios) {
299 sources += rebase_path(
300 gypi_values.chrome_browser_policy_non_ios_sources,
301 ".", "//chrome")
302 }
303 if (!is_chromeos) {
304 sources += rebase_path(
305 gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources,
306 ".", "//chrome")
307 }
308 if (is_win || is_mac || is_desktop_linux) {
309 sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
310 ".", "//chrome")
311 }
cjhopman09981a92014-10-27 17:11:18312 if (is_android || is_ios) {
313 sources += rebase_path(gypi_values.chrome_browser_policy_mobile_sources,
314 ".", "//chrome")
315 } else {
[email protected]dffd8a912014-06-30 23:24:31316 deps += [
Brett Wilson642752142014-08-26 19:05:21317 "//chrome/browser/policy:path_parser",
[email protected]dffd8a912014-06-30 23:24:31318 ]
319 }
320 } else {
321 # Configuration policy disabled.
322 sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources,
323 ".", "//chrome")
324 }
325
326 if (enable_plugins) {
327 sources += rebase_path(gypi_values.chrome_browser_plugins_sources,
328 ".", "//chrome")
329 deps += [
James Robinson2ed4d692014-09-17 05:20:58330 "//components/pdf/browser",
[email protected]dffd8a912014-06-30 23:24:31331 "//ppapi:ppapi_ipc",
thestig11b815e92014-08-26 00:32:14332 "//third_party/adobe/flash:flapper_version_h",
[email protected]dffd8a912014-06-30 23:24:31333 ]
334 }
335 if (safe_browsing_mode != 0) {
336 sources += rebase_path(
337 gypi_values.chrome_browser_basic_safe_browsing_sources,
338 ".", "//chrome")
339 deps += [
[email protected]fca567b2014-07-02 17:37:34340 "//chrome/browser/safe_browsing:chunk_proto",
mattm022138b52014-09-23 01:05:45341 "//chrome/browser/safe_browsing:metadata_proto",
[email protected]fca567b2014-07-02 17:37:34342 "//chrome/browser/safe_browsing:report_proto",
[email protected]dffd8a912014-06-30 23:24:31343 ]
344 if (safe_browsing_mode == 1) {
345 sources += rebase_path(
346 gypi_values.chrome_browser_full_safe_browsing_sources,
347 ".", "//chrome")
348 defines += [ "FULL_SAFE_BROWSING" ]
349 deps += [
[email protected]fca567b2014-07-02 17:37:34350 "//chrome/common/safe_browsing:proto",
[email protected]dffd8a912014-06-30 23:24:31351 ]
352 } else if (safe_browsing_mode == 2) {
353 defines += [ "MOBILE_SAFE_BROWSING" ]
354 }
355 }
356
357 if (is_linux) {
[email protected]797b25042014-07-01 23:54:17358 configs += [ "//build/config/linux:udev" ]
359 deps += [ "//device/media_transfer_protocol" ]
[email protected]dffd8a912014-06-30 23:24:31360 }
361 if (is_linux && !is_chromeos) {
[email protected]fd98b612014-07-09 22:11:47362 deps += [ "//third_party/speech-dispatcher" ]
[email protected]dffd8a912014-06-30 23:24:31363 }
364
365 if (is_chromeos) {
366 sources += rebase_path(gypi_values.chrome_browser_chromeos_sources,
367 ".", "//chrome")
368 deps += [
mukai8c99b882014-10-15 03:07:59369 "//chrome/browser/chromeos",
[email protected]dffd8a912014-06-30 23:24:31370 ]
371 } else {
372 # Non-ChromeOS.
373 sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources,
374 ".", "//chrome")
375 }
376
mukai8c99b882014-10-15 03:07:59377 if (is_chromeos || is_ios) {
378 sources -= [
379 "metrics/signin_status_metrics_provider.cc",
380 "metrics/signin_status_metrics_provider.h",
381 ]
382 }
383
[email protected]dffd8a912014-06-30 23:24:31384 if (use_cups) {
[email protected]604828c2014-07-02 20:39:12385 configs += [ "//printing:cups" ]
[email protected]dffd8a912014-06-30 23:24:31386 }
387 if (is_desktop_linux) {
388 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources,
389 ".", "//chrome")
cmasone0a9e4ca2014-10-16 16:40:49390 configs += [ ":gnome_keyring" ]
[email protected]dffd8a912014-06-30 23:24:31391 }
392 if (use_aura) {
393 sources += rebase_path(gypi_values.chrome_browser_aura_sources,
394 ".", "//chrome")
395 deps += [
[email protected]fca567b2014-07-02 17:37:34396 "//ui/aura",
397 "//ui/compositor",
[email protected]604828c2014-07-02 20:39:12398 "//ui/keyboard",
[email protected]dffd8a912014-06-30 23:24:31399 ]
400 }
401 if (ui_compositor_image_transport) {
402 deps += [ "//ui/gl" ]
403 }
404
[email protected]855b7de2014-07-08 21:02:45405 if (use_ash) {
406 sources += rebase_path(gypi_values.chrome_browser_ash_sources,
407 ".", "//chrome")
408 }
409
[email protected]dffd8a912014-06-30 23:24:31410 if (use_x11) {
411 sources += rebase_path(gypi_values.chrome_browser_x11_sources,
412 ".", "//chrome")
413 if (!is_chromeos) {
[email protected]fca567b2014-07-02 17:37:34414 configs += [ "//build/config/linux:xscrnsaver" ]
[email protected]dffd8a912014-06-30 23:24:31415 }
416 }
417 if (is_posix && !is_mac && !is_ios) {
418 sources += [
rseseka0a7a042014-09-18 23:59:20419 "//chrome/app/chrome_crash_reporter_client.cc",
420 "//chrome/app/chrome_crash_reporter_client.h",
[email protected]dffd8a912014-06-30 23:24:31421 ]
422 deps += [
Robert Sesekabcd8102014-08-27 16:12:44423 "//components/crash/app",
424 "//components/crash/browser",
[email protected]dffd8a912014-06-30 23:24:31425 ]
426 }
427 if (use_nss_certs) {
428 sources += rebase_path(gypi_values.chrome_browser_nss_sources,
429 ".", "//chrome")
mukai8c99b882014-10-15 03:07:59430 if (is_chromeos) {
431 sources -= [ "net/nss_context_linux.cc" ]
432 }
[email protected]dffd8a912014-06-30 23:24:31433 }
434 if (enable_notifications) {
435 sources += rebase_path(gypi_values.chrome_browser_notifications_sources,
436 ".", "//chrome")
437 if (!is_android) {
438 sources += rebase_path(
439 gypi_values.chrome_browser_non_android_notifications_sources,
440 ".", "//chrome")
441 }
442 }
443 if (enable_themes) {
444 sources += rebase_path(gypi_values.chrome_browser_themes_sources,
445 ".", "//chrome")
446 }
447
vitalybuka93eea402014-11-05 23:47:15448 if (enable_basic_printing || enable_print_preview) {
[email protected]dffd8a912014-06-30 23:24:31449 # Some form of printing support.
450 sources += rebase_path(gypi_values.chrome_browser_basic_printing_sources,
451 ".", "//chrome")
452 deps += [
[email protected]55699f392014-08-20 22:16:30453 "//printing",
[email protected]dffd8a912014-06-30 23:24:31454 ]
vitalybuka36259ca2014-08-28 23:42:24455 if (is_win) {
[email protected]dffd8a912014-06-30 23:24:31456 sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources,
457 ".", "//chrome")
458 }
vitalybuka93eea402014-11-05 23:47:15459 if (enable_print_preview) {
[email protected]dffd8a912014-06-30 23:24:31460 # Full printing on top of the above.
461 sources += rebase_path(gypi_values.chrome_browser_full_printing_sources,
462 ".", "//chrome")
vitalybuka93eea402014-11-05 23:47:15463 } else {
[email protected]dffd8a912014-06-30 23:24:31464 # Partial-only printing support.
465 sources += rebase_path(
466 gypi_values.chrome_browser_basic_only_printing_sources,
467 ".", "//chrome")
468 }
469 }
470 if (enable_captive_portal_detection) {
471 sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources,
472 ".", "//chrome")
473 }
474 if (enable_session_service) {
475 sources += rebase_path(gypi_values.chrome_browser_session_service_sources,
476 ".", "//chrome")
477 }
478
thestigdc377202014-10-28 22:06:02479 if (!is_android && !is_ios && !is_chromeos) {
480 sources += rebase_path(gypi_values.chrome_browser_desktop_sources,
481 ".", "//chrome")
482 }
483
[email protected]dffd8a912014-06-30 23:24:31484 if (is_android || is_ios) {
485 # Mobile.
486 sources += rebase_path(gypi_values.chrome_browser_mobile_sources,
487 ".", "//chrome")
488 } else {
489 # Non-mobile.
490 sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
491 ".", "//chrome")
reillyge471fab2014-08-29 01:58:43492 deps += [
reillyge471fab2014-08-29 01:58:43493 "//device/core",
reillygd77718d2014-09-04 00:57:56494 "//device/usb",
reillyge471fab2014-08-29 01:58:43495 ]
[email protected]dffd8a912014-06-30 23:24:31496 }
497
498 if (is_android) {
499 sources += rebase_path(gypi_values.chrome_browser_android_sources,
500 ".", "//chrome")
501 deps += [
James Robinson2ed4d692014-09-17 05:20:58502 ":jni_headers",
[email protected]55699f392014-08-20 22:16:30503 "//components/cdm/browser",
cjhopman09981a92014-10-27 17:11:18504 "//components/enhanced_bookmarks",
505 "//components/history/core/android",
estadee37f8222014-11-07 21:35:22506 "//components/resources:components_resources",
cjhopman09981a92014-10-27 17:11:18507 "//components/web_contents_delegate_android",
508 "//third_party/android_opengl/etc1",
[email protected]dffd8a912014-06-30 23:24:31509 ]
510 deps -= [
[email protected]fca567b2014-07-02 17:37:34511 "//third_party/libaddressinput",
[email protected]abd4b682014-07-16 20:26:30512 "//components/feedback",
513 "//components/storage_monitor",
[email protected]abd4b682014-07-16 20:26:30514 "//components/web_modal",
[email protected]dffd8a912014-06-30 23:24:31515 ]
516 } else {
517 sources += rebase_path(gypi_values.chrome_browser_non_android_sources,
518 ".", "//chrome")
519 }
520
521 if (is_mac) {
522 deps += [
[email protected]6b5d2f92014-07-30 00:40:03523 "//third_party/google_toolbox_for_mac",
[email protected]dffd8a912014-06-30 23:24:31524 #"../third_party/mozilla/mozilla.gyp:mozilla", TODO(GYP)
525 ]
526 libs += [
527 "Accelerate.framework",
528 "AddressBook.framework",
529 "AudioUnit.framework",
530 "DiskArbitration.framework",
531 "IOKit.framework",
532 "ImageCaptureCore.framework",
533 "OpenGL.framework",
534 "QuartzCore.framework",
535 "SecurityInterface.framework",
536 ]
537 }
538
539 if (enable_rlz) {
540 sources += rebase_path(gypi_values.chrome_browser_rlz_sources,
541 ".", "//chrome")
542 deps += [ "//rlz:rlz_lib" ]
543 }
544
545 # TODO(GYP)
546 # Temporary fix to break the browser target into smaller chunks so it
547 # will link with goma builds.
548 #["OS=="win" and chromium_win_pch==0", {
549 # "msvs_shard": 4,
550 #}],
551
552 if (is_win) {
553 sources += rebase_path(gypi_values.chrome_browser_win_sources,
554 ".", "//chrome")
grtaa9d8d22014-11-13 19:52:36555 if (!is_chrome_branded) {
556 sources -= [
557 "google/did_run_updater_win.cc",
558 "google/did_run_updater_win.h",
559 ]
560 }
Brett Wilsone53895272014-09-23 23:41:46561 public_deps += [
562 "//ui/views",
563 "//ui/views/controls/webview",
564 ]
[email protected]dffd8a912014-06-30 23:24:31565 deps += [
[email protected]55699f392014-08-20 22:16:30566 "//chrome:version_header",
567 "//chrome/installer/util:strings",
568 "//third_party/iaccessible2",
569 "//third_party/isimpledom",
[email protected]dffd8a912014-06-30 23:24:31570 "//third_party/wtl",
571 #"chrome_process_finder", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31572 #"../chrome_elf/chrome_elf.gyp:chrome_elf", TODO(GYP)
573 #"../chrome_elf/chrome_elf.gyp:chrome_elf_constants", TODO(GYP)
574 #"../chrome_elf/chrome_elf.gyp:dll_hash", TODO(GYP)
575 #"../google_update/google_update.gyp:google_update", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31576 #"../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31577 #"../win8/win8.gyp:metro_viewer", TODO(GYP)
578 ]
[email protected]dffd8a912014-06-30 23:24:31579 } else {
580 # Non-Windows.
581 sources += rebase_path(gypi_values.chrome_browser_non_win_sources,
582 ".", "//chrome")
[email protected]f6dc4ae2014-07-30 00:10:37583 if (toolkit_views) {
[email protected]dffd8a912014-06-30 23:24:31584 deps += [
[email protected]55699f392014-08-20 22:16:30585 "//ui/views",
586 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31587 ]
588 # TODO(GYP) why is this needed? Very susicious.
589 # "include_dirs": [
590 # "<(INTERMEDIATE_DIR)/chrome",
591 # ],
592 }
593 }
594
595 if (is_linux) {
596 sources += rebase_path(gypi_values.chrome_browser_linux_sources,
597 ".", "//chrome")
598 if (use_aura) {
599 configs += [
600 "//build/config/linux:dbus",
601 "//build/config/linux:fontconfig",
602 ]
603 deps += [
604 "//dbus",
605 ]
606 }
607 if (use_x11) {
608 configs += [ "//build/config/linux:x11" ]
609 deps += [ "//ui/gfx/x" ]
610 }
611 }
612
613 if (is_desktop_linux) {
614 sources += rebase_path(gypi_values.chrome_browser_desktop_linux_sources,
615 ".", "//chrome")
616 }
617 if (enable_plugin_installation) {
618 sources += rebase_path(
619 gypi_values.chrome_browser_plugin_installation_sources,
620 ".", "//chrome")
621 }
622 if (enable_app_list) {
623 deps += [
[email protected]55699f392014-08-20 22:16:30624 "//ui/app_list",
[email protected]dffd8a912014-06-30 23:24:31625 ]
626 }
627 if (enable_managed_users) {
628 sources += rebase_path(
629 gypi_values.chrome_browser_supervised_user_sources,
630 ".", "//chrome")
631 }
632 if (enable_webrtc) {
633 sources += rebase_path(
634 gypi_values.chrome_browser_webrtc_sources,
635 ".", "//chrome")
636 }
637 if (enable_service_discovery) {
638 sources += rebase_path(
639 gypi_values.chrome_browser_service_discovery_sources,
640 ".", "//chrome")
641 }
642 if (enable_mdns) {
643 sources += rebase_path(
644 gypi_values.chrome_browser_mdns_sources,
645 ".", "//chrome")
646 }
647 if (!enable_autofill_dialog || is_android || is_ios) {
648 sources -= [
649 "autofill/validation_rules_storage_factory.cc",
650 "autofill/validation_rules_storage_factory.h",
651 ]
652 }
653 if (enable_wifi_bootstrapping) {
654 sources += rebase_path(
655 gypi_values.chrome_browser_wifi_bootstrapping_sources,
656 ".", "//chrome")
657 if (is_win || is_mac) {
658 # TODO(brettw) as of this writing wifi bootstrapping is set on Windows
659 # and Mac, so this test is meaningless. Can we merge these lists?
660 sources += rebase_path(
661 gypi_values.chrome_browser_win_mac_wifi_bootstrapping_sources,
662 ".", "//chrome")
663 }
664 }
665}
666
James Robinson2ed4d692014-09-17 05:20:58667if (is_android) {
668 # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers
669 generate_jni("jni_headers") {
670 sources = rebase_path(
671 gypi_values.chrome_browser_jni_sources, ".", "//chrome")
672 jni_package = "chrome"
673 }
674}
675
[email protected]77ce8022014-06-16 19:29:56676# GYP version: chrome/chrome_resources.gyp:chrome_resources
677# (generate_browser_resources action)
678grit("resources") {
679 source = "browser_resources.grd"
[email protected]48885492014-08-13 11:22:41680 output_dir = "$root_gen_dir/chrome"
[email protected]cb0c67a2014-07-22 16:37:26681 outputs = [
682 "grit/browser_resources.h",
683 "browser_resources.pak",
684 ]
[email protected]77ce8022014-06-16 19:29:56685
686 omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js"
687
688 grit_flags = [
689 "-E", "about_credits_file=" +
690 rebase_path(about_credits_file, root_build_dir),
691 "-E", "additional_modules_list_file=" +
692 rebase_path(additional_modules_list_file, root_build_dir),
693 "-E", "omnibox_mojom_file=" +
694 rebase_path(omnibox_mojom_file, root_build_dir),
695 ]
696
697 deps = [
698 ":about_credits",
699 ":chrome_internal_resources_gen",
[email protected]77ce8022014-06-16 19:29:56700 "//chrome/browser/ui/webui/omnibox:mojo_bindings",
Brett Wilson4263a742014-09-10 00:02:24701 "//mojo/environment:chromium",
[email protected]77ce8022014-06-16 19:29:56702 ]
703}
704
705# GYP version: chrome/chrome_resource.gyp:about_credits
706action("about_credits") {
707 script = "//tools/licenses.py"
708
709 # TODO(phajdan.jr): input dependencies so this can be regenerated
710 # automatically when one of the credits changes. The way this should work is
711 # that licenses.py should write a .d file listing the input dependencies (see
712 # "depfile" in GN).
713 outputs = [ about_credits_file ]
714
715 args = [
716 "credits",
717 rebase_path(about_credits_file, root_build_dir),
718 ]
719}
720
721# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
engedy99d0e11b2014-09-30 13:32:41722if (is_chrome_branded) {
[email protected]77ce8022014-06-16 19:29:56723 action("chrome_internal_resources_gen") {
engedy99d0e11b2014-09-30 13:32:41724 script = "internal/transform_additional_modules_list.py"
725 sources = [ "internal/resources/additional_modules_list.input" ]
726 outputs = [ additional_modules_list_file ]
727 args = rebase_path(sources, root_build_dir) +
728 rebase_path(outputs, root_build_dir)
[email protected]77ce8022014-06-16 19:29:56729 }
730} else {
731 group("chrome_internal_resources_gen") {
732 # Empty placeholder.
733 }
734}
Brett Wilson052ce132014-09-12 19:46:29735
736# In GYP this is part of test_support_common.
737source_set("test_support") {
738 testonly = true
739
740 # Always include this via the main test support target.
741 visibility = [ "//chrome/test:test_support" ]
742
743 sources = [
744 "browsing_data/mock_browsing_data_appcache_helper.cc",
745 "browsing_data/mock_browsing_data_appcache_helper.h",
746 "browsing_data/mock_browsing_data_channel_id_helper.cc",
747 "browsing_data/mock_browsing_data_channel_id_helper.h",
748 "browsing_data/mock_browsing_data_cookie_helper.cc",
749 "browsing_data/mock_browsing_data_cookie_helper.h",
750 "browsing_data/mock_browsing_data_database_helper.cc",
751 "browsing_data/mock_browsing_data_database_helper.h",
752 "browsing_data/mock_browsing_data_file_system_helper.cc",
753 "browsing_data/mock_browsing_data_file_system_helper.h",
754 "browsing_data/mock_browsing_data_flash_lso_helper.cc",
755 "browsing_data/mock_browsing_data_flash_lso_helper.h",
756 "browsing_data/mock_browsing_data_indexed_db_helper.cc",
757 "browsing_data/mock_browsing_data_indexed_db_helper.h",
758 "browsing_data/mock_browsing_data_local_storage_helper.cc",
759 "browsing_data/mock_browsing_data_local_storage_helper.h",
760 "browsing_data/mock_browsing_data_quota_helper.cc",
761 "browsing_data/mock_browsing_data_quota_helper.h",
762 "browsing_data/mock_browsing_data_service_worker_helper.cc",
763 "browsing_data/mock_browsing_data_service_worker_helper.h",
764 "download/download_test_file_activity_observer.cc",
765 "download/download_test_file_activity_observer.h",
766 "download/test_download_shelf.cc",
767 "download/test_download_shelf.h",
Brett Wilson052ce132014-09-12 19:46:29768 "invalidation/fake_invalidation_service.cc",
769 "invalidation/fake_invalidation_service.h",
770 "media/fake_desktop_media_list.cc",
771 "media/fake_desktop_media_list.h",
772 "net/dns_probe_test_util.cc",
773 "net/dns_probe_test_util.h",
774 "net/url_request_mock_util.cc",
775 "net/url_request_mock_util.h",
776 "notifications/notification_test_util.cc",
777 "notifications/notification_test_util.h",
778 "password_manager/mock_password_store_service.cc",
779 "password_manager/mock_password_store_service.h",
780 "password_manager/null_password_store_service.cc",
781 "password_manager/null_password_store_service.h",
782 "password_manager/test_password_store_service.cc",
783 "password_manager/test_password_store_service.h",
784 "prefs/pref_service_mock_factory.cc",
785 "prefs/pref_service_mock_factory.h",
786 "profile_resetter/profile_resetter_test_base.cc",
787 "profile_resetter/profile_resetter_test_base.h",
788 "search_engines/template_url_service_factory_test_util.cc",
789 "search_engines/template_url_service_factory_test_util.h",
790 "search_engines/template_url_service_test_util.cc",
791 "search_engines/template_url_service_test_util.h",
792 "sessions/session_service_test_helper.cc",
793 "sessions/session_service_test_helper.h",
794 "signin/fake_account_reconcilor.cc",
795 "signin/fake_account_reconcilor.h",
796 "signin/fake_account_tracker_service.cc",
797 "signin/fake_account_tracker_service.h",
798 "signin/fake_profile_oauth2_token_service.cc",
799 "signin/fake_profile_oauth2_token_service.h",
800 "signin/fake_profile_oauth2_token_service_builder.cc",
801 "signin/fake_profile_oauth2_token_service_builder.h",
802 "signin/fake_signin_manager.cc",
803 "signin/fake_signin_manager.h",
804 "ssl/ssl_client_auth_requestor_mock.cc",
805 "ssl/ssl_client_auth_requestor_mock.h",
Brett Wilson052ce132014-09-12 19:46:29806 "sync/profile_sync_components_factory_mock.cc",
807 "sync/profile_sync_components_factory_mock.h",
808 "sync/profile_sync_service_mock.cc",
809 "sync/profile_sync_service_mock.h",
810 ]
811
Brett Wilsone53895272014-09-23 23:41:46812 public_deps = [
Brett Wilson052ce132014-09-12 19:46:29813 ":browser",
Brett Wilsone53895272014-09-23 23:41:46814 "//chrome/browser/ui:test_support",
815 ]
816 deps = [
Brett Wilson052ce132014-09-12 19:46:29817 "//base:prefs_test_support",
818 "//chrome/browser",
Brett Wilson052ce132014-09-12 19:46:29819 "//chrome/common",
820 "//chrome/common/safe_browsing:proto",
821 "//components/invalidation",
822 "//components/invalidation:test_support",
823 "//components/password_manager/core/browser:test_support",
824 "//components/search_engines:test_support",
825 "//content/test:test_support",
826 "//chrome/app/theme:theme_resources",
827 "//net:test_support",
828 "//skia",
829 "//testing/gmock",
830 "//testing/gtest",
831 "//ui/gfx",
832 ]
833
Brett Wilson052ce132014-09-12 19:46:29834 if (!is_ios) {
835 deps += [
836 "//components/sessions:test_support",
Brett Wilson052ce132014-09-12 19:46:29837 "//google_apis:test_support",
838 ]
839 }
840
James Robinson2ed4d692014-09-17 05:20:58841 if (enable_extensions) {
thestig52a87b3b2014-10-23 22:02:38842 sources += [
843 "extensions/extension_action_test_util.cc",
844 "extensions/extension_action_test_util.h",
845 ]
James Robinson2ed4d692014-09-17 05:20:58846 deps += [
847 "//extensions:test_support",
848 ]
849 }
850
Brett Wilson052ce132014-09-12 19:46:29851 if (is_chromeos) {
852 sources += [
853 "chromeos/app_mode/fake_cws.cc",
854 "chromeos/app_mode/fake_cws.h",
855 "chromeos/file_manager/fake_disk_mount_manager.cc",
856 "chromeos/file_manager/fake_disk_mount_manager.h",
857 "chromeos/input_method/mock_candidate_window_controller.cc",
858 "chromeos/input_method/mock_candidate_window_controller.h",
859 "chromeos/input_method/mock_input_method_engine.cc",
860 "chromeos/input_method/mock_input_method_engine.h",
861 "chromeos/input_method/mock_input_method_manager.cc",
862 "chromeos/input_method/mock_input_method_manager.h",
863 "chromeos/login/fake_login_utils.cc",
864 "chromeos/login/fake_login_utils.h",
865 "chromeos/login/mock_login_utils.cc",
866 "chromeos/login/mock_login_utils.h",
867 "chromeos/login/users/avatar/mock_user_image_manager.cc",
868 "chromeos/login/users/avatar/mock_user_image_manager.h",
869 "chromeos/login/users/fake_supervised_user_manager.cc",
870 "chromeos/login/users/fake_supervised_user_manager.h",
871 "chromeos/login/users/fake_user_manager.cc",
872 "chromeos/login/users/fake_user_manager.h",
873 "chromeos/login/users/mock_user_manager.cc",
874 "chromeos/login/users/mock_user_manager.h",
875 "chromeos/login/test/oobe_screen_waiter.cc",
876 "chromeos/login/test/oobe_screen_waiter.h",
877 "chromeos/login/test/js_checker.cc",
878 "chromeos/login/test/js_checker.h",
879 "chromeos/login/ui/mock_login_display.cc",
880 "chromeos/login/ui/mock_login_display.h",
881 "chromeos/login/ui/mock_login_display_host.cc",
882 "chromeos/login/ui/mock_login_display_host.h",
883 "chromeos/net/network_portal_detector_test_utils.cc",
884 "chromeos/net/network_portal_detector_test_utils.h",
885 "chromeos/policy/cloud_external_data_manager_base_test_util.cc",
886 "chromeos/policy/cloud_external_data_manager_base_test_util.h",
887 "chromeos/policy/device_policy_builder.cc",
888 "chromeos/policy/device_policy_builder.h",
889 "chromeos/policy/fake_device_cloud_policy_initializer.cc",
890 "chromeos/policy/fake_device_cloud_policy_initializer.h",
891 "chromeos/policy/stub_enterprise_install_attributes.cc",
892 "chromeos/policy/stub_enterprise_install_attributes.h",
893 "chromeos/settings/device_settings_test_helper.cc",
894 "chromeos/settings/device_settings_test_helper.h",
895 "chromeos/system/fake_input_device_settings.cc",
896 "chromeos/system/fake_input_device_settings.h",
897 ]
898 configs += [ "//build/config/linux:dbus" ]
mukai6ba73552014-10-09 19:05:17899 deps += [ "//chromeos:test_support" ]
Brett Wilson052ce132014-09-12 19:46:29900 }
901
902 if (enable_configuration_policy) {
903 sources += [
904 "policy/test/local_policy_test_server.cc",
905 "policy/test/local_policy_test_server.h",
906 ]
Brett Wilsone53895272014-09-23 23:41:46907 public_deps += [
Brett Wilson052ce132014-09-12 19:46:29908 "//components/policy:policy_component_test_support",
909 "//components/policy:test_support",
910 ]
Brett Wilson052ce132014-09-12 19:46:29911 }
912
913 if (safe_browsing_mode == 1) {
914 sources += [
915 "extensions/fake_safe_browsing_database_manager.cc",
916 "extensions/fake_safe_browsing_database_manager.h",
917 ]
918 }
919
920 if (enable_extensions) {
921 sources += [
922 "drive/dummy_drive_service.cc",
923 "drive/dummy_drive_service.h",
924 "drive/fake_drive_service.cc",
925 "drive/fake_drive_service.h",
926 "drive/test_util.cc",
927 "drive/test_util.h",
928 "extensions/api/messaging/native_messaging_test_util.cc",
929 "extensions/api/messaging/native_messaging_test_util.h",
930 "extensions/extension_notification_observer.cc",
931 "extensions/extension_notification_observer.h",
Brett Wilson052ce132014-09-12 19:46:29932 "extensions/mock_extension_special_storage_policy.cc",
933 "extensions/mock_extension_special_storage_policy.h",
934 "extensions/test_blacklist.cc",
935 "extensions/test_blacklist.h",
936 "extensions/test_blacklist_state_fetcher.cc",
937 "extensions/test_blacklist_state_fetcher.h",
938 "extensions/test_extension_environment.cc",
939 "extensions/test_extension_environment.h",
940 "extensions/test_extension_prefs.cc",
941 "extensions/test_extension_prefs.h",
942 "extensions/test_extension_service.cc",
943 "extensions/test_extension_service.h",
944 "extensions/test_extension_system.cc",
945 "extensions/test_extension_system.h",
946 "media_galleries/media_galleries_test_util.cc",
947 "media_galleries/media_galleries_test_util.h",
948 ]
949 deps += [
950 "//components/storage_monitor:test_support",
951 ]
952 }
953
954 if (enable_mdns) {
955 sources += [
956 "local_discovery/test_service_discovery_client.cc",
957 "local_discovery/test_service_discovery_client.h",
958 ]
959 }
960
961 if (enable_app_list) {
962 sources += [
963 "ui/app_list/test/chrome_app_list_test_support.cc",
964 "ui/app_list/test/chrome_app_list_test_support.h",
965 ]
966 }
967
968 if (enable_wifi_bootstrapping) {
969 sources += [
970 "local_discovery/wifi/mock_wifi_manager.cc",
971 "local_discovery/wifi/mock_wifi_manager.h",
972 ]
973 }
974}