blob: ee61da5dacba6b6788629c78ad2db92c51fd8e0d [file] [log] [blame]
James Robinson646469d2014-10-03 15:33:28 -07001# 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
14if (is_android) {
15 import("//build/config/android/config.gni")
16}
17
18declare_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 Lerman507bb1a2015-02-26 13:15:17 +010025 # 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 Moorecc0e4f92015-03-10 15:23:04 -070033 # 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 Lerman507bb1a2015-02-26 13:15:17 +010037 enable_nacl_untrusted = enable_nacl
38 enable_pnacl = enable_nacl_untrusted
James Robinson646469d2014-10-03 15:33:28 -070039
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 Lerman507bb1a2015-02-26 13:15:17 +010047 # TODO(GYP) make mac and android work.
48 enable_webrtc = !is_ios && !is_mac && !is_android
James Robinson30d547e2014-10-23 18:20:06 -070049
50 # Enables proprietary codecs and demuxers; e.g. H264, MOV, AAC, and MP3.
51 proprietary_codecs = false
Dave Moorecc0e4f92015-03-10 15:23:04 -070052
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 Robinson646469d2014-10-03 15:33:28 -070075}
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 Robinson3f862972014-11-18 16:50:38 -080083if (is_android) {
James Robinson646469d2014-10-03 15:33:28 -070084 cld_version = 1
85} else {
86 cld_version = 2
87}
88
89# libudev usage. This currently only affects the content layer.
90use_udev = is_linux
91
92# Enable the spell checker.
93enable_spellcheck = !is_android
94
95enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win)
96
97enable_browser_cdms = is_android
98
James Robinson1ae030a2014-11-07 08:32:47 -080099# Enable basic printing support and UI.
100enable_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.
104enable_print_preview = !is_android
James Robinson646469d2014-10-03 15:33:28 -0700105
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 Lermane8ca9b72015-02-24 16:42:13 +0100110use_seccomp_bpf = (is_linux || is_android) &&
111 (current_cpu == "x86" || current_cpu == "x64" ||
112 current_cpu == "arm" || current_cpu == "mipsel")
James Robinson646469d2014-10-03 15:33:28 -0700113
James Robinson6e9a1c92014-11-13 17:05:42 -0800114# Enable notifications everywhere except iOS.
115enable_notifications = !is_ios
James Robinson646469d2014-10-03 15:33:28 -0700116
117# TODO(brettw) this should be moved to net and only dependents get this define.
118disable_ftp_support = is_ios
119
James Robinson6a64b812014-12-03 13:38:42 -0800120enable_web_speech = !is_android && !is_ios
James Robinson646469d2014-10-03 15:33:28 -0700121
122use_dbus = is_linux
123
James Robinson6a64b812014-12-03 13:38:42 -0800124enable_extensions = !is_android && !is_ios
James Robinson646469d2014-10-03 15:33:28 -0700125
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 Robinson6a64b812014-12-03 13:38:42 -0800131if (is_android) {
132 safe_browsing_mode = 2
133} else if (is_ios) {
James Robinson646469d2014-10-03 15:33:28 -0700134 safe_browsing_mode = 0
135} else {
136 safe_browsing_mode = 1
137}
138
James Robinson646469d2014-10-03 15:33:28 -0700139enable_task_manager = !is_ios && !is_android
140
141use_cups = is_desktop_linux || is_mac
142
James Robinsone2ac7e82014-10-15 13:21:59 -0700143enable_themes = !is_android && !is_ios
James Robinson646469d2014-10-03 15:33:28 -0700144
145# TODO(scottmg) remove this when we've fixed printing.
146win_pdf_metafile_for_printing = true
147
James Robinson646469d2014-10-03 15:33:28 -0700148# Whether we are using the rlz library or not. Platforms like Android send
149# rlz codes for searches but do not use the library.
150enable_rlz = is_chrome_branded && (is_win || is_mac || is_ios || is_chromeos)
151
James Robinson646469d2014-10-03 15:33:28 -0700152enable_settings_app = enable_app_list && !is_chromeos
153
James Robinson646469d2014-10-03 15:33:28 -0700154enable_service_discovery = enable_mdns || is_mac
155
James Robinson646469d2014-10-03 15:33:28 -0700156enable_wifi_bootstrapping = is_win || is_mac
157
158# Image loader extension is enabled on ChromeOS only.
159enable_image_loader_extension = is_chromeos
160
161enable_remoting = !is_ios && !is_android
162
James Robinson646469d2014-10-03 15:33:28 -0700163# Chrome OS: whether to also build the upcoming version of
164# ChromeVox, which can then be enabled via a command-line switch.
165enable_chromevox_next = false
166
167# Use brlapi from brltty for braille display support.
168use_brlapi = is_chromeos
169
Benjamin Lerman507bb1a2015-02-26 13:15:17 +0100170enable_media_router = !is_ios && !is_android
171
James Robinson646469d2014-10-03 15:33:28 -0700172# Option controlling the use of GConf (the classic GNOME configuration
173# system).
174# TODO(GYP) also require !embedded to enable.
175use_gconf = is_linux && !is_chromeos
James Robinson6a64b812014-12-03 13:38:42 -0800176
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.
180enable_hangout_services_extension = false
Nick Bray0bcbd3b2015-03-12 16:29:36 -0700181
182# Whether to back up data before sync.
183enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos)