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