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