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