[email protected] | 77ce802 | 2014-06-16 19:29:56 | [diff] [blame] | 1 | # 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] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 5 | import("//build/config/crypto.gni") |
| 6 | import("//build/config/features.gni") |
| 7 | import("//build/config/ui.gni") |
[email protected] | 77ce802 | 2014-06-16 19:29:56 | [diff] [blame] | 8 | import("//tools/grit/grit_rule.gni") |
| 9 | |
| 10 | about_credits_file = "$target_gen_dir/about_credits.html" |
| 11 | additional_modules_list_file = |
| 12 | "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt" |
| 13 | |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 14 | # TODO(brettw) uncomment this when this target compiles. |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 15 | if (false) { |
| 16 | |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 17 | gypi_values = exec_script( |
| 18 | "//build/gypi_to_gn.py", |
| 19 | [ rebase_path("../chrome_browser.gypi") ], |
| 20 | "scope", |
| 21 | [ "../chrome_browser.gypi" ]) |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 22 | |
| 23 | static_library("browser") { |
| 24 | configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 25 | defines = [] |
| 26 | sources = [] |
| 27 | libs = [] |
| 28 | ldflags = [] |
| 29 | |
| 30 | # iOS/non-iOS shared deps. New dependencies should generally be added in the |
| 31 | # non-iOS deps below. |
| 32 | deps = [ |
| 33 | "//base/allocator", |
| 34 | "//chrome:extra_resources", |
| 35 | "//chrome:resources", |
| 36 | "//chrome:strings", |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 37 | "//chrome/app:generated_resources_map", |
| 38 | "//chrome/app/theme:theme_resources", |
| 39 | "//chrome/browser/net:probe_message_proto", |
| 40 | "//chrome/browser/search/suggestions/proto", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 41 | "//chrome/common", |
| 42 | "//chrome/common/net", |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 43 | "//components/cloud_devices/common", |
| 44 | "//components/metrics:net", |
| 45 | "//components/navigation_metrics", |
| 46 | "//components/os_crypt", |
| 47 | "//components/policy:policy_component", |
| 48 | "//components/query_parser", |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 49 | "//components/strings", |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 50 | "//components/translate:translate_core_browser", |
| 51 | "//components/translate:translate_core_common", |
| 52 | "//components/user_prefs", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 53 | "//content/public/browser", |
| 54 | "//content/public/common", |
| 55 | "//crypto", |
| 56 | "//skia", |
| 57 | "//sql", |
| 58 | "//sync", |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 59 | "//third_party/cacheinvalidation", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 60 | "//third_party/icu", |
| 61 | "//third_party/libxml", |
| 62 | "//third_party/widevine/cdm:version_h", |
| 63 | "//third_party/zlib", |
| 64 | "//third_party/zlib:minizip", |
| 65 | "//third_party/zlib:zip", |
| 66 | "//ui/base", |
| 67 | "//ui/events", |
| 68 | "//ui/gfx", |
| 69 | "//ui/gfx/geometry", |
| 70 | "//ui/strings", |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 71 | "//ui/resources", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 72 | # TODO(GYP) |
| 73 | #"browser_ui", |
| 74 | #"cert_logger_proto", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 75 | #"chrome_resources.gyp:platform_locale_settings", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 76 | #"in_memory_url_index_cache_proto", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 77 | #"../components/components.gyp:autocomplete", |
| 78 | #"../components/components.gyp:autofill_core_browser", |
| 79 | #"../components/components.gyp:bookmarks_browser", |
| 80 | #"../components/components.gyp:captive_portal", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 81 | #"../components/components.gyp:data_reduction_proxy_browser", |
| 82 | #"../components/components.gyp:domain_reliability", |
| 83 | #"../components/components.gyp:favicon_base", |
| 84 | #"../components/components.gyp:favicon_core", |
| 85 | #"../components/components.gyp:feedback_component", |
| 86 | #"../components/components.gyp:gcm_driver", |
| 87 | #"../components/components.gyp:google_core_browser", |
| 88 | #"../components/components.gyp:history_core_browser", |
| 89 | #"../components/components.gyp:history_core_common", |
| 90 | #"../components/components.gyp:infobars_core", |
| 91 | #"../components/components.gyp:invalidation", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 92 | #"../components/components.gyp:network_time", |
| 93 | #"../components/components.gyp:omaha_query_params", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 94 | #"../components/components.gyp:password_manager_core_browser", |
| 95 | #"../components/components.gyp:password_manager_core_common", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 96 | #"../components/components.gyp:precache_core", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 97 | #"../components/components.gyp:rappor", |
| 98 | #"../components/components.gyp:search_engines", |
| 99 | #"../components/components.gyp:search_provider_logos", |
| 100 | #"../components/components.gyp:signin_core_browser", |
| 101 | #"../components/components.gyp:startup_metric_utils", |
| 102 | #"../components/components.gyp:sync_driver", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 103 | #"../components/components.gyp:url_fixer", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 104 | #"../components/components.gyp:webdata_common", |
| 105 | #"../courgette/courgette.gyp:courgette_lib", |
| 106 | #"../google_apis/google_apis.gyp:google_apis", |
| 107 | #"../jingle/jingle.gyp:notifier", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 108 | #"../third_party/libjingle/libjingle.gyp:libjingle", |
| 109 | #"../ui/message_center/message_center.gyp:message_center", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 110 | #"../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs", |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 111 | # Note: variations dependency from GYP build is omitted because we pick it |
| 112 | # up via chrome/common, and GN doesn't have the GYP dependency bug that |
| 113 | # made it necessary to include here. |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 114 | ] |
| 115 | |
| 116 | forward_dependent_configs_from = [ |
| 117 | #"../components/components.gyp:autofill_core_browser", TODO(GYP) |
| 118 | "//content/public/browser", |
| 119 | "//sql", |
| 120 | "//sync", |
| 121 | ] |
| 122 | |
| 123 | if (!is_ios) { |
| 124 | sources += rebase_path(gypi_values.chrome_browser_non_ios_sources, |
| 125 | ".", "//chrome") |
| 126 | #TODO(GYP) Add these sources: |
| 127 | # # These files are generated by GRIT. |
| 128 | # '<(grit_out_dir)/grit/component_extension_resources_map.cc', |
| 129 | # '<(grit_out_dir)/grit/theme_resources_map.cc', |
| 130 | # '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/grit/ui_resources_map.cc', |
| 131 | # |
| 132 | # # This file is generated by |
| 133 | # # chrome/browser/metrics/variations/generate_resources_map.py |
| 134 | # '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc', |
| 135 | |
| 136 | # TODO(GYP) Also add these nacl_defines to direct dependents. |
| 137 | #defines = nacl_defines |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 138 | |
| 139 | # TODO(GYP) remove this when the real webrtc target is used below. |
| 140 | configs += [ "//content:webrtc_stub_config" ] |
| 141 | |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 142 | deps += [ |
| 143 | "//cc", |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 144 | "//chrome/browser/performance_monitor", |
| 145 | "//components/keyed_service/content", |
| 146 | "//components/url_matcher", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 147 | "//components/visitedlink/browser", |
| 148 | "//components/visitedlink/common", |
| 149 | "//net:net_with_v8", |
| 150 | "//third_party/adobe/flash:flapper_version_h", |
| 151 | "//third_party/expat", |
| 152 | "//third_party/leveldatabase", |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 153 | "//third_party/libaddressinput", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 154 | "//third_party/libyuv", |
| 155 | "//third_party/npapi", |
| 156 | "//third_party/re2", |
| 157 | "//third_party/smhasher:cityhash", |
| 158 | "//ui/gl", |
| 159 | "//ui/surface", |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 160 | "//v8", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 161 | "//webkit:resources", |
| 162 | "//webkit/browser:storage", |
| 163 | "//webkit/common", |
| 164 | "//webkit/common:storage", |
| 165 | # TODO(GYP) |
| 166 | #"apps", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 167 | #"browser_extensions", |
| 168 | #"common/extensions/api/api.gyp:chrome_api", |
| 169 | #"debugger", |
| 170 | #"installer_util", |
| 171 | #"sync_file_system_drive_proto", |
| 172 | #"sync_file_system_proto", |
| 173 | #"../components/components.gyp:autofill_content_browser", |
| 174 | #"../components/components.gyp:dom_distiller_content", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 175 | #"../components/components.gyp:navigation_interception", |
| 176 | #"../components/components.gyp:password_manager_content_browser", |
| 177 | #"../components/components.gyp:precache_content", |
| 178 | #"../components/components.gyp:sessions", |
| 179 | #"../components/components.gyp:storage_monitor", |
| 180 | #"../components/components.gyp:translate_content_browser", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 181 | #"../components/components.gyp:usb_service", |
| 182 | #"../components/components.gyp:web_modal", |
| 183 | #"../media/cast/cast.gyp:cast_transport", |
| 184 | #"../media/media.gyp:media", |
| 185 | #"../mojo/mojo.gyp:mojo_cpp_bindings", |
| 186 | #"../mojo/mojo.gyp:mojo_environment_chromium", |
| 187 | #"../mojo/mojo.gyp:mojo_js_bindings", |
| 188 | #"../mojo/mojo.gyp:mojo_system_impl", |
| 189 | ## TODO(tonyg): Remove this dependency (crbug.com/280157). |
| 190 | #"../testing/perf/perf_test.gyp:*", |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 191 | # Note: for this one also remove the webrtc_stub_config |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 192 | #"../third_party/webrtc/modules/modules.gyp:desktop_capture", |
| 193 | #"../ui/web_dialogs/web_dialogs.gyp:web_dialogs", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 194 | ] |
| 195 | } else { # iOS |
| 196 | sources += rebase_path(gypi_values.chrome_browser_ios_sources, |
| 197 | ".", "//chrome") |
| 198 | deps += [ |
| 199 | "//net", |
| 200 | ] |
| 201 | libs += [ |
| 202 | "CoreTelephony.framework", |
| 203 | "CoreText.framework", |
| 204 | "MobileCoreServices.framework", |
| 205 | "QuartzCore.framework", |
| 206 | ] |
| 207 | ldflags += [ "-weak_framework", "CoreImage" ] |
| 208 | } |
| 209 | |
| 210 | if (is_win || is_mac) { |
| 211 | sources += rebase_path(gypi_values.chrome_browser_win_mac_sources, |
| 212 | ".", "//chrome") |
| 213 | } |
| 214 | if (!is_android && !is_ios && !is_chromeos && enable_configuration_policy) { |
| 215 | sources += [ |
| 216 | "net/disk_cache_dir_policy_handler.cc", |
| 217 | "net/disk_cache_dir_policy_handler.h", |
| 218 | ] |
| 219 | } |
| 220 | if (!is_android && !is_ios && enable_configuration_policy) { |
| 221 | sources += [ |
| 222 | "download/download_dir_policy_handler.cc", |
| 223 | "download/download_dir_policy_handler.h", |
| 224 | ] |
| 225 | } |
| 226 | if (is_mac) { |
| 227 | sources += rebase_path(gypi_values.chrome_browser_mac_sources, |
| 228 | ".", "//chrome") |
| 229 | deps += [ |
| 230 | #"app_shim" TODO(GYP) |
| 231 | ] |
| 232 | } |
| 233 | if (cld2_data_source == "component") { |
| 234 | sources += [ |
| 235 | "component_updater/cld_component_installer.cc", |
| 236 | "component_updater/cld_component_installer.h", |
| 237 | ] |
| 238 | } |
| 239 | if (enable_extensions) { |
| 240 | sources += rebase_path(gypi_values.chrome_browser_extensions_sources, |
| 241 | ".", "//chrome") |
| 242 | } |
| 243 | if (enable_background) { |
| 244 | sources += rebase_path(gypi_values.chrome_browser_background_sources, |
| 245 | ".", "//chrome") |
| 246 | if (!use_aura || is_win) { |
| 247 | sources -= [ "background/background_mode_manager_aura.cc" ] |
| 248 | } |
| 249 | } |
| 250 | if (enable_task_manager) { |
| 251 | sources += rebase_path(gypi_values.chrome_browser_task_manager_sources, |
| 252 | ".", "//chrome") |
| 253 | } |
| 254 | if (enable_spellcheck) { |
| 255 | sources += rebase_path(gypi_values.chrome_browser_spellchecker_sources, |
| 256 | ".", "//chrome") |
| 257 | deps += [ "//third_party/hunspell" ] |
| 258 | } |
| 259 | if (enable_nacl) { |
| 260 | sources += rebase_path(gypi_values.chrome_browser_nacl_sources, |
| 261 | ".", "//chrome") |
| 262 | #deps += [ "//components/nacl:nacl_browser" ] TODO(GYP) |
| 263 | } |
| 264 | # ["debug_devtools==1", { TODO(GYP) |
| 265 | # "defines": [ |
| 266 | # "DEBUG_DEVTOOLS=1", |
| 267 | # ], |
| 268 | if (enable_configuration_policy) { |
| 269 | sources += rebase_path( |
| 270 | gypi_values.chrome_browser_policy_shared_with_ios_sources, |
| 271 | ".", "//chrome") |
| 272 | deps += [ |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 273 | "//components/policy/proto", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 274 | #"../components/components.gyp:policy", TODO(GYP) |
| 275 | ] |
| 276 | if (!is_ios) { |
| 277 | sources += rebase_path( |
| 278 | gypi_values.chrome_browser_policy_non_ios_sources, |
| 279 | ".", "//chrome") |
| 280 | } |
| 281 | if (!is_chromeos) { |
| 282 | sources += rebase_path( |
| 283 | gypi_values.chrome_browser_policy_shared_with_ios_not_chromeos_sources, |
| 284 | ".", "//chrome") |
| 285 | } |
| 286 | if (is_win || is_mac || is_desktop_linux) { |
| 287 | sources += rebase_path(gypi_values.chrome_browser_policy_desktop_sources, |
| 288 | ".", "//chrome") |
| 289 | } |
| 290 | if (is_android || is_ios) { |
| 291 | sources += rebase_path(gypi_values.chrome_browser_mobile_sources, |
| 292 | ".", "//chrome") |
| 293 | } else { # Non-mobile |
| 294 | deps += [ |
| 295 | #"policy_path_parser", TODO(GYP) |
| 296 | ] |
| 297 | } |
| 298 | } else { |
| 299 | # Configuration policy disabled. |
| 300 | sources += rebase_path(gypi_values.chrome_browser_policy_disabled_sources, |
| 301 | ".", "//chrome") |
| 302 | } |
| 303 | |
| 304 | if (enable_plugins) { |
| 305 | sources += rebase_path(gypi_values.chrome_browser_plugins_sources, |
| 306 | ".", "//chrome") |
| 307 | deps += [ |
| 308 | "//ppapi:ppapi_ipc", |
| 309 | ] |
| 310 | } |
| 311 | if (safe_browsing_mode != 0) { |
| 312 | sources += rebase_path( |
| 313 | gypi_values.chrome_browser_basic_safe_browsing_sources, |
| 314 | ".", "//chrome") |
| 315 | deps += [ |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 316 | "//chrome/browser/safe_browsing:chunk_proto", |
| 317 | "//chrome/browser/safe_browsing:report_proto", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 318 | ] |
| 319 | if (safe_browsing_mode == 1) { |
| 320 | sources += rebase_path( |
| 321 | gypi_values.chrome_browser_full_safe_browsing_sources, |
| 322 | ".", "//chrome") |
| 323 | defines += [ "FULL_SAFE_BROWSING" ] |
| 324 | deps += [ |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 325 | "//chrome/common/safe_browsing:proto", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 326 | ] |
| 327 | } else if (safe_browsing_mode == 2) { |
| 328 | defines += [ "MOBILE_SAFE_BROWSING" ] |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | if (is_linux) { |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 333 | configs += [ "//build/config/linux:udev" ] |
| 334 | deps += [ "//device/media_transfer_protocol" ] |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 335 | } |
| 336 | if (is_linux && !is_chromeos) { |
[email protected] | 797b2504 | 2014-07-01 23:54:17 | [diff] [blame] | 337 | deps += [ "//build/config/linux:libspeechd" ] |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 338 | } |
| 339 | |
| 340 | if (is_chromeos) { |
| 341 | sources += rebase_path(gypi_values.chrome_browser_chromeos_sources, |
| 342 | ".", "//chrome") |
| 343 | deps += [ |
| 344 | #"browser_chromeos", TODO(GYP) |
| 345 | ] |
| 346 | } else { |
| 347 | # Non-ChromeOS. |
| 348 | sources += rebase_path(gypi_values.chrome_browser_non_chromeos_sources, |
| 349 | ".", "//chrome") |
| 350 | } |
| 351 | |
| 352 | if (use_cups) { |
| 353 | #deps += [ "../printing/printing.gyp:cups" ] TODO(GYP) |
| 354 | } |
| 355 | if (is_desktop_linux) { |
| 356 | sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources, |
| 357 | ".", "//chrome") |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 358 | configs += [ "//build/config/linux:gnome_keyring" ] |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 359 | } |
| 360 | if (use_aura) { |
| 361 | sources += rebase_path(gypi_values.chrome_browser_aura_sources, |
| 362 | ".", "//chrome") |
| 363 | deps += [ |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 364 | "//ui/aura", |
| 365 | "//ui/compositor", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 366 | #"../ui/keyboard/keyboard.gyp:keyboard", TODO(GYP) |
| 367 | ] |
| 368 | } |
| 369 | if (ui_compositor_image_transport) { |
| 370 | deps += [ "//ui/gl" ] |
| 371 | } |
| 372 | |
| 373 | if (use_x11) { |
| 374 | sources += rebase_path(gypi_values.chrome_browser_x11_sources, |
| 375 | ".", "//chrome") |
| 376 | if (!is_chromeos) { |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 377 | configs += [ "//build/config/linux:xscrnsaver" ] |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 378 | } |
| 379 | } |
| 380 | if (is_posix && !is_mac && !is_ios) { |
| 381 | sources += [ |
| 382 | "//chrome/app/chrome_breakpad_client.cc", |
| 383 | "//chrome/app/chrome_breakpad_client.h", |
| 384 | ] |
| 385 | deps += [ |
| 386 | #"../components/components.gyp:breakpad_component", TODO(GYP) |
| 387 | #"../components/components.gyp:breakpad_host", TODO(GYP) |
| 388 | ] |
| 389 | } |
| 390 | if (use_nss_certs) { |
| 391 | sources += rebase_path(gypi_values.chrome_browser_nss_sources, |
| 392 | ".", "//chrome") |
| 393 | } |
| 394 | if (enable_notifications) { |
| 395 | sources += rebase_path(gypi_values.chrome_browser_notifications_sources, |
| 396 | ".", "//chrome") |
| 397 | if (!is_android) { |
| 398 | sources += rebase_path( |
| 399 | gypi_values.chrome_browser_non_android_notifications_sources, |
| 400 | ".", "//chrome") |
| 401 | } |
| 402 | } |
| 403 | if (enable_themes) { |
| 404 | sources += rebase_path(gypi_values.chrome_browser_themes_sources, |
| 405 | ".", "//chrome") |
| 406 | } |
| 407 | |
| 408 | if (enable_printing != 0) { |
| 409 | # Some form of printing support. |
| 410 | sources += rebase_path(gypi_values.chrome_browser_basic_printing_sources, |
| 411 | ".", "//chrome") |
| 412 | deps += [ |
| 413 | #"../printing/printing.gyp:printing", TODO(GYP) |
| 414 | ] |
| 415 | if (is_win && win_pdf_metafile_for_printing) { |
| 416 | sources += rebase_path(gypi_values.chrome_browser_printing_emf_sources, |
| 417 | ".", "//chrome") |
| 418 | } |
| 419 | if (enable_printing == 1) { |
| 420 | # Full printing on top of the above. |
| 421 | sources += rebase_path(gypi_values.chrome_browser_full_printing_sources, |
| 422 | ".", "//chrome") |
| 423 | } else if (enable_printing == 2) { |
| 424 | # Partial-only printing support. |
| 425 | sources += rebase_path( |
| 426 | gypi_values.chrome_browser_basic_only_printing_sources, |
| 427 | ".", "//chrome") |
| 428 | } |
| 429 | } |
| 430 | if (enable_captive_portal_detection) { |
| 431 | sources += rebase_path(gypi_values.chrome_browser_captive_portal_sources, |
| 432 | ".", "//chrome") |
| 433 | } |
| 434 | if (enable_session_service) { |
| 435 | sources += rebase_path(gypi_values.chrome_browser_session_service_sources, |
| 436 | ".", "//chrome") |
| 437 | } |
| 438 | |
| 439 | if (is_android || is_ios) { |
| 440 | # Mobile. |
| 441 | sources += rebase_path(gypi_values.chrome_browser_mobile_sources, |
| 442 | ".", "//chrome") |
| 443 | } else { |
| 444 | # Non-mobile. |
| 445 | sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources, |
| 446 | ".", "//chrome") |
| 447 | } |
| 448 | |
| 449 | if (is_android) { |
| 450 | sources += rebase_path(gypi_values.chrome_browser_android_sources, |
| 451 | ".", "//chrome") |
| 452 | deps += [ |
| 453 | #"../components/components.gyp:cdm_browser", TODO(GYP) |
| 454 | #"../components/components.gyp:web_contents_delegate_android", TODO(GYP) |
| 455 | #"chrome_browser_jni_headers", TODO(GYP) |
| 456 | ] |
| 457 | deps -= [ |
[email protected] | fca567b | 2014-07-02 17:37:34 | [diff] [blame^] | 458 | "//third_party/libaddressinput", |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 459 | #"../components/components.gyp:feedback_component", TODO(GYP) |
| 460 | #"../components/components.gyp:storage_monitor", TODO(GYP) |
| 461 | #"../components/components.gyp:usb_service", TODO(GYP) |
| 462 | #"../components/components.gyp:web_modal", TODO(GYP) |
[email protected] | dffd8a91 | 2014-06-30 23:24:31 | [diff] [blame] | 463 | ] |
| 464 | } else { |
| 465 | sources += rebase_path(gypi_values.chrome_browser_non_android_sources, |
| 466 | ".", "//chrome") |
| 467 | } |
| 468 | |
| 469 | if (is_mac) { |
| 470 | deps += [ |
| 471 | #"../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac", TODO(GYP) |
| 472 | #"../third_party/mozilla/mozilla.gyp:mozilla", TODO(GYP) |
| 473 | ] |
| 474 | libs += [ |
| 475 | "Accelerate.framework", |
| 476 | "AddressBook.framework", |
| 477 | "AudioUnit.framework", |
| 478 | "DiskArbitration.framework", |
| 479 | "IOKit.framework", |
| 480 | "ImageCaptureCore.framework", |
| 481 | "OpenGL.framework", |
| 482 | "QuartzCore.framework", |
| 483 | "SecurityInterface.framework", |
| 484 | ] |
| 485 | } |
| 486 | |
| 487 | if (enable_rlz) { |
| 488 | sources += rebase_path(gypi_values.chrome_browser_rlz_sources, |
| 489 | ".", "//chrome") |
| 490 | deps += [ "//rlz:rlz_lib" ] |
| 491 | } |
| 492 | |
| 493 | # TODO(GYP) |
| 494 | # Temporary fix to break the browser target into smaller chunks so it |
| 495 | # will link with goma builds. |
| 496 | #["OS=="win" and chromium_win_pch==0", { |
| 497 | # "msvs_shard": 4, |
| 498 | #}], |
| 499 | |
| 500 | if (is_win) { |
| 501 | sources += rebase_path(gypi_values.chrome_browser_win_sources, |
| 502 | ".", "//chrome") |
| 503 | deps += [ |
| 504 | "//third_party/wtl", |
| 505 | #"chrome_process_finder", TODO(GYP) |
| 506 | #"installer_util_strings", TODO(GYP) |
| 507 | #"launcher_support", TODO(GYP) |
| 508 | #"../chrome/chrome.gyp:chrome_version_header", TODO(GYP) |
| 509 | #"../chrome_elf/chrome_elf.gyp:chrome_elf", TODO(GYP) |
| 510 | #"../chrome_elf/chrome_elf.gyp:chrome_elf_constants", TODO(GYP) |
| 511 | #"../chrome_elf/chrome_elf.gyp:dll_hash", TODO(GYP) |
| 512 | #"../google_update/google_update.gyp:google_update", TODO(GYP) |
| 513 | #"../third_party/iaccessible2/iaccessible2.gyp:iaccessible2", TODO(GYP) |
| 514 | #"../third_party/isimpledom/isimpledom.gyp:isimpledom", TODO(GYP) |
| 515 | #"../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages", TODO(GYP) |
| 516 | #"../ui/views/controls/webview/webview.gyp:webview", TODO(GYP) |
| 517 | #"../ui/views/views.gyp:views", TODO(GYP) |
| 518 | #"../win8/win8.gyp:metro_viewer", TODO(GYP) |
| 519 | ] |
| 520 | forward_dependent_configs_from += [ |
| 521 | #"../ui/views/controls/webview/webview.gyp:webview", TODO(GYP) |
| 522 | #"../ui/views/views.gyp:views", TODO(GYP) |
| 523 | ] |
| 524 | } else { |
| 525 | # Non-Windows. |
| 526 | sources += rebase_path(gypi_values.chrome_browser_non_win_sources, |
| 527 | ".", "//chrome") |
| 528 | if (use_aura) { |
| 529 | deps += [ |
| 530 | #"../ui/views/controls/webview/webview.gyp:webview", TODO(GYP) |
| 531 | #"../ui/views/views.gyp:views", TODO(GYP) |
| 532 | ] |
| 533 | # TODO(GYP) why is this needed? Very susicious. |
| 534 | # "include_dirs": [ |
| 535 | # "<(INTERMEDIATE_DIR)/chrome", |
| 536 | # ], |
| 537 | } |
| 538 | } |
| 539 | |
| 540 | if (is_linux) { |
| 541 | sources += rebase_path(gypi_values.chrome_browser_linux_sources, |
| 542 | ".", "//chrome") |
| 543 | if (use_aura) { |
| 544 | configs += [ |
| 545 | "//build/config/linux:dbus", |
| 546 | "//build/config/linux:fontconfig", |
| 547 | ] |
| 548 | deps += [ |
| 549 | "//dbus", |
| 550 | ] |
| 551 | } |
| 552 | if (use_x11) { |
| 553 | configs += [ "//build/config/linux:x11" ] |
| 554 | deps += [ "//ui/gfx/x" ] |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | if (is_desktop_linux) { |
| 559 | sources += rebase_path(gypi_values.chrome_browser_desktop_linux_sources, |
| 560 | ".", "//chrome") |
| 561 | } |
| 562 | if (enable_plugin_installation) { |
| 563 | sources += rebase_path( |
| 564 | gypi_values.chrome_browser_plugin_installation_sources, |
| 565 | ".", "//chrome") |
| 566 | } |
| 567 | if (enable_app_list) { |
| 568 | deps += [ |
| 569 | #"../ui/app_list/app_list.gyp:app_list", TODO(GYP) |
| 570 | ] |
| 571 | } |
| 572 | if (enable_managed_users) { |
| 573 | sources += rebase_path( |
| 574 | gypi_values.chrome_browser_supervised_user_sources, |
| 575 | ".", "//chrome") |
| 576 | } |
| 577 | if (enable_webrtc) { |
| 578 | sources += rebase_path( |
| 579 | gypi_values.chrome_browser_webrtc_sources, |
| 580 | ".", "//chrome") |
| 581 | } |
| 582 | if (enable_service_discovery) { |
| 583 | sources += rebase_path( |
| 584 | gypi_values.chrome_browser_service_discovery_sources, |
| 585 | ".", "//chrome") |
| 586 | } |
| 587 | if (enable_mdns) { |
| 588 | sources += rebase_path( |
| 589 | gypi_values.chrome_browser_mdns_sources, |
| 590 | ".", "//chrome") |
| 591 | } |
| 592 | if (!enable_autofill_dialog || is_android || is_ios) { |
| 593 | sources -= [ |
| 594 | "autofill/validation_rules_storage_factory.cc", |
| 595 | "autofill/validation_rules_storage_factory.h", |
| 596 | ] |
| 597 | } |
| 598 | if (enable_wifi_bootstrapping) { |
| 599 | sources += rebase_path( |
| 600 | gypi_values.chrome_browser_wifi_bootstrapping_sources, |
| 601 | ".", "//chrome") |
| 602 | if (is_win || is_mac) { |
| 603 | # TODO(brettw) as of this writing wifi bootstrapping is set on Windows |
| 604 | # and Mac, so this test is meaningless. Can we merge these lists? |
| 605 | sources += rebase_path( |
| 606 | gypi_values.chrome_browser_win_mac_wifi_bootstrapping_sources, |
| 607 | ".", "//chrome") |
| 608 | } |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | } # comment out chrome/browser |
| 613 | |
[email protected] | 77ce802 | 2014-06-16 19:29:56 | [diff] [blame] | 614 | # GYP version: chrome/chrome_resources.gyp:chrome_resources |
| 615 | # (generate_browser_resources action) |
| 616 | grit("resources") { |
| 617 | source = "browser_resources.grd" |
| 618 | |
| 619 | omnibox_mojom_file = "$root_gen_dir/chrome/browser/ui/webui/omnibox/omnibox.mojom.js" |
| 620 | |
| 621 | grit_flags = [ |
| 622 | "-E", "about_credits_file=" + |
| 623 | rebase_path(about_credits_file, root_build_dir), |
| 624 | "-E", "additional_modules_list_file=" + |
| 625 | rebase_path(additional_modules_list_file, root_build_dir), |
| 626 | "-E", "omnibox_mojom_file=" + |
| 627 | rebase_path(omnibox_mojom_file, root_build_dir), |
| 628 | ] |
| 629 | |
| 630 | deps = [ |
| 631 | ":about_credits", |
| 632 | ":chrome_internal_resources_gen", |
| 633 | "//chrome/browser/ui/webui/omnibox:mojo_bindings", |
| 634 | ] |
| 635 | } |
| 636 | |
| 637 | # GYP version: chrome/chrome_resource.gyp:about_credits |
| 638 | action("about_credits") { |
| 639 | script = "//tools/licenses.py" |
| 640 | |
| 641 | # TODO(phajdan.jr): input dependencies so this can be regenerated |
| 642 | # automatically when one of the credits changes. The way this should work is |
| 643 | # that licenses.py should write a .d file listing the input dependencies (see |
| 644 | # "depfile" in GN). |
| 645 | outputs = [ about_credits_file ] |
| 646 | |
| 647 | args = [ |
| 648 | "credits", |
| 649 | rebase_path(about_credits_file, root_build_dir), |
| 650 | ] |
| 651 | } |
| 652 | |
| 653 | # GYP version: chrome/chrome_resource.gyp:chrome_internal_resources_gen |
| 654 | # TODO(GYP) write internal action |
| 655 | if (false) { #if (is_chrome_branded) { |
| 656 | action("chrome_internal_resources_gen") { |
| 657 | # TODO(GYP) |
| 658 | } |
| 659 | } else { |
| 660 | group("chrome_internal_resources_gen") { |
| 661 | # Empty placeholder. |
| 662 | } |
| 663 | } |