Sync defines with the GYP build.
[chromium-blink-merge.git] / build / config / features.gni
blob74f61cdcd656eda438123da9afc74375d82eb72b
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.
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.
9 # However, today we have many "bad" dependencies on some of these flags from,
10 # e.g. base, so they need to be global.
12 # See also build/config/ui.gni
14 import("//build/config/chrome_build.gni")
15 if (is_android) {
16   import("//build/config/android/config.gni")
19 declare_args() {
20   # Multicast DNS.
21   enable_mdns = is_win || is_linux
23   enable_plugins = !is_android && !is_ios
25   # Enables Native Client support.
26   # TODO(GYP): Get NaCl linking on other platforms.
27   # Also, see if we can always get rid of enable_nacl_untrusted and
28   # enable_pnacl and always build them if enable_nacl is true.
29   # The "is_nacl" part of the condition is needed to ensure that
30   # the untrusted code is built properly; arguably it should be
31   # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but
32   # this will go away when Mac and Win are working and we can just use
33   # the commented out logic.
34   # Eventually we want this to be:
35   #   enable_nacl = !is_ios && !is_android
36   enable_nacl = (is_linux && !is_chromeos && current_cpu == "x64") || is_nacl
37   enable_nacl_untrusted = enable_nacl
38   enable_pnacl = enable_nacl_untrusted
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
46   # Enables WebRTC.
47   # TODO(GYP) make mac and android work.
48   enable_webrtc = !is_ios && !is_mac && !is_android
50   # Enables the Media Router.
51   enable_media_router = !is_ios && !is_android
53   # Enables proprietary codecs and demuxers; e.g. H264, MOV, AAC, and MP3.
54   # Android OS includes support for proprietary codecs regardless of building
55   # Chromium or Google Chrome. We also ship Google Chrome and Chromecast with
56   # proprietary codecs.
57   # TODO(GYP) The GYP build has || chromecast==1 for this:
58   proprietary_codecs = is_android || is_chrome_branded
60   enable_configuration_policy = true
62   # Enables support for background apps.
63   enable_background = !is_ios && !is_android
65   enable_captive_portal_detection = !is_android && !is_ios
67   # Enables use of the session service, which is enabled by default.
68   # Android stores them separately on the Java side.
69   enable_session_service = !is_android && !is_ios
71   enable_plugin_installation = is_win || is_mac
73   enable_app_list = !is_ios && !is_android
75   enable_supervised_users = !is_ios
77   enable_autofill_dialog = !is_ios
79   enable_google_now = !is_ios && !is_android
81   enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos)
83   enable_remoting = !is_ios && !is_android
85   # Enable hole punching for the protected video.
86   enable_video_hole = is_android
88   # Enables browser side Content Decryption Modules. Required for embedders
89   # (e.g. Android and ChromeCast) that use a browser side CDM.
90   enable_browser_cdms = is_android
92   # Variable safe_browsing is used to control the build time configuration for
93   # safe browsing feature. Safe browsing can be compiled in 3 different levels:
94   # 0 disables it, 1 enables it fully, and 2 enables only UI and reporting
95   # features without enabling phishing and malware detection. This is useful to
96   # integrate a third party phishing/malware detection to existing safe browsing
97   # logic.
98   if (is_android) {
99     safe_browsing_mode = 2
100   } else if (is_ios) {
101     safe_browsing_mode = 0
102   } else {
103     safe_browsing_mode = 1
104   }
107 # Additional dependent variables -----------------------------------------------
109 # Set the version of CLD.
110 #   0: Don't specify the version. This option is for the Finch testing.
111 #   1: Use only CLD1.
112 #   2: Use only CLD2.
113 if (is_android) {
114   cld_version = 1
115 } else {
116   cld_version = 2
119 # libudev usage. This currently only affects the content layer.
120 use_udev = is_linux
122 # Enable the spell checker.
123 enable_spellcheck = !is_android
125 enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win)
127 # Enable basic printing support and UI.
128 enable_basic_printing = !is_chromeos
130 # Enable printing with print preview. It does not imply
131 # enable_basic_printing. It's possible to build Chrome with preview only.
132 enable_print_preview = !is_android
134 # The seccomp-bpf sandbox is only supported on three architectures
135 # currently.
136 # Do not disable seccomp_bpf anywhere without talking to
137 # security@chromium.org!
138 use_seccomp_bpf = (is_linux || is_android) &&
139                   (current_cpu == "x86" || current_cpu == "x64" ||
140                    current_cpu == "arm" || current_cpu == "mipsel")
142 # Enable notifications everywhere except iOS.
143 enable_notifications = !is_ios
145 # TODO(brettw) this should be moved to net and only dependents get this define.
146 disable_ftp_support = is_ios
148 enable_web_speech = !is_android && !is_ios
150 use_dbus = is_linux
152 enable_extensions = !is_android && !is_ios
154 enable_task_manager = !is_ios && !is_android
156 use_cups = is_desktop_linux || is_mac
158 enable_themes = !is_android && !is_ios
160 # TODO(scottmg) remove this when we've fixed printing.
161 win_pdf_metafile_for_printing = true
163 # Whether we are using the rlz library or not.  Platforms like Android send
164 # rlz codes for searches but do not use the library.
165 enable_rlz = is_chrome_branded && (is_win || is_mac || is_ios || is_chromeos)
167 enable_settings_app = enable_app_list && !is_chromeos
169 enable_service_discovery = enable_mdns || is_mac
171 enable_wifi_bootstrapping = is_win || is_mac
173 # Image loader extension is enabled on ChromeOS only.
174 enable_image_loader_extension = is_chromeos
176 # Chrome OS: whether to also build the upcoming version of
177 # ChromeVox, which can then be enabled via a command-line switch.
178 enable_chromevox_next = false
180 # Use brlapi from brltty for braille display support.
181 use_brlapi = is_chromeos
183 enable_media_router = !is_ios && !is_android
185 # Option controlling the use of GConf (the classic GNOME configuration
186 # system).
187 # TODO(GYP) also require !embedded to enable.
188 use_gconf = is_linux && !is_chromeos
190 # Hangout services is an extension that adds extra features to Hangouts.
191 # For official GYP builds, this flag is set, it will likely need to be
192 # parameterized in the future for a similar use.
193 enable_hangout_services_extension = false
195 # Whether to back up data before sync.
196 enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos)