James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [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 | |
| 5 | # This file contains UI-related build flags. It should theoretically be in the |
| 6 | # src/ui directory and only things that depend on the ui module should get the |
| 7 | # definitions. |
| 8 | # |
| 9 | # However, today we have many "bad" dependencies on some of these flags from, |
| 10 | # e.g. base, so they need to be global. |
| 11 | # |
| 12 | # See also build/config/ui.gni |
| 13 | |
| 14 | if (is_android) { |
| 15 | import("//build/config/android/config.gni") |
| 16 | } |
| 17 | |
| 18 | declare_args() { |
| 19 | # Multicast DNS. |
| 20 | enable_mdns = is_win || is_linux |
| 21 | |
| 22 | enable_plugins = !is_android && !is_ios |
| 23 | |
| 24 | # Enables Native Client support. |
Benjamin Lerman | 507bb1a | 2015-02-26 13:15:17 +0100 | [diff] [blame] | 25 | # TODO(GYP): Get NaCl linking on other platforms. |
| 26 | # Also, see if we can always get rid of enable_nacl_untrusted and |
| 27 | # enable_pnacl and always build them if enable_nacl is true. |
| 28 | # The "is_nacl" part of the condition is needed to ensure that |
| 29 | # the untrusted code is built properly; arguably it should be |
| 30 | # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but |
| 31 | # this will go away when Mac and Win are working and we can just use |
| 32 | # the commented out logic. |
Dave Moore | cc0e4f9 | 2015-03-10 15:23:04 -0700 | [diff] [blame] | 33 | # Eventually we want this to be: |
| 34 | # enable_nacl = !is_ios && !is_android |
| 35 | enable_nacl = |
| 36 | (is_linux && !is_chromeos && !is_debug && current_cpu == "x64") || is_nacl |
Benjamin Lerman | 507bb1a | 2015-02-26 13:15:17 +0100 | [diff] [blame] | 37 | enable_nacl_untrusted = enable_nacl |
| 38 | enable_pnacl = enable_nacl_untrusted |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 39 | |
| 40 | # If debug_devtools is set to true, JavaScript files for DevTools are stored |
| 41 | # as is and loaded from disk. Otherwise, a concatenated file is stored in |
| 42 | # resources.pak. It is still possible to load JS files from disk by passing |
| 43 | # --debug-devtools cmdline switch. |
| 44 | debug_devtools = false |
| 45 | |
| 46 | # Enables WebRTC. |
Benjamin Lerman | 507bb1a | 2015-02-26 13:15:17 +0100 | [diff] [blame] | 47 | # TODO(GYP) make mac and android work. |
| 48 | enable_webrtc = !is_ios && !is_mac && !is_android |
James Robinson | 30d547e | 2014-10-23 18:20:06 -0700 | [diff] [blame] | 49 | |
| 50 | # Enables proprietary codecs and demuxers; e.g. H264, MOV, AAC, and MP3. |
| 51 | proprietary_codecs = false |
Dave Moore | cc0e4f9 | 2015-03-10 15:23:04 -0700 | [diff] [blame] | 52 | |
| 53 | enable_configuration_policy = true |
| 54 | |
| 55 | # Enables support for background apps. |
| 56 | enable_background = !is_ios && !is_android |
| 57 | |
| 58 | enable_captive_portal_detection = !is_android && !is_ios |
| 59 | |
| 60 | # Enables use of the session service, which is enabled by default. |
| 61 | # Android stores them separately on the Java side. |
| 62 | enable_session_service = !is_android && !is_ios |
| 63 | |
| 64 | enable_plugin_installation = is_win || is_mac |
| 65 | |
| 66 | enable_app_list = !is_ios && !is_android |
| 67 | |
| 68 | enable_supervised_users = !is_ios |
| 69 | |
| 70 | enable_autofill_dialog = !is_ios && !(is_android && is_android_webview_build) |
| 71 | |
| 72 | enable_google_now = !is_ios && !is_android |
| 73 | |
| 74 | enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos) |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | # Additional dependent variables ----------------------------------------------- |
| 78 | |
| 79 | # Set the version of CLD. |
| 80 | # 0: Don't specify the version. This option is for the Finch testing. |
| 81 | # 1: Use only CLD1. |
| 82 | # 2: Use only CLD2. |
James Robinson | 3f86297 | 2014-11-18 16:50:38 -0800 | [diff] [blame] | 83 | if (is_android) { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 84 | cld_version = 1 |
| 85 | } else { |
| 86 | cld_version = 2 |
| 87 | } |
| 88 | |
| 89 | # libudev usage. This currently only affects the content layer. |
| 90 | use_udev = is_linux |
| 91 | |
| 92 | # Enable the spell checker. |
| 93 | enable_spellcheck = !is_android |
| 94 | |
| 95 | enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win) |
| 96 | |
| 97 | enable_browser_cdms = is_android |
| 98 | |
James Robinson | 1ae030a | 2014-11-07 08:32:47 -0800 | [diff] [blame] | 99 | # Enable basic printing support and UI. |
| 100 | enable_basic_printing = !is_chromeos |
| 101 | |
| 102 | # Enable printing with print preview. It does not imply |
| 103 | # enable_basic_printing. It's possible to build Chrome with preview only. |
| 104 | enable_print_preview = !is_android |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 105 | |
| 106 | # The seccomp-bpf sandbox is only supported on three architectures |
| 107 | # currently. |
| 108 | # Do not disable seccomp_bpf anywhere without talking to |
| 109 | # security@chromium.org! |
Benjamin Lerman | e8ca9b7 | 2015-02-24 16:42:13 +0100 | [diff] [blame] | 110 | use_seccomp_bpf = (is_linux || is_android) && |
| 111 | (current_cpu == "x86" || current_cpu == "x64" || |
| 112 | current_cpu == "arm" || current_cpu == "mipsel") |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 113 | |
James Robinson | 6e9a1c9 | 2014-11-13 17:05:42 -0800 | [diff] [blame] | 114 | # Enable notifications everywhere except iOS. |
| 115 | enable_notifications = !is_ios |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 116 | |
| 117 | # TODO(brettw) this should be moved to net and only dependents get this define. |
| 118 | disable_ftp_support = is_ios |
| 119 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 120 | enable_web_speech = !is_android && !is_ios |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 121 | |
| 122 | use_dbus = is_linux |
| 123 | |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 124 | enable_extensions = !is_android && !is_ios |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 125 | |
| 126 | # Variable safe_browsing is used to control the build time configuration for |
| 127 | # safe browsing feature. Safe browsing can be compiled in 3 different levels: 0 |
| 128 | # disables it, 1 enables it fully, and 2 enables only UI and reporting features |
| 129 | # without enabling phishing and malware detection. This is useful to integrate |
| 130 | # a third party phishing/malware detection to existing safe browsing logic. |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 131 | if (is_android) { |
| 132 | safe_browsing_mode = 2 |
| 133 | } else if (is_ios) { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 134 | safe_browsing_mode = 0 |
| 135 | } else { |
| 136 | safe_browsing_mode = 1 |
| 137 | } |
| 138 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 139 | enable_task_manager = !is_ios && !is_android |
| 140 | |
| 141 | use_cups = is_desktop_linux || is_mac |
| 142 | |
James Robinson | e2ac7e8 | 2014-10-15 13:21:59 -0700 | [diff] [blame] | 143 | enable_themes = !is_android && !is_ios |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 144 | |
| 145 | # TODO(scottmg) remove this when we've fixed printing. |
| 146 | win_pdf_metafile_for_printing = true |
| 147 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 148 | # Whether we are using the rlz library or not. Platforms like Android send |
| 149 | # rlz codes for searches but do not use the library. |
| 150 | enable_rlz = is_chrome_branded && (is_win || is_mac || is_ios || is_chromeos) |
| 151 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 152 | enable_settings_app = enable_app_list && !is_chromeos |
| 153 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 154 | enable_service_discovery = enable_mdns || is_mac |
| 155 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 156 | enable_wifi_bootstrapping = is_win || is_mac |
| 157 | |
| 158 | # Image loader extension is enabled on ChromeOS only. |
| 159 | enable_image_loader_extension = is_chromeos |
| 160 | |
| 161 | enable_remoting = !is_ios && !is_android |
| 162 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 163 | # Chrome OS: whether to also build the upcoming version of |
| 164 | # ChromeVox, which can then be enabled via a command-line switch. |
| 165 | enable_chromevox_next = false |
| 166 | |
| 167 | # Use brlapi from brltty for braille display support. |
| 168 | use_brlapi = is_chromeos |
| 169 | |
Benjamin Lerman | 507bb1a | 2015-02-26 13:15:17 +0100 | [diff] [blame] | 170 | enable_media_router = !is_ios && !is_android |
| 171 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 172 | # Option controlling the use of GConf (the classic GNOME configuration |
| 173 | # system). |
| 174 | # TODO(GYP) also require !embedded to enable. |
| 175 | use_gconf = is_linux && !is_chromeos |
James Robinson | 6a64b81 | 2014-12-03 13:38:42 -0800 | [diff] [blame] | 176 | |
| 177 | # Hangout services is an extension that adds extra features to Hangouts. |
| 178 | # For official GYP builds, this flag is set, it will likely need to be |
| 179 | # parameterized in the future for a similar use. |
| 180 | enable_hangout_services_extension = false |
Nick Bray | 0bcbd3b | 2015-03-12 16:29:36 -0700 | [diff] [blame^] | 181 | |
| 182 | # Whether to back up data before sync. |
| 183 | enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) |