blob: cc431616e260946987ada8d229e5db694d9be447 [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",
94 "//components/omaha_query_params",
[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",
[email protected]b9f4c682014-07-10 22:00:37170 "//components/autofill/content/browser",
171 "//components/dom_distiller/content",
[email protected]fca567b2014-07-02 17:37:34172 "//components/keyed_service/content",
[email protected]55699f392014-08-20 22:16:30173 "//components/navigation_interception",
174 "//components/password_manager/content/browser",
175 "//components/precache/content",
rohitraod16f44e2014-10-24 15:34:35176 "//components/sessions:sessions_content",
[email protected]abd4b682014-07-16 20:26:30177 "//components/storage_monitor",
[email protected]b9f4c682014-07-10 22:00:37178 "//components/translate/content/browser",
[email protected]fca567b2014-07-02 17:37:34179 "//components/url_matcher",
[email protected]dffd8a912014-06-30 23:24:31180 "//components/visitedlink/browser",
181 "//components/visitedlink/common",
hanxi149b92d2014-09-11 21:57:18182 "//components/web_cache/browser",
[email protected]b9f4c682014-07-10 22:00:37183 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:08184 "//content/app/resources",
[email protected]55699f392014-08-20 22:16:30185 "//media",
186 "//media/cast:net",
cjhopman09981a92014-10-27 17:11:18187 "//mojo/common",
jamesra03ae492014-10-03 04:26:48188 "//mojo/edk/system",
[email protected]604828c2014-07-02 20:39:12189 "//mojo/environment:chromium",
190 "//mojo/public/cpp/bindings",
191 "//mojo/public/js/bindings",
Brett Wilson83fd4242014-09-02 19:45:33192 "//net:extras",
[email protected]dffd8a912014-06-30 23:24:31193 "//net:net_with_v8",
pilgrim4af8c212014-09-05 17:30:15194 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:24195 "//storage/common",
[email protected]4eebe74d2014-08-13 02:54:46196 "//third_party/WebKit/public:resources",
[email protected]dffd8a912014-06-30 23:24:31197 "//third_party/expat",
198 "//third_party/leveldatabase",
[email protected]fca567b2014-07-02 17:37:34199 "//third_party/libaddressinput",
[email protected]dffd8a912014-06-30 23:24:31200 "//third_party/libyuv",
201 "//third_party/npapi",
202 "//third_party/re2",
203 "//third_party/smhasher:cityhash",
Brett Wilson83fd4242014-09-02 19:45:33204 "//third_party/webrtc/modules/desktop_capture",
[email protected]dffd8a912014-06-30 23:24:31205 "//ui/gl",
206 "//ui/surface",
[email protected]604828c2014-07-02 20:39:12207 "//ui/web_dialogs",
[email protected]fca567b2014-07-02 17:37:34208 "//v8",
[email protected]dffd8a912014-06-30 23:24:31209 ## TODO(tonyg): Remove this dependency (crbug.com/280157).
[email protected]55699f392014-08-20 22:16:30210 #"../testing/perf/perf_test.gyp:*", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31211 ]
212 } else { # iOS
213 sources += rebase_path(gypi_values.chrome_browser_ios_sources,
214 ".", "//chrome")
215 deps += [
216 "//net",
217 ]
218 libs += [
219 "CoreTelephony.framework",
220 "CoreText.framework",
221 "MobileCoreServices.framework",
222 "QuartzCore.framework",
223 ]
224 ldflags += [ "-weak_framework", "CoreImage" ]
225 }
226
227 if (is_win || is_mac) {
228 sources += rebase_path(gypi_values.chrome_browser_win_mac_sources,
229 ".", "//chrome")
230 }
231 if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) {
232 sources += [
233 "net/disk_cache_dir_policy_handler.cc",
234 "net/disk_cache_dir_policy_handler.h",
235 ]
236 }
237 if (!is_android && !is_ios && enable_configuration_policy) {
238 sources += [
239 "download/download_dir_policy_handler.cc",
240 "download/download_dir_policy_handler.h",
241 ]
242 }
243 if (is_mac) {
244 sources += rebase_path(gypi_values.chrome_browser_mac_sources,
245 ".", "//chrome")
246 deps += [
247 #"app_shim" TODO(GYP)
tapted63829f72014-09-24 23:50:50248 #"browser_app_shim" TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31249 ]
250 }
erikchen96e537d52014-10-28 23:43:17251 if (is_mac || is_ios) {
252 sources += rebase_path(gypi_values.chrome_browser_mac_ios_sources,
253 ".", "//chrome")
254 }
[email protected]dffd8a912014-06-30 23:24:31255 if (cld2_data_source == "component") {
256 sources += [
257 "component_updater/cld_component_installer.cc",
258 "component_updater/cld_component_installer.h",
259 ]
260 }
261 if (enable_extensions) {
Brett Wilsone53895272014-09-23 23:41:46262 public_deps += [ "//chrome/browser/extensions" ]
[email protected]cc5b3be2014-08-15 23:24:52263 deps += [
[email protected]cc5b3be2014-08-15 23:24:52264 "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
thestige33aa2422014-09-22 22:16:30265 "//chrome/common/extensions/api",
266 "//chrome/common/extensions/api:api_registration",
[email protected]cc5b3be2014-08-15 23:24:52267 ]
[email protected]dffd8a912014-06-30 23:24:31268 sources += rebase_path(gypi_values.chrome_browser_extensions_sources,
269 ".", "//chrome")
270 }
271 if (enable_background) {
272 sources += rebase_path(gypi_values.chrome_browser_background_sources,
273 ".", "//chrome")
jamesr29ea2d122014-10-23 10:30:27274 if (!use_aura || is_win || is_chromeos) {
[email protected]dffd8a912014-06-30 23:24:31275 sources -= [ "background/background_mode_manager_aura.cc" ]
276 }
thestig52a87b3b2014-10-23 22:02:38277 defines += [ "ENABLE_BACKGROUND=1" ]
[email protected]dffd8a912014-06-30 23:24:31278 }
279 if (enable_task_manager) {
280 sources += rebase_path(gypi_values.chrome_browser_task_manager_sources,
281 ".", "//chrome")
282 }
283 if (enable_spellcheck) {
284 sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources,
285 ".", "//chrome")
286 deps += [ "//third_party/hunspell" ]
287 }
288 if (enable_nacl) {
289 sources += rebase_path(gypi_values.chrome_browser_nacl_sources,
290 ".", "//chrome")
291 #deps += [ "//components/nacl:nacl_browser" ] TODO(GYP)
292 }
apavlove749bca2014-09-30 11:07:41293
[email protected]dffd8a912014-06-30 23:24:31294 if (enable_configuration_policy) {
295 sources += rebase_path(
296 gypi_values.chrome_browser_policy_shared_with_ios_sources,
297 ".", "//chrome")
298 deps += [
[email protected]604828c2014-07-02 20:39:12299 "//components/policy",
[email protected]797b25042014-07-01 23:54:17300 "//components/policy/proto",
[email protected]dffd8a912014-06-30 23:24:31301 ]
302 if (!is_ios) {
303 sources += rebase_path(
304 gypi_values.chrome_browser_policy_non_ios_sources,
305 ".", "//chrome")
306 }
307 if (!is_chromeos) {
308 sources += rebase_path(
309 gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources,
310 ".", "//chrome")
311 }
312 if (is_win || is_mac || is_desktop_linux) {
313 sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
314 ".", "//chrome")
315 }
cjhopman09981a92014-10-27 17:11:18316 if (is_android || is_ios) {
317 sources += rebase_path(gypi_values.chrome_browser_policy_mobile_sources,
318 ".", "//chrome")
319 } else {
[email protected]dffd8a912014-06-30 23:24:31320 deps += [
Brett Wilson642752142014-08-26 19:05:21321 "//chrome/browser/policy:path_parser",
[email protected]dffd8a912014-06-30 23:24:31322 ]
323 }
324 } else {
325 # Configuration policy disabled.
326 sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources,
327 ".", "//chrome")
328 }
329
330 if (enable_plugins) {
331 sources += rebase_path(gypi_values.chrome_browser_plugins_sources,
332 ".", "//chrome")
333 deps += [
James Robinson2ed4d692014-09-17 05:20:58334 "//components/pdf/browser",
[email protected]dffd8a912014-06-30 23:24:31335 "//ppapi:ppapi_ipc",
thestig11b815e92014-08-26 00:32:14336 "//third_party/adobe/flash:flapper_version_h",
[email protected]dffd8a912014-06-30 23:24:31337 ]
338 }
339 if (safe_browsing_mode != 0) {
340 sources += rebase_path(
341 gypi_values.chrome_browser_basic_safe_browsing_sources,
342 ".", "//chrome")
343 deps += [
[email protected]fca567b2014-07-02 17:37:34344 "//chrome/browser/safe_browsing:chunk_proto",
mattm022138b52014-09-23 01:05:45345 "//chrome/browser/safe_browsing:metadata_proto",
[email protected]fca567b2014-07-02 17:37:34346 "//chrome/browser/safe_browsing:report_proto",
[email protected]dffd8a912014-06-30 23:24:31347 ]
348 if (safe_browsing_mode == 1) {
349 sources += rebase_path(
350 gypi_values.chrome_browser_full_safe_browsing_sources,
351 ".", "//chrome")
352 defines += [ "FULL_SAFE_BROWSING" ]
353 deps += [
[email protected]fca567b2014-07-02 17:37:34354 "//chrome/common/safe_browsing:proto",
[email protected]dffd8a912014-06-30 23:24:31355 ]
356 } else if (safe_browsing_mode == 2) {
357 defines += [ "MOBILE_SAFE_BROWSING" ]
358 }
359 }
360
361 if (is_linux) {
[email protected]797b25042014-07-01 23:54:17362 configs += [ "//build/config/linux:udev" ]
363 deps += [ "//device/media_transfer_protocol" ]
[email protected]dffd8a912014-06-30 23:24:31364 }
365 if (is_linux && !is_chromeos) {
[email protected]fd98b612014-07-09 22:11:47366 deps += [ "//third_party/speech-dispatcher" ]
[email protected]dffd8a912014-06-30 23:24:31367 }
368
369 if (is_chromeos) {
370 sources += rebase_path(gypi_values.chrome_browser_chromeos_sources,
371 ".", "//chrome")
372 deps += [
mukai8c99b882014-10-15 03:07:59373 "//chrome/browser/chromeos",
[email protected]dffd8a912014-06-30 23:24:31374 ]
375 } else {
376 # Non-ChromeOS.
377 sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources,
378 ".", "//chrome")
379 }
380
mukai8c99b882014-10-15 03:07:59381 if (is_chromeos || is_ios) {
382 sources -= [
383 "metrics/signin_status_metrics_provider.cc",
384 "metrics/signin_status_metrics_provider.h",
385 ]
386 }
387
[email protected]dffd8a912014-06-30 23:24:31388 if (use_cups) {
[email protected]604828c2014-07-02 20:39:12389 configs += [ "//printing:cups" ]
[email protected]dffd8a912014-06-30 23:24:31390 }
391 if (is_desktop_linux) {
392 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources,
393 ".", "//chrome")
cmasone0a9e4ca2014-10-16 16:40:49394 configs += [ ":gnome_keyring" ]
[email protected]dffd8a912014-06-30 23:24:31395 }
396 if (use_aura) {
397 sources += rebase_path(gypi_values.chrome_browser_aura_sources,
398 ".", "//chrome")
399 deps += [
[email protected]fca567b2014-07-02 17:37:34400 "//ui/aura",
401 "//ui/compositor",
[email protected]604828c2014-07-02 20:39:12402 "//ui/keyboard",
[email protected]dffd8a912014-06-30 23:24:31403 ]
404 }
405 if (ui_compositor_image_transport) {
406 deps += [ "//ui/gl" ]
407 }
408
[email protected]855b7de2014-07-08 21:02:45409 if (use_ash) {
410 sources += rebase_path(gypi_values.chrome_browser_ash_sources,
411 ".", "//chrome")
412 }
413
[email protected]dffd8a912014-06-30 23:24:31414 if (use_x11) {
415 sources += rebase_path(gypi_values.chrome_browser_x11_sources,
416 ".", "//chrome")
417 if (!is_chromeos) {
[email protected]fca567b2014-07-02 17:37:34418 configs += [ "//build/config/linux:xscrnsaver" ]
[email protected]dffd8a912014-06-30 23:24:31419 }
420 }
421 if (is_posix && !is_mac && !is_ios) {
422 sources += [
rseseka0a7a042014-09-18 23:59:20423 "//chrome/app/chrome_crash_reporter_client.cc",
424 "//chrome/app/chrome_crash_reporter_client.h",
[email protected]dffd8a912014-06-30 23:24:31425 ]
426 deps += [
Robert Sesekabcd8102014-08-27 16:12:44427 "//components/crash/app",
428 "//components/crash/browser",
[email protected]dffd8a912014-06-30 23:24:31429 ]
430 }
431 if (use_nss_certs) {
432 sources += rebase_path(gypi_values.chrome_browser_nss_sources,
433 ".", "//chrome")
mukai8c99b882014-10-15 03:07:59434 if (is_chromeos) {
435 sources -= [ "net/nss_context_linux.cc" ]
436 }
[email protected]dffd8a912014-06-30 23:24:31437 }
438 if (enable_notifications) {
439 sources += rebase_path(gypi_values.chrome_browser_notifications_sources,
440 ".", "//chrome")
441 if (!is_android) {
442 sources += rebase_path(
443 gypi_values.chrome_browser_non_android_notifications_sources,
444 ".", "//chrome")
445 }
446 }
447 if (enable_themes) {
448 sources += rebase_path(gypi_values.chrome_browser_themes_sources,
449 ".", "//chrome")
450 }
451
vitalybuka93eea402014-11-05 23:47:15452 if (enable_basic_printing || enable_print_preview) {
[email protected]dffd8a912014-06-30 23:24:31453 # Some form of printing support.
454 sources += rebase_path(gypi_values.chrome_browser_basic_printing_sources,
455 ".", "//chrome")
456 deps += [
[email protected]55699f392014-08-20 22:16:30457 "//printing",
[email protected]dffd8a912014-06-30 23:24:31458 ]
vitalybuka36259ca2014-08-28 23:42:24459 if (is_win) {
[email protected]dffd8a912014-06-30 23:24:31460 sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources,
461 ".", "//chrome")
462 }
vitalybuka93eea402014-11-05 23:47:15463 if (enable_print_preview) {
[email protected]dffd8a912014-06-30 23:24:31464 # Full printing on top of the above.
465 sources += rebase_path(gypi_values.chrome_browser_full_printing_sources,
466 ".", "//chrome")
vitalybuka93eea402014-11-05 23:47:15467 } else {
[email protected]dffd8a912014-06-30 23:24:31468 # Partial-only printing support.
469 sources += rebase_path(
470 gypi_values.chrome_browser_basic_only_printing_sources,
471 ".", "//chrome")
472 }
473 }
474 if (enable_captive_portal_detection) {
475 sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources,
476 ".", "//chrome")
477 }
478 if (enable_session_service) {
479 sources += rebase_path(gypi_values.chrome_browser_session_service_sources,
480 ".", "//chrome")
481 }
482
thestigdc377202014-10-28 22:06:02483 if (!is_android && !is_ios && !is_chromeos) {
484 sources += rebase_path(gypi_values.chrome_browser_desktop_sources,
485 ".", "//chrome")
486 }
487
[email protected]dffd8a912014-06-30 23:24:31488 if (is_android || is_ios) {
489 # Mobile.
490 sources += rebase_path(gypi_values.chrome_browser_mobile_sources,
491 ".", "//chrome")
492 } else {
493 # Non-mobile.
494 sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
495 ".", "//chrome")
reillyge471fab2014-08-29 01:58:43496 deps += [
reillyge471fab2014-08-29 01:58:43497 "//device/core",
reillygd77718d2014-09-04 00:57:56498 "//device/usb",
reillyge471fab2014-08-29 01:58:43499 ]
[email protected]dffd8a912014-06-30 23:24:31500 }
501
502 if (is_android) {
503 sources += rebase_path(gypi_values.chrome_browser_android_sources,
504 ".", "//chrome")
505 deps += [
James Robinson2ed4d692014-09-17 05:20:58506 ":jni_headers",
[email protected]55699f392014-08-20 22:16:30507 "//components/cdm/browser",
cjhopman09981a92014-10-27 17:11:18508 "//components/enhanced_bookmarks",
509 "//components/history/core/android",
510 "//components/web_contents_delegate_android",
511 "//third_party/android_opengl/etc1",
[email protected]dffd8a912014-06-30 23:24:31512 ]
513 deps -= [
[email protected]fca567b2014-07-02 17:37:34514 "//third_party/libaddressinput",
[email protected]abd4b682014-07-16 20:26:30515 "//components/feedback",
516 "//components/storage_monitor",
[email protected]abd4b682014-07-16 20:26:30517 "//components/web_modal",
[email protected]dffd8a912014-06-30 23:24:31518 ]
519 } else {
520 sources += rebase_path(gypi_values.chrome_browser_non_android_sources,
521 ".", "//chrome")
522 }
523
524 if (is_mac) {
525 deps += [
[email protected]6b5d2f92014-07-30 00:40:03526 "//third_party/google_toolbox_for_mac",
[email protected]dffd8a912014-06-30 23:24:31527 #"../third_party/mozilla/mozilla.gyp:mozilla", TODO(GYP)
528 ]
529 libs += [
530 "Accelerate.framework",
531 "AddressBook.framework",
532 "AudioUnit.framework",
533 "DiskArbitration.framework",
534 "IOKit.framework",
535 "ImageCaptureCore.framework",
536 "OpenGL.framework",
537 "QuartzCore.framework",
538 "SecurityInterface.framework",
539 ]
540 }
541
542 if (enable_rlz) {
543 sources += rebase_path(gypi_values.chrome_browser_rlz_sources,
544 ".", "//chrome")
545 deps += [ "//rlz:rlz_lib" ]
546 }
547
548 # TODO(GYP)
549 # Temporary fix to break the browser target into smaller chunks so it
550 # will link with goma builds.
551 #["OS=="win" and chromium_win_pch==0", {
552 # "msvs_shard": 4,
553 #}],
554
555 if (is_win) {
556 sources += rebase_path(gypi_values.chrome_browser_win_sources,
557 ".", "//chrome")
Brett Wilsone53895272014-09-23 23:41:46558 public_deps += [
559 "//ui/views",
560 "//ui/views/controls/webview",
561 ]
[email protected]dffd8a912014-06-30 23:24:31562 deps += [
[email protected]55699f392014-08-20 22:16:30563 "//chrome:version_header",
564 "//chrome/installer/util:strings",
565 "//third_party/iaccessible2",
566 "//third_party/isimpledom",
[email protected]dffd8a912014-06-30 23:24:31567 "//third_party/wtl",
568 #"chrome_process_finder", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31569 #"../chrome_elf/chrome_elf.gyp:chrome_elf", TODO(GYP)
570 #"../chrome_elf/chrome_elf.gyp:chrome_elf_constants", TODO(GYP)
571 #"../chrome_elf/chrome_elf.gyp:dll_hash", TODO(GYP)
572 #"../google_update/google_update.gyp:google_update", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31573 #"../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31574 #"../win8/win8.gyp:metro_viewer", TODO(GYP)
575 ]
[email protected]dffd8a912014-06-30 23:24:31576 } else {
577 # Non-Windows.
578 sources += rebase_path(gypi_values.chrome_browser_non_win_sources,
579 ".", "//chrome")
[email protected]f6dc4ae2014-07-30 00:10:37580 if (toolkit_views) {
[email protected]dffd8a912014-06-30 23:24:31581 deps += [
[email protected]55699f392014-08-20 22:16:30582 "//ui/views",
583 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31584 ]
585 # TODO(GYP) why is this needed? Very susicious.
586 # "include_dirs": [
587 # "<(INTERMEDIATE_DIR)/chrome",
588 # ],
589 }
590 }
591
592 if (is_linux) {
593 sources += rebase_path(gypi_values.chrome_browser_linux_sources,
594 ".", "//chrome")
595 if (use_aura) {
596 configs += [
597 "//build/config/linux:dbus",
598 "//build/config/linux:fontconfig",
599 ]
600 deps += [
601 "//dbus",
602 ]
603 }
604 if (use_x11) {
605 configs += [ "//build/config/linux:x11" ]
606 deps += [ "//ui/gfx/x" ]
607 }
608 }
609
610 if (is_desktop_linux) {
611 sources += rebase_path(gypi_values.chrome_browser_desktop_linux_sources,
612 ".", "//chrome")
613 }
614 if (enable_plugin_installation) {
615 sources += rebase_path(
616 gypi_values.chrome_browser_plugin_installation_sources,
617 ".", "//chrome")
618 }
619 if (enable_app_list) {
620 deps += [
[email protected]55699f392014-08-20 22:16:30621 "//ui/app_list",
[email protected]dffd8a912014-06-30 23:24:31622 ]
623 }
624 if (enable_managed_users) {
625 sources += rebase_path(
626 gypi_values.chrome_browser_supervised_user_sources,
627 ".", "//chrome")
628 }
629 if (enable_webrtc) {
630 sources += rebase_path(
631 gypi_values.chrome_browser_webrtc_sources,
632 ".", "//chrome")
633 }
634 if (enable_service_discovery) {
635 sources += rebase_path(
636 gypi_values.chrome_browser_service_discovery_sources,
637 ".", "//chrome")
638 }
639 if (enable_mdns) {
640 sources += rebase_path(
641 gypi_values.chrome_browser_mdns_sources,
642 ".", "//chrome")
643 }
644 if (!enable_autofill_dialog || is_android || is_ios) {
645 sources -= [
646 "autofill/validation_rules_storage_factory.cc",
647 "autofill/validation_rules_storage_factory.h",
648 ]
649 }
650 if (enable_wifi_bootstrapping) {
651 sources += rebase_path(
652 gypi_values.chrome_browser_wifi_bootstrapping_sources,
653 ".", "//chrome")
654 if (is_win || is_mac) {
655 # TODO(brettw) as of this writing wifi bootstrapping is set on Windows
656 # and Mac, so this test is meaningless. Can we merge these lists?
657 sources += rebase_path(
658 gypi_values.chrome_browser_win_mac_wifi_bootstrapping_sources,
659 ".", "//chrome")
660 }
661 }
662}
663
James Robinson2ed4d692014-09-17 05:20:58664if (is_android) {
665 # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers
666 generate_jni("jni_headers") {
667 sources = rebase_path(
668 gypi_values.chrome_browser_jni_sources, ".", "//chrome")
669 jni_package = "chrome"
670 }
671}
672
[email protected]77ce8022014-06-16 19:29:56673# GYP version: chrome/chrome_resources.gyp:chrome_resources
674# (generate_browser_resources action)
675grit("resources") {
676 source = "browser_resources.grd"
[email protected]48885492014-08-13 11:22:41677 output_dir = "$root_gen_dir/chrome"
[email protected]cb0c67a2014-07-22 16:37:26678 outputs = [
679 "grit/browser_resources.h",
680 "browser_resources.pak",
681 ]
[email protected]77ce8022014-06-16 19:29:56682
683 omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js"
684
685 grit_flags = [
686 "-E", "about_credits_file=" +
687 rebase_path(about_credits_file, root_build_dir),
688 "-E", "additional_modules_list_file=" +
689 rebase_path(additional_modules_list_file, root_build_dir),
690 "-E", "omnibox_mojom_file=" +
691 rebase_path(omnibox_mojom_file, root_build_dir),
692 ]
693
694 deps = [
695 ":about_credits",
696 ":chrome_internal_resources_gen",
[email protected]77ce8022014-06-16 19:29:56697 "//chrome/browser/ui/webui/omnibox:mojo_bindings",
Brett Wilson4263a742014-09-10 00:02:24698 "//mojo/environment:chromium",
[email protected]77ce8022014-06-16 19:29:56699 ]
700}
701
702# GYP version: chrome/chrome_resource.gyp:about_credits
703action("about_credits") {
704 script = "//tools/licenses.py"
705
706 # TODO(phajdan.jr): input dependencies so this can be regenerated
707 # automatically when one of the credits changes. The way this should work is
708 # that licenses.py should write a .d file listing the input dependencies (see
709 # "depfile" in GN).
710 outputs = [ about_credits_file ]
711
712 args = [
713 "credits",
714 rebase_path(about_credits_file, root_build_dir),
715 ]
716}
717
718# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
engedy99d0e11b2014-09-30 13:32:41719if (is_chrome_branded) {
[email protected]77ce8022014-06-16 19:29:56720 action("chrome_internal_resources_gen") {
engedy99d0e11b2014-09-30 13:32:41721 script = "internal/transform_additional_modules_list.py"
722 sources = [ "internal/resources/additional_modules_list.input" ]
723 outputs = [ additional_modules_list_file ]
724 args = rebase_path(sources, root_build_dir) +
725 rebase_path(outputs, root_build_dir)
[email protected]77ce8022014-06-16 19:29:56726 }
727} else {
728 group("chrome_internal_resources_gen") {
729 # Empty placeholder.
730 }
731}
Brett Wilson052ce132014-09-12 19:46:29732
733# In GYP this is part of test_support_common.
734source_set("test_support") {
735 testonly = true
736
737 # Always include this via the main test support target.
738 visibility = [ "//chrome/test:test_support" ]
739
740 sources = [
741 "browsing_data/mock_browsing_data_appcache_helper.cc",
742 "browsing_data/mock_browsing_data_appcache_helper.h",
743 "browsing_data/mock_browsing_data_channel_id_helper.cc",
744 "browsing_data/mock_browsing_data_channel_id_helper.h",
745 "browsing_data/mock_browsing_data_cookie_helper.cc",
746 "browsing_data/mock_browsing_data_cookie_helper.h",
747 "browsing_data/mock_browsing_data_database_helper.cc",
748 "browsing_data/mock_browsing_data_database_helper.h",
749 "browsing_data/mock_browsing_data_file_system_helper.cc",
750 "browsing_data/mock_browsing_data_file_system_helper.h",
751 "browsing_data/mock_browsing_data_flash_lso_helper.cc",
752 "browsing_data/mock_browsing_data_flash_lso_helper.h",
753 "browsing_data/mock_browsing_data_indexed_db_helper.cc",
754 "browsing_data/mock_browsing_data_indexed_db_helper.h",
755 "browsing_data/mock_browsing_data_local_storage_helper.cc",
756 "browsing_data/mock_browsing_data_local_storage_helper.h",
757 "browsing_data/mock_browsing_data_quota_helper.cc",
758 "browsing_data/mock_browsing_data_quota_helper.h",
759 "browsing_data/mock_browsing_data_service_worker_helper.cc",
760 "browsing_data/mock_browsing_data_service_worker_helper.h",
761 "download/download_test_file_activity_observer.cc",
762 "download/download_test_file_activity_observer.h",
763 "download/test_download_shelf.cc",
764 "download/test_download_shelf.h",
Brett Wilson052ce132014-09-12 19:46:29765 "invalidation/fake_invalidation_service.cc",
766 "invalidation/fake_invalidation_service.h",
767 "media/fake_desktop_media_list.cc",
768 "media/fake_desktop_media_list.h",
769 "net/dns_probe_test_util.cc",
770 "net/dns_probe_test_util.h",
771 "net/url_request_mock_util.cc",
772 "net/url_request_mock_util.h",
773 "notifications/notification_test_util.cc",
774 "notifications/notification_test_util.h",
775 "password_manager/mock_password_store_service.cc",
776 "password_manager/mock_password_store_service.h",
777 "password_manager/null_password_store_service.cc",
778 "password_manager/null_password_store_service.h",
779 "password_manager/test_password_store_service.cc",
780 "password_manager/test_password_store_service.h",
781 "prefs/pref_service_mock_factory.cc",
782 "prefs/pref_service_mock_factory.h",
783 "profile_resetter/profile_resetter_test_base.cc",
784 "profile_resetter/profile_resetter_test_base.h",
785 "search_engines/template_url_service_factory_test_util.cc",
786 "search_engines/template_url_service_factory_test_util.h",
787 "search_engines/template_url_service_test_util.cc",
788 "search_engines/template_url_service_test_util.h",
789 "sessions/session_service_test_helper.cc",
790 "sessions/session_service_test_helper.h",
791 "signin/fake_account_reconcilor.cc",
792 "signin/fake_account_reconcilor.h",
793 "signin/fake_account_tracker_service.cc",
794 "signin/fake_account_tracker_service.h",
795 "signin/fake_profile_oauth2_token_service.cc",
796 "signin/fake_profile_oauth2_token_service.h",
797 "signin/fake_profile_oauth2_token_service_builder.cc",
798 "signin/fake_profile_oauth2_token_service_builder.h",
799 "signin/fake_signin_manager.cc",
800 "signin/fake_signin_manager.h",
801 "ssl/ssl_client_auth_requestor_mock.cc",
802 "ssl/ssl_client_auth_requestor_mock.h",
Brett Wilson052ce132014-09-12 19:46:29803 "sync/profile_sync_components_factory_mock.cc",
804 "sync/profile_sync_components_factory_mock.h",
805 "sync/profile_sync_service_mock.cc",
806 "sync/profile_sync_service_mock.h",
807 ]
808
Brett Wilsone53895272014-09-23 23:41:46809 public_deps = [
Brett Wilson052ce132014-09-12 19:46:29810 ":browser",
Brett Wilsone53895272014-09-23 23:41:46811 "//chrome/browser/ui:test_support",
812 ]
813 deps = [
Brett Wilson052ce132014-09-12 19:46:29814 "//base:prefs_test_support",
815 "//chrome/browser",
Brett Wilson052ce132014-09-12 19:46:29816 "//chrome/common",
817 "//chrome/common/safe_browsing:proto",
818 "//components/invalidation",
819 "//components/invalidation:test_support",
820 "//components/password_manager/core/browser:test_support",
821 "//components/search_engines:test_support",
822 "//content/test:test_support",
823 "//chrome/app/theme:theme_resources",
824 "//net:test_support",
825 "//skia",
826 "//testing/gmock",
827 "//testing/gtest",
828 "//ui/gfx",
829 ]
830
Brett Wilson052ce132014-09-12 19:46:29831 if (!is_ios) {
832 deps += [
833 "//components/sessions:test_support",
Brett Wilson052ce132014-09-12 19:46:29834 "//google_apis:test_support",
835 ]
836 }
837
James Robinson2ed4d692014-09-17 05:20:58838 if (enable_extensions) {
thestig52a87b3b2014-10-23 22:02:38839 sources += [
840 "extensions/extension_action_test_util.cc",
841 "extensions/extension_action_test_util.h",
842 ]
James Robinson2ed4d692014-09-17 05:20:58843 deps += [
844 "//extensions:test_support",
845 ]
846 }
847
Brett Wilson052ce132014-09-12 19:46:29848 if (is_chromeos) {
849 sources += [
850 "chromeos/app_mode/fake_cws.cc",
851 "chromeos/app_mode/fake_cws.h",
852 "chromeos/file_manager/fake_disk_mount_manager.cc",
853 "chromeos/file_manager/fake_disk_mount_manager.h",
854 "chromeos/input_method/mock_candidate_window_controller.cc",
855 "chromeos/input_method/mock_candidate_window_controller.h",
856 "chromeos/input_method/mock_input_method_engine.cc",
857 "chromeos/input_method/mock_input_method_engine.h",
858 "chromeos/input_method/mock_input_method_manager.cc",
859 "chromeos/input_method/mock_input_method_manager.h",
860 "chromeos/login/fake_login_utils.cc",
861 "chromeos/login/fake_login_utils.h",
862 "chromeos/login/mock_login_utils.cc",
863 "chromeos/login/mock_login_utils.h",
864 "chromeos/login/users/avatar/mock_user_image_manager.cc",
865 "chromeos/login/users/avatar/mock_user_image_manager.h",
866 "chromeos/login/users/fake_supervised_user_manager.cc",
867 "chromeos/login/users/fake_supervised_user_manager.h",
868 "chromeos/login/users/fake_user_manager.cc",
869 "chromeos/login/users/fake_user_manager.h",
870 "chromeos/login/users/mock_user_manager.cc",
871 "chromeos/login/users/mock_user_manager.h",
872 "chromeos/login/test/oobe_screen_waiter.cc",
873 "chromeos/login/test/oobe_screen_waiter.h",
874 "chromeos/login/test/js_checker.cc",
875 "chromeos/login/test/js_checker.h",
876 "chromeos/login/ui/mock_login_display.cc",
877 "chromeos/login/ui/mock_login_display.h",
878 "chromeos/login/ui/mock_login_display_host.cc",
879 "chromeos/login/ui/mock_login_display_host.h",
880 "chromeos/net/network_portal_detector_test_utils.cc",
881 "chromeos/net/network_portal_detector_test_utils.h",
882 "chromeos/policy/cloud_external_data_manager_base_test_util.cc",
883 "chromeos/policy/cloud_external_data_manager_base_test_util.h",
884 "chromeos/policy/device_policy_builder.cc",
885 "chromeos/policy/device_policy_builder.h",
886 "chromeos/policy/fake_device_cloud_policy_initializer.cc",
887 "chromeos/policy/fake_device_cloud_policy_initializer.h",
888 "chromeos/policy/stub_enterprise_install_attributes.cc",
889 "chromeos/policy/stub_enterprise_install_attributes.h",
890 "chromeos/settings/device_settings_test_helper.cc",
891 "chromeos/settings/device_settings_test_helper.h",
892 "chromeos/system/fake_input_device_settings.cc",
893 "chromeos/system/fake_input_device_settings.h",
894 ]
895 configs += [ "//build/config/linux:dbus" ]
mukai6ba73552014-10-09 19:05:17896 deps += [ "//chromeos:test_support" ]
Brett Wilson052ce132014-09-12 19:46:29897 }
898
899 if (enable_configuration_policy) {
900 sources += [
901 "policy/test/local_policy_test_server.cc",
902 "policy/test/local_policy_test_server.h",
903 ]
Brett Wilsone53895272014-09-23 23:41:46904 public_deps += [
Brett Wilson052ce132014-09-12 19:46:29905 "//components/policy:policy_component_test_support",
906 "//components/policy:test_support",
907 ]
Brett Wilson052ce132014-09-12 19:46:29908 }
909
910 if (safe_browsing_mode == 1) {
911 sources += [
912 "extensions/fake_safe_browsing_database_manager.cc",
913 "extensions/fake_safe_browsing_database_manager.h",
914 ]
915 }
916
917 if (enable_extensions) {
918 sources += [
919 "drive/dummy_drive_service.cc",
920 "drive/dummy_drive_service.h",
921 "drive/fake_drive_service.cc",
922 "drive/fake_drive_service.h",
923 "drive/test_util.cc",
924 "drive/test_util.h",
925 "extensions/api/messaging/native_messaging_test_util.cc",
926 "extensions/api/messaging/native_messaging_test_util.h",
927 "extensions/extension_notification_observer.cc",
928 "extensions/extension_notification_observer.h",
Brett Wilson052ce132014-09-12 19:46:29929 "extensions/mock_extension_special_storage_policy.cc",
930 "extensions/mock_extension_special_storage_policy.h",
931 "extensions/test_blacklist.cc",
932 "extensions/test_blacklist.h",
933 "extensions/test_blacklist_state_fetcher.cc",
934 "extensions/test_blacklist_state_fetcher.h",
935 "extensions/test_extension_environment.cc",
936 "extensions/test_extension_environment.h",
937 "extensions/test_extension_prefs.cc",
938 "extensions/test_extension_prefs.h",
939 "extensions/test_extension_service.cc",
940 "extensions/test_extension_service.h",
941 "extensions/test_extension_system.cc",
942 "extensions/test_extension_system.h",
943 "media_galleries/media_galleries_test_util.cc",
944 "media_galleries/media_galleries_test_util.h",
945 ]
946 deps += [
947 "//components/storage_monitor:test_support",
948 ]
949 }
950
951 if (enable_mdns) {
952 sources += [
953 "local_discovery/test_service_discovery_client.cc",
954 "local_discovery/test_service_discovery_client.h",
955 ]
956 }
957
958 if (enable_app_list) {
959 sources += [
960 "ui/app_list/test/chrome_app_list_test_support.cc",
961 "ui/app_list/test/chrome_app_list_test_support.h",
962 ]
963 }
964
965 if (enable_wifi_bootstrapping) {
966 sources += [
967 "local_discovery/wifi/mock_wifi_manager.cc",
968 "local_discovery/wifi/mock_wifi_manager.h",
969 ]
970 }
971}