blob: 41283d710201d678706fef6bef0f27facceff47f [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.
36 deps = [
37 "//base/allocator",
38 "//chrome:extra_resources",
39 "//chrome:resources",
40 "//chrome:strings",
[email protected]797b25042014-07-01 23:54:1741 "//chrome/app:generated_resources_map",
[email protected]855b7de2014-07-08 21:02:4542 "//chrome/app/resources:platform_locale_settings",
[email protected]797b25042014-07-01 23:54:1743 "//chrome/app/theme:theme_resources",
[email protected]855b7de2014-07-08 21:02:4544 "//chrome/browser/history:in_memory_url_index_cache_proto",
[email protected]855b7de2014-07-08 21:02:4545 "//chrome/browser/net:cert_logger_proto",
[email protected]797b25042014-07-01 23:54:1746 "//chrome/browser/net:probe_message_proto",
[email protected]abd4b682014-07-16 20:26:3047 "//chrome/browser/ui",
[email protected]dffd8a912014-06-30 23:24:3148 "//chrome/common",
49 "//chrome/common/net",
[email protected]604828c2014-07-02 20:39:1250 "//components/autofill/core/browser",
Brett Wilson1c693992014-08-25 19:10:0151 "//components/bookmarks/browser",
[email protected]b9f4c682014-07-10 22:00:3752 "//components/captive_portal",
[email protected]fca567b2014-07-02 17:37:3453 "//components/cloud_devices/common",
Brett Wilson1c693992014-08-25 19:10:0154 "//components/component_updater",
[email protected]08f71012014-07-25 10:27:5455 "//components/content_settings/core/common",
[email protected]478ed232014-08-19 02:10:5556 "//components/crx_file",
[email protected]b9f4c682014-07-10 22:00:3757 "//components/data_reduction_proxy/browser",
[email protected]273ae5ab2014-07-09 21:10:2558 "//components/domain_reliability",
59 "//components/favicon_base",
60 "//components/favicon/core",
[email protected]abd4b682014-07-16 20:26:3061 "//components/feedback",
62 "//components/gcm_driver",
Brett Wilson1c693992014-08-25 19:10:0163 "//components/google/core/browser",
[email protected]273ae5ab2014-07-09 21:10:2564 "//components/history/core/browser",
65 "//components/history/core/common",
Brett Wilson1c693992014-08-25 19:10:0166 "//components/infobars/core",
67 "//components/invalidation",
gunsch1afc65172014-09-16 00:03:3268 "//components/metrics:gpu",
[email protected]fca567b2014-07-02 17:37:3469 "//components/metrics:net",
Brett Wilson1c693992014-08-25 19:10:0170 "//components/metrics/proto:proto",
[email protected]fca567b2014-07-02 17:37:3471 "//components/navigation_metrics",
Brett Wilson1c693992014-08-25 19:10:0172 "//components/network_time",
73 "//components/omaha_query_params",
[email protected]b1c5ab682014-08-07 11:53:1774 "//components/omnibox",
[email protected]fca567b2014-07-02 17:37:3475 "//components/os_crypt",
Brett Wilson1c693992014-08-25 19:10:0176 "//components/password_manager/core/browser",
77 "//components/password_manager/core/common",
[email protected]fca567b2014-07-02 17:37:3478 "//components/policy:policy_component",
Brett Wilson1c693992014-08-25 19:10:0179 "//components/precache/core",
[email protected]fca567b2014-07-02 17:37:3480 "//components/query_parser",
[email protected]b9f4c682014-07-10 22:00:3781 "//components/rappor",
Brett Wilson1c693992014-08-25 19:10:0182 "//components/renderer_context_menu",
[email protected]720b10492014-07-23 08:48:4083 "//components/search",
Brett Wilson1c693992014-08-25 19:10:0184 "//components/search_engines",
85 "//components/search_provider_logos",
[email protected]abd4b682014-07-16 20:26:3086 "//components/signin/core/browser",
87 "//components/startup_metric_utils",
[email protected]797b25042014-07-01 23:54:1788 "//components/strings",
[email protected]bdceb3ba2014-07-25 16:47:4889 "//components/suggestions",
Brett Wilson1c693992014-08-25 19:10:0190 "//components/sync_driver",
[email protected]b9f4c682014-07-10 22:00:3791 "//components/translate/core/browser",
92 "//components/translate/core/common",
[email protected]273ae5ab2014-07-09 21:10:2593 "//components/url_fixer",
[email protected]fca567b2014-07-02 17:37:3494 "//components/user_prefs",
[email protected]bf4545f2014-07-11 19:49:4695 "//components/webdata/common",
[email protected]dffd8a912014-06-30 23:24:3196 "//content/public/browser",
97 "//content/public/common",
[email protected]604828c2014-07-02 20:39:1298 "//courgette:courgette_lib",
[email protected]dffd8a912014-06-30 23:24:3199 "//crypto",
[email protected]604828c2014-07-02 20:39:12100 "//google_apis",
Brett Wilson8f1323042014-09-11 16:58:56101 "//gpu/config",
ajwongf7b1cb692014-08-23 21:36:22102 "//jingle:notifier",
[email protected]dffd8a912014-06-30 23:24:31103 "//skia",
104 "//sql",
105 "//sync",
[email protected]797b25042014-07-01 23:54:17106 "//third_party/cacheinvalidation",
[email protected]dffd8a912014-06-30 23:24:31107 "//third_party/icu",
108 "//third_party/libxml",
ajwongf7b1cb692014-08-23 21:36:22109 "//third_party/libjingle",
[email protected]dffd8a912014-06-30 23:24:31110 "//third_party/widevine/cdm:version_h",
111 "//third_party/zlib",
112 "//third_party/zlib:minizip",
113 "//third_party/zlib:zip",
114 "//ui/base",
115 "//ui/events",
116 "//ui/gfx",
117 "//ui/gfx/geometry",
[email protected]a1d7d4f2014-07-16 21:33:36118 "//ui/message_center",
119 "//ui/shell_dialogs",
[email protected]dffd8a912014-06-30 23:24:31120 "//ui/strings",
[email protected]797b25042014-07-01 23:54:17121 "//ui/resources",
[email protected]dffd8a912014-06-30 23:24:31122 ]
123
124 forward_dependent_configs_from = [
[email protected]b9f4c682014-07-10 22:00:37125 "//components/autofill/core/browser",
[email protected]dffd8a912014-06-30 23:24:31126 "//content/public/browser",
127 "//sql",
128 "//sync",
129 ]
130
131 if (!is_ios) {
132 sources += rebase_path(gypi_values.chrome_browser_non_ios_sources,
133 ".", "//chrome")
134 #TODO(GYP) Add these sources:
135 # # These files are generated by GRIT.
136 # '<(grit_out_dir)/grit/component_extension_resources_map.cc',
137 # '<(grit_out_dir)/grit/theme_resources_map.cc',
[email protected]a3c134352014-07-11 19:23:19138 # '<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/ui_resources_map.cc',
[email protected]dffd8a912014-06-30 23:24:31139 #
140 # # This file is generated by
141 # # chrome/browser/metrics/variations/generate_resources_map.py
142 # '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc',
143
[email protected]1bb1a6002014-07-24 23:58:56144 defines = nacl_defines
[email protected]797b25042014-07-01 23:54:17145
[email protected]dffd8a912014-06-30 23:24:31146 deps += [
Brett Wilson1c693992014-08-25 19:10:01147 "//apps",
[email protected]dffd8a912014-06-30 23:24:31148 "//cc",
[email protected]55699f392014-08-20 22:16:30149 "//chrome/browser/devtools",
yoz774dcda2d2014-08-27 03:32:58150 "//chrome/common/extensions/api",
151 "//chrome/common/extensions/api:api_registration",
[email protected]55699f392014-08-20 22:16:30152 "//chrome/installer/util",
[email protected]b9f4c682014-07-10 22:00:37153 "//components/autofill/content/browser",
154 "//components/dom_distiller/content",
[email protected]fca567b2014-07-02 17:37:34155 "//components/keyed_service/content",
[email protected]55699f392014-08-20 22:16:30156 "//components/navigation_interception",
157 "//components/password_manager/content/browser",
158 "//components/precache/content",
159 "//components/sessions",
[email protected]abd4b682014-07-16 20:26:30160 "//components/storage_monitor",
[email protected]b9f4c682014-07-10 22:00:37161 "//components/translate/content/browser",
[email protected]fca567b2014-07-02 17:37:34162 "//components/url_matcher",
[email protected]dffd8a912014-06-30 23:24:31163 "//components/visitedlink/browser",
164 "//components/visitedlink/common",
hanxi149b92d2014-09-11 21:57:18165 "//components/web_cache/browser",
[email protected]b9f4c682014-07-10 22:00:37166 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:08167 "//content/app/resources",
[email protected]55699f392014-08-20 22:16:30168 "//media",
169 "//media/cast:net",
[email protected]604828c2014-07-02 20:39:12170 "//mojo/environment:chromium",
171 "//mojo/public/cpp/bindings",
172 "//mojo/public/js/bindings",
173 "//mojo/system",
Brett Wilson83fd4242014-09-02 19:45:33174 "//net:extras",
[email protected]dffd8a912014-06-30 23:24:31175 "//net:net_with_v8",
pilgrim4af8c212014-09-05 17:30:15176 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:24177 "//storage/common",
[email protected]4eebe74d2014-08-13 02:54:46178 "//third_party/WebKit/public:resources",
[email protected]dffd8a912014-06-30 23:24:31179 "//third_party/expat",
180 "//third_party/leveldatabase",
[email protected]fca567b2014-07-02 17:37:34181 "//third_party/libaddressinput",
[email protected]dffd8a912014-06-30 23:24:31182 "//third_party/libyuv",
183 "//third_party/npapi",
184 "//third_party/re2",
185 "//third_party/smhasher:cityhash",
Brett Wilson83fd4242014-09-02 19:45:33186 "//third_party/webrtc/modules/desktop_capture",
[email protected]dffd8a912014-06-30 23:24:31187 "//ui/gl",
188 "//ui/surface",
[email protected]604828c2014-07-02 20:39:12189 "//ui/web_dialogs",
[email protected]fca567b2014-07-02 17:37:34190 "//v8",
[email protected]dffd8a912014-06-30 23:24:31191 ## TODO(tonyg): Remove this dependency (crbug.com/280157).
[email protected]55699f392014-08-20 22:16:30192 #"../testing/perf/perf_test.gyp:*", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31193 ]
194 } else { # iOS
195 sources += rebase_path(gypi_values.chrome_browser_ios_sources,
196 ".", "//chrome")
197 deps += [
198 "//net",
199 ]
200 libs += [
201 "CoreTelephony.framework",
202 "CoreText.framework",
203 "MobileCoreServices.framework",
204 "QuartzCore.framework",
205 ]
206 ldflags += [ "-weak_framework", "CoreImage" ]
207 }
208
209 if (is_win || is_mac) {
210 sources += rebase_path(gypi_values.chrome_browser_win_mac_sources,
211 ".", "//chrome")
212 }
213 if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) {
214 sources += [
215 "net/disk_cache_dir_policy_handler.cc",
216 "net/disk_cache_dir_policy_handler.h",
217 ]
218 }
219 if (!is_android && !is_ios && enable_configuration_policy) {
220 sources += [
221 "download/download_dir_policy_handler.cc",
222 "download/download_dir_policy_handler.h",
223 ]
224 }
225 if (is_mac) {
226 sources += rebase_path(gypi_values.chrome_browser_mac_sources,
227 ".", "//chrome")
228 deps += [
229 #"app_shim" TODO(GYP)
230 ]
231 }
232 if (cld2_data_source == "component") {
233 sources += [
234 "component_updater/cld_component_installer.cc",
235 "component_updater/cld_component_installer.h",
236 ]
237 }
238 if (enable_extensions) {
[email protected]cc5b3be2014-08-15 23:24:52239 deps += [
240 "//chrome/browser/extensions",
[email protected]cc5b3be2014-08-15 23:24:52241 "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto",
242 ]
Brett Wilson052ce132014-09-12 19:46:29243 forward_dependent_configs_from += [ "//chrome/browser/extensions" ]
[email protected]dffd8a912014-06-30 23:24:31244 sources += rebase_path(gypi_values.chrome_browser_extensions_sources,
245 ".", "//chrome")
246 }
247 if (enable_background) {
248 sources += rebase_path(gypi_values.chrome_browser_background_sources,
249 ".", "//chrome")
250 if (!use_aura || is_win) {
251 sources -= [ "background/background_mode_manager_aura.cc" ]
252 }
253 }
254 if (enable_task_manager) {
255 sources += rebase_path(gypi_values.chrome_browser_task_manager_sources,
256 ".", "//chrome")
257 }
258 if (enable_spellcheck) {
259 sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources,
260 ".", "//chrome")
261 deps += [ "//third_party/hunspell" ]
262 }
263 if (enable_nacl) {
264 sources += rebase_path(gypi_values.chrome_browser_nacl_sources,
265 ".", "//chrome")
266 #deps += [ "//components/nacl:nacl_browser" ] TODO(GYP)
267 }
268 # ["debug_devtools==1", { TODO(GYP)
269 # "defines": [
270 # "DEBUG_DEVTOOLS=1",
James Robinson2ed4d692014-09-17 05:20:58271 # }],
[email protected]dffd8a912014-06-30 23:24:31272 if (enable_configuration_policy) {
273 sources += rebase_path(
274 gypi_values.chrome_browser_policy_shared_with_ios_sources,
275 ".", "//chrome")
276 deps += [
[email protected]604828c2014-07-02 20:39:12277 "//components/policy",
[email protected]797b25042014-07-01 23:54:17278 "//components/policy/proto",
[email protected]dffd8a912014-06-30 23:24:31279 ]
280 if (!is_ios) {
281 sources += rebase_path(
282 gypi_values.chrome_browser_policy_non_ios_sources,
283 ".", "//chrome")
284 }
285 if (!is_chromeos) {
286 sources += rebase_path(
287 gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources,
288 ".", "//chrome")
289 }
290 if (is_win || is_mac || is_desktop_linux) {
291 sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources,
292 ".", "//chrome")
293 }
James Robinson2ed4d692014-09-17 05:20:58294 if (!is_android && !is_ios) { # Non-mobile
[email protected]dffd8a912014-06-30 23:24:31295 deps += [
Brett Wilson642752142014-08-26 19:05:21296 "//chrome/browser/policy:path_parser",
[email protected]dffd8a912014-06-30 23:24:31297 ]
298 }
299 } else {
300 # Configuration policy disabled.
301 sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources,
302 ".", "//chrome")
303 }
304
305 if (enable_plugins) {
306 sources += rebase_path(gypi_values.chrome_browser_plugins_sources,
307 ".", "//chrome")
308 deps += [
James Robinson2ed4d692014-09-17 05:20:58309 "//components/pdf/browser",
[email protected]dffd8a912014-06-30 23:24:31310 "//ppapi:ppapi_ipc",
thestig11b815e92014-08-26 00:32:14311 "//third_party/adobe/flash:flapper_version_h",
[email protected]dffd8a912014-06-30 23:24:31312 ]
313 }
314 if (safe_browsing_mode != 0) {
315 sources += rebase_path(
316 gypi_values.chrome_browser_basic_safe_browsing_sources,
317 ".", "//chrome")
318 deps += [
[email protected]fca567b2014-07-02 17:37:34319 "//chrome/browser/safe_browsing:chunk_proto",
320 "//chrome/browser/safe_browsing:report_proto",
[email protected]dffd8a912014-06-30 23:24:31321 ]
322 if (safe_browsing_mode == 1) {
323 sources += rebase_path(
324 gypi_values.chrome_browser_full_safe_browsing_sources,
325 ".", "//chrome")
326 defines += [ "FULL_SAFE_BROWSING" ]
327 deps += [
[email protected]fca567b2014-07-02 17:37:34328 "//chrome/common/safe_browsing:proto",
[email protected]dffd8a912014-06-30 23:24:31329 ]
330 } else if (safe_browsing_mode == 2) {
331 defines += [ "MOBILE_SAFE_BROWSING" ]
332 }
333 }
334
335 if (is_linux) {
[email protected]797b25042014-07-01 23:54:17336 configs += [ "//build/config/linux:udev" ]
337 deps += [ "//device/media_transfer_protocol" ]
[email protected]dffd8a912014-06-30 23:24:31338 }
339 if (is_linux && !is_chromeos) {
[email protected]fd98b612014-07-09 22:11:47340 deps += [ "//third_party/speech-dispatcher" ]
[email protected]dffd8a912014-06-30 23:24:31341 }
342
343 if (is_chromeos) {
344 sources += rebase_path(gypi_values.chrome_browser_chromeos_sources,
345 ".", "//chrome")
346 deps += [
347 #"browser_chromeos", TODO(GYP)
348 ]
349 } else {
350 # Non-ChromeOS.
351 sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources,
352 ".", "//chrome")
353 }
354
355 if (use_cups) {
[email protected]604828c2014-07-02 20:39:12356 configs += [ "//printing:cups" ]
[email protected]dffd8a912014-06-30 23:24:31357 }
358 if (is_desktop_linux) {
359 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources,
360 ".", "//chrome")
[email protected]fca567b2014-07-02 17:37:34361 configs += [ "//build/config/linux:gnome_keyring" ]
[email protected]dffd8a912014-06-30 23:24:31362 }
363 if (use_aura) {
364 sources += rebase_path(gypi_values.chrome_browser_aura_sources,
365 ".", "//chrome")
366 deps += [
[email protected]fca567b2014-07-02 17:37:34367 "//ui/aura",
368 "//ui/compositor",
[email protected]604828c2014-07-02 20:39:12369 "//ui/keyboard",
[email protected]dffd8a912014-06-30 23:24:31370 ]
371 }
372 if (ui_compositor_image_transport) {
373 deps += [ "//ui/gl" ]
374 }
375
[email protected]855b7de2014-07-08 21:02:45376 if (use_ash) {
377 sources += rebase_path(gypi_values.chrome_browser_ash_sources,
378 ".", "//chrome")
379 }
380
[email protected]dffd8a912014-06-30 23:24:31381 if (use_x11) {
382 sources += rebase_path(gypi_values.chrome_browser_x11_sources,
383 ".", "//chrome")
384 if (!is_chromeos) {
[email protected]fca567b2014-07-02 17:37:34385 configs += [ "//build/config/linux:xscrnsaver" ]
[email protected]dffd8a912014-06-30 23:24:31386 }
387 }
388 if (is_posix && !is_mac && !is_ios) {
389 sources += [
390 "//chrome/app/chrome_breakpad_client.cc",
391 "//chrome/app/chrome_breakpad_client.h",
392 ]
393 deps += [
Robert Sesekabcd8102014-08-27 16:12:44394 "//components/crash/app",
395 "//components/crash/browser",
[email protected]dffd8a912014-06-30 23:24:31396 ]
397 }
398 if (use_nss_certs) {
399 sources += rebase_path(gypi_values.chrome_browser_nss_sources,
400 ".", "//chrome")
401 }
402 if (enable_notifications) {
403 sources += rebase_path(gypi_values.chrome_browser_notifications_sources,
404 ".", "//chrome")
405 if (!is_android) {
406 sources += rebase_path(
407 gypi_values.chrome_browser_non_android_notifications_sources,
408 ".", "//chrome")
409 }
410 }
411 if (enable_themes) {
412 sources += rebase_path(gypi_values.chrome_browser_themes_sources,
413 ".", "//chrome")
414 }
415
[email protected]b46e7e92014-07-22 21:49:52416 if (printing_mode != 0) {
[email protected]dffd8a912014-06-30 23:24:31417 # Some form of printing support.
418 sources += rebase_path(gypi_values.chrome_browser_basic_printing_sources,
419 ".", "//chrome")
420 deps += [
[email protected]55699f392014-08-20 22:16:30421 "//printing",
[email protected]dffd8a912014-06-30 23:24:31422 ]
vitalybuka36259ca2014-08-28 23:42:24423 if (is_win) {
[email protected]dffd8a912014-06-30 23:24:31424 sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources,
425 ".", "//chrome")
426 }
[email protected]b46e7e92014-07-22 21:49:52427 if (printing_mode == 1) {
[email protected]dffd8a912014-06-30 23:24:31428 # Full printing on top of the above.
429 sources += rebase_path(gypi_values.chrome_browser_full_printing_sources,
430 ".", "//chrome")
[email protected]b46e7e92014-07-22 21:49:52431 } else if (printing_mode == 2) {
[email protected]dffd8a912014-06-30 23:24:31432 # Partial-only printing support.
433 sources += rebase_path(
434 gypi_values.chrome_browser_basic_only_printing_sources,
435 ".", "//chrome")
436 }
437 }
438 if (enable_captive_portal_detection) {
439 sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources,
440 ".", "//chrome")
441 }
442 if (enable_session_service) {
443 sources += rebase_path(gypi_values.chrome_browser_session_service_sources,
444 ".", "//chrome")
445 }
446
447 if (is_android || is_ios) {
448 # Mobile.
449 sources += rebase_path(gypi_values.chrome_browser_mobile_sources,
450 ".", "//chrome")
451 } else {
452 # Non-mobile.
453 sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
454 ".", "//chrome")
reillyge471fab2014-08-29 01:58:43455 deps += [
reillyge471fab2014-08-29 01:58:43456 "//device/core",
reillygd77718d2014-09-04 00:57:56457 "//device/usb",
reillyge471fab2014-08-29 01:58:43458 ]
[email protected]dffd8a912014-06-30 23:24:31459 }
460
461 if (is_android) {
462 sources += rebase_path(gypi_values.chrome_browser_android_sources,
463 ".", "//chrome")
464 deps += [
James Robinson2ed4d692014-09-17 05:20:58465 ":jni_headers",
[email protected]55699f392014-08-20 22:16:30466 "//components/cdm/browser",
[email protected]dffd8a912014-06-30 23:24:31467 #"../components/components.gyp:web_contents_delegate_android", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31468 ]
469 deps -= [
[email protected]fca567b2014-07-02 17:37:34470 "//third_party/libaddressinput",
[email protected]abd4b682014-07-16 20:26:30471 "//components/feedback",
472 "//components/storage_monitor",
[email protected]abd4b682014-07-16 20:26:30473 "//components/web_modal",
[email protected]dffd8a912014-06-30 23:24:31474 ]
475 } else {
476 sources += rebase_path(gypi_values.chrome_browser_non_android_sources,
477 ".", "//chrome")
478 }
479
480 if (is_mac) {
481 deps += [
[email protected]6b5d2f92014-07-30 00:40:03482 "//third_party/google_toolbox_for_mac",
[email protected]dffd8a912014-06-30 23:24:31483 #"../third_party/mozilla/mozilla.gyp:mozilla", TODO(GYP)
484 ]
485 libs += [
486 "Accelerate.framework",
487 "AddressBook.framework",
488 "AudioUnit.framework",
489 "DiskArbitration.framework",
490 "IOKit.framework",
491 "ImageCaptureCore.framework",
492 "OpenGL.framework",
493 "QuartzCore.framework",
494 "SecurityInterface.framework",
495 ]
496 }
497
498 if (enable_rlz) {
499 sources += rebase_path(gypi_values.chrome_browser_rlz_sources,
500 ".", "//chrome")
501 deps += [ "//rlz:rlz_lib" ]
502 }
503
504 # TODO(GYP)
505 # Temporary fix to break the browser target into smaller chunks so it
506 # will link with goma builds.
507 #["OS=="win" and chromium_win_pch==0", {
508 # "msvs_shard": 4,
509 #}],
510
511 if (is_win) {
512 sources += rebase_path(gypi_values.chrome_browser_win_sources,
513 ".", "//chrome")
514 deps += [
[email protected]55699f392014-08-20 22:16:30515 "//chrome:version_header",
516 "//chrome/installer/util:strings",
517 "//third_party/iaccessible2",
518 "//third_party/isimpledom",
[email protected]dffd8a912014-06-30 23:24:31519 "//third_party/wtl",
[email protected]55699f392014-08-20 22:16:30520 "//ui/views",
521 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31522 #"chrome_process_finder", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31523 #"../chrome_elf/chrome_elf.gyp:chrome_elf", TODO(GYP)
524 #"../chrome_elf/chrome_elf.gyp:chrome_elf_constants", TODO(GYP)
525 #"../chrome_elf/chrome_elf.gyp:dll_hash", TODO(GYP)
526 #"../google_update/google_update.gyp:google_update", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31527 #"../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages", TODO(GYP)
[email protected]dffd8a912014-06-30 23:24:31528 #"../win8/win8.gyp:metro_viewer", TODO(GYP)
529 ]
530 forward_dependent_configs_from += [
[email protected]55699f392014-08-20 22:16:30531 "//ui/views",
532 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31533 ]
534 } else {
535 # Non-Windows.
536 sources += rebase_path(gypi_values.chrome_browser_non_win_sources,
537 ".", "//chrome")
[email protected]f6dc4ae2014-07-30 00:10:37538 if (toolkit_views) {
[email protected]dffd8a912014-06-30 23:24:31539 deps += [
[email protected]55699f392014-08-20 22:16:30540 "//ui/views",
541 "//ui/views/controls/webview",
[email protected]dffd8a912014-06-30 23:24:31542 ]
543 # TODO(GYP) why is this needed? Very susicious.
544 # "include_dirs": [
545 # "<(INTERMEDIATE_DIR)/chrome",
546 # ],
547 }
548 }
549
550 if (is_linux) {
551 sources += rebase_path(gypi_values.chrome_browser_linux_sources,
552 ".", "//chrome")
553 if (use_aura) {
554 configs += [
555 "//build/config/linux:dbus",
556 "//build/config/linux:fontconfig",
557 ]
558 deps += [
559 "//dbus",
560 ]
561 }
562 if (use_x11) {
563 configs += [ "//build/config/linux:x11" ]
564 deps += [ "//ui/gfx/x" ]
565 }
566 }
567
568 if (is_desktop_linux) {
569 sources += rebase_path(gypi_values.chrome_browser_desktop_linux_sources,
570 ".", "//chrome")
571 }
572 if (enable_plugin_installation) {
573 sources += rebase_path(
574 gypi_values.chrome_browser_plugin_installation_sources,
575 ".", "//chrome")
576 }
577 if (enable_app_list) {
578 deps += [
[email protected]55699f392014-08-20 22:16:30579 "//ui/app_list",
[email protected]dffd8a912014-06-30 23:24:31580 ]
581 }
582 if (enable_managed_users) {
583 sources += rebase_path(
584 gypi_values.chrome_browser_supervised_user_sources,
585 ".", "//chrome")
586 }
587 if (enable_webrtc) {
588 sources += rebase_path(
589 gypi_values.chrome_browser_webrtc_sources,
590 ".", "//chrome")
591 }
592 if (enable_service_discovery) {
593 sources += rebase_path(
594 gypi_values.chrome_browser_service_discovery_sources,
595 ".", "//chrome")
596 }
597 if (enable_mdns) {
598 sources += rebase_path(
599 gypi_values.chrome_browser_mdns_sources,
600 ".", "//chrome")
601 }
602 if (!enable_autofill_dialog || is_android || is_ios) {
603 sources -= [
604 "autofill/validation_rules_storage_factory.cc",
605 "autofill/validation_rules_storage_factory.h",
606 ]
607 }
608 if (enable_wifi_bootstrapping) {
609 sources += rebase_path(
610 gypi_values.chrome_browser_wifi_bootstrapping_sources,
611 ".", "//chrome")
612 if (is_win || is_mac) {
613 # TODO(brettw) as of this writing wifi bootstrapping is set on Windows
614 # and Mac, so this test is meaningless. Can we merge these lists?
615 sources += rebase_path(
616 gypi_values.chrome_browser_win_mac_wifi_bootstrapping_sources,
617 ".", "//chrome")
618 }
619 }
620}
621
James Robinson2ed4d692014-09-17 05:20:58622if (is_android) {
623 # GYP version: chrome/chrome_browser.gypi:chrome_browser_jni_headers
624 generate_jni("jni_headers") {
625 sources = rebase_path(
626 gypi_values.chrome_browser_jni_sources, ".", "//chrome")
627 jni_package = "chrome"
628 }
629}
630
[email protected]77ce8022014-06-16 19:29:56631# GYP version: chrome/chrome_resources.gyp:chrome_resources
632# (generate_browser_resources action)
633grit("resources") {
634 source = "browser_resources.grd"
[email protected]48885492014-08-13 11:22:41635 output_dir = "$root_gen_dir/chrome"
[email protected]cb0c67a2014-07-22 16:37:26636 outputs = [
637 "grit/browser_resources.h",
638 "browser_resources.pak",
639 ]
[email protected]77ce8022014-06-16 19:29:56640
641 omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js"
642
643 grit_flags = [
644 "-E", "about_credits_file=" +
645 rebase_path(about_credits_file, root_build_dir),
646 "-E", "additional_modules_list_file=" +
647 rebase_path(additional_modules_list_file, root_build_dir),
648 "-E", "omnibox_mojom_file=" +
649 rebase_path(omnibox_mojom_file, root_build_dir),
650 ]
651
652 deps = [
653 ":about_credits",
654 ":chrome_internal_resources_gen",
[email protected]77ce8022014-06-16 19:29:56655 "//chrome/browser/ui/webui/omnibox:mojo_bindings",
Brett Wilson4263a742014-09-10 00:02:24656 "//mojo/environment:chromium",
[email protected]77ce8022014-06-16 19:29:56657 ]
658}
659
660# GYP version: chrome/chrome_resource.gyp:about_credits
661action("about_credits") {
662 script = "//tools/licenses.py"
663
664 # TODO(phajdan.jr): input dependencies so this can be regenerated
665 # automatically when one of the credits changes. The way this should work is
666 # that licenses.py should write a .d file listing the input dependencies (see
667 # "depfile" in GN).
668 outputs = [ about_credits_file ]
669
670 args = [
671 "credits",
672 rebase_path(about_credits_file, root_build_dir),
673 ]
674}
675
676# GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen
677# TODO(GYP) write internal action
678if (false) { #if (is_chrome_branded) {
679 action("chrome_internal_resources_gen") {
680 # TODO(GYP)
681 }
682} else {
683 group("chrome_internal_resources_gen") {
684 # Empty placeholder.
685 }
686}
Brett Wilson052ce132014-09-12 19:46:29687
688# In GYP this is part of test_support_common.
689source_set("test_support") {
690 testonly = true
691
692 # Always include this via the main test support target.
693 visibility = [ "//chrome/test:test_support" ]
694
695 sources = [
696 "browsing_data/mock_browsing_data_appcache_helper.cc",
697 "browsing_data/mock_browsing_data_appcache_helper.h",
698 "browsing_data/mock_browsing_data_channel_id_helper.cc",
699 "browsing_data/mock_browsing_data_channel_id_helper.h",
700 "browsing_data/mock_browsing_data_cookie_helper.cc",
701 "browsing_data/mock_browsing_data_cookie_helper.h",
702 "browsing_data/mock_browsing_data_database_helper.cc",
703 "browsing_data/mock_browsing_data_database_helper.h",
704 "browsing_data/mock_browsing_data_file_system_helper.cc",
705 "browsing_data/mock_browsing_data_file_system_helper.h",
706 "browsing_data/mock_browsing_data_flash_lso_helper.cc",
707 "browsing_data/mock_browsing_data_flash_lso_helper.h",
708 "browsing_data/mock_browsing_data_indexed_db_helper.cc",
709 "browsing_data/mock_browsing_data_indexed_db_helper.h",
710 "browsing_data/mock_browsing_data_local_storage_helper.cc",
711 "browsing_data/mock_browsing_data_local_storage_helper.h",
712 "browsing_data/mock_browsing_data_quota_helper.cc",
713 "browsing_data/mock_browsing_data_quota_helper.h",
714 "browsing_data/mock_browsing_data_service_worker_helper.cc",
715 "browsing_data/mock_browsing_data_service_worker_helper.h",
716 "download/download_test_file_activity_observer.cc",
717 "download/download_test_file_activity_observer.h",
718 "download/test_download_shelf.cc",
719 "download/test_download_shelf.h",
720 "extensions/extension_action_test_util.cc",
721 "extensions/extension_action_test_util.h",
722 "invalidation/fake_invalidation_service.cc",
723 "invalidation/fake_invalidation_service.h",
724 "media/fake_desktop_media_list.cc",
725 "media/fake_desktop_media_list.h",
726 "net/dns_probe_test_util.cc",
727 "net/dns_probe_test_util.h",
728 "net/url_request_mock_util.cc",
729 "net/url_request_mock_util.h",
730 "notifications/notification_test_util.cc",
731 "notifications/notification_test_util.h",
732 "password_manager/mock_password_store_service.cc",
733 "password_manager/mock_password_store_service.h",
734 "password_manager/null_password_store_service.cc",
735 "password_manager/null_password_store_service.h",
736 "password_manager/test_password_store_service.cc",
737 "password_manager/test_password_store_service.h",
738 "prefs/pref_service_mock_factory.cc",
739 "prefs/pref_service_mock_factory.h",
740 "profile_resetter/profile_resetter_test_base.cc",
741 "profile_resetter/profile_resetter_test_base.h",
742 "search_engines/template_url_service_factory_test_util.cc",
743 "search_engines/template_url_service_factory_test_util.h",
744 "search_engines/template_url_service_test_util.cc",
745 "search_engines/template_url_service_test_util.h",
746 "sessions/session_service_test_helper.cc",
747 "sessions/session_service_test_helper.h",
748 "signin/fake_account_reconcilor.cc",
749 "signin/fake_account_reconcilor.h",
750 "signin/fake_account_tracker_service.cc",
751 "signin/fake_account_tracker_service.h",
752 "signin/fake_profile_oauth2_token_service.cc",
753 "signin/fake_profile_oauth2_token_service.h",
754 "signin/fake_profile_oauth2_token_service_builder.cc",
755 "signin/fake_profile_oauth2_token_service_builder.h",
756 "signin/fake_signin_manager.cc",
757 "signin/fake_signin_manager.h",
758 "ssl/ssl_client_auth_requestor_mock.cc",
759 "ssl/ssl_client_auth_requestor_mock.h",
760 "sync/glue/local_device_info_provider_mock.cc",
761 "sync/glue/local_device_info_provider_mock.h",
762 "sync/profile_sync_components_factory_mock.cc",
763 "sync/profile_sync_components_factory_mock.h",
764 "sync/profile_sync_service_mock.cc",
765 "sync/profile_sync_service_mock.h",
766 ]
767
768 deps = [
769 ":browser",
770 "//base:prefs_test_support",
771 "//chrome/browser",
772 "//chrome/browser/ui:test_support",
773 "//chrome/common",
774 "//chrome/common/safe_browsing:proto",
775 "//components/invalidation",
776 "//components/invalidation:test_support",
777 "//components/password_manager/core/browser:test_support",
778 "//components/search_engines:test_support",
779 "//content/test:test_support",
780 "//chrome/app/theme:theme_resources",
781 "//net:test_support",
782 "//skia",
783 "//testing/gmock",
784 "//testing/gtest",
785 "//ui/gfx",
786 ]
787
788 forward_dependent_configs_from = [
789 ":browser",
790 "//chrome/browser/ui:test_support",
791 ]
792
793 if (!is_ios) {
794 deps += [
795 "//components/sessions:test_support",
Brett Wilson052ce132014-09-12 19:46:29796 "//google_apis:test_support",
797 ]
798 }
799
James Robinson2ed4d692014-09-17 05:20:58800 if (enable_extensions) {
801 deps += [
802 "//extensions:test_support",
803 ]
804 }
805
Brett Wilson052ce132014-09-12 19:46:29806 if (is_chromeos) {
807 sources += [
808 "chromeos/app_mode/fake_cws.cc",
809 "chromeos/app_mode/fake_cws.h",
810 "chromeos/file_manager/fake_disk_mount_manager.cc",
811 "chromeos/file_manager/fake_disk_mount_manager.h",
812 "chromeos/input_method/mock_candidate_window_controller.cc",
813 "chromeos/input_method/mock_candidate_window_controller.h",
814 "chromeos/input_method/mock_input_method_engine.cc",
815 "chromeos/input_method/mock_input_method_engine.h",
816 "chromeos/input_method/mock_input_method_manager.cc",
817 "chromeos/input_method/mock_input_method_manager.h",
818 "chromeos/login/fake_login_utils.cc",
819 "chromeos/login/fake_login_utils.h",
820 "chromeos/login/mock_login_utils.cc",
821 "chromeos/login/mock_login_utils.h",
822 "chromeos/login/users/avatar/mock_user_image_manager.cc",
823 "chromeos/login/users/avatar/mock_user_image_manager.h",
824 "chromeos/login/users/fake_supervised_user_manager.cc",
825 "chromeos/login/users/fake_supervised_user_manager.h",
826 "chromeos/login/users/fake_user_manager.cc",
827 "chromeos/login/users/fake_user_manager.h",
828 "chromeos/login/users/mock_user_manager.cc",
829 "chromeos/login/users/mock_user_manager.h",
830 "chromeos/login/test/oobe_screen_waiter.cc",
831 "chromeos/login/test/oobe_screen_waiter.h",
832 "chromeos/login/test/js_checker.cc",
833 "chromeos/login/test/js_checker.h",
834 "chromeos/login/ui/mock_login_display.cc",
835 "chromeos/login/ui/mock_login_display.h",
836 "chromeos/login/ui/mock_login_display_host.cc",
837 "chromeos/login/ui/mock_login_display_host.h",
838 "chromeos/net/network_portal_detector_test_utils.cc",
839 "chromeos/net/network_portal_detector_test_utils.h",
840 "chromeos/policy/cloud_external_data_manager_base_test_util.cc",
841 "chromeos/policy/cloud_external_data_manager_base_test_util.h",
842 "chromeos/policy/device_policy_builder.cc",
843 "chromeos/policy/device_policy_builder.h",
844 "chromeos/policy/fake_device_cloud_policy_initializer.cc",
845 "chromeos/policy/fake_device_cloud_policy_initializer.h",
846 "chromeos/policy/stub_enterprise_install_attributes.cc",
847 "chromeos/policy/stub_enterprise_install_attributes.h",
848 "chromeos/settings/device_settings_test_helper.cc",
849 "chromeos/settings/device_settings_test_helper.h",
850 "chromeos/system/fake_input_device_settings.cc",
851 "chromeos/system/fake_input_device_settings.h",
852 ]
853 configs += [ "//build/config/linux:dbus" ]
854 #deps += [ "//chromeos:test_support" ] TODO(GYP)
855 }
856
857 if (enable_configuration_policy) {
858 sources += [
859 "policy/test/local_policy_test_server.cc",
860 "policy/test/local_policy_test_server.h",
861 ]
862 policy_deps = [
863 "//components/policy:policy_component_test_support",
864 "//components/policy:test_support",
865 ]
866 deps += policy_deps
867 forward_dependent_configs_from += policy_deps
868 }
869
870 if (safe_browsing_mode == 1) {
871 sources += [
872 "extensions/fake_safe_browsing_database_manager.cc",
873 "extensions/fake_safe_browsing_database_manager.h",
874 ]
875 }
876
877 if (enable_extensions) {
878 sources += [
879 "drive/dummy_drive_service.cc",
880 "drive/dummy_drive_service.h",
881 "drive/fake_drive_service.cc",
882 "drive/fake_drive_service.h",
883 "drive/test_util.cc",
884 "drive/test_util.h",
885 "extensions/api/messaging/native_messaging_test_util.cc",
886 "extensions/api/messaging/native_messaging_test_util.h",
887 "extensions/extension_notification_observer.cc",
888 "extensions/extension_notification_observer.h",
889 "extensions/extension_test_message_listener.cc",
890 "extensions/extension_test_message_listener.h",
891 "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}