1d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# Copyright 2014 The Chromium Authors. All rights reserved.
2d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# Use of this source code is governed by a BSD-style license that can be
3d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# found in the LICENSE file.
4d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
5d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# This file contains UI-related build flags. It should theoretically be in the
6d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# src/ui directory and only things that depend on the ui module should get the
73551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)# definitions.
8d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch#
9d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# However, today we have many "bad" dependencies on some of these flags from,
10d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# e.g. base, so they need to be global.
11d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch#
12d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# See also build/config/ui.gni
13d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
14d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochif (is_android) {
15d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  import("//build/config/android/config.gni")
16d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch}
17d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
183551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)declare_args() {
193551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  # Multicast DNS.
203551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  enable_mdns = is_win || is_linux
213551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)
223551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  enable_plugins = !is_android && !is_ios
23d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
24d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  # Enables Native Client support.
25d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  # TODO(GYP) enable this when nacl works in GN.
263551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  enable_nacl = false
273551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  #enable_nacl = (!is_ios && !is_android)
28d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
29d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  # If debug_devtools is set to true, JavaScript files for DevTools are stored
30d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  # as is and loaded from disk. Otherwise, a concatenated file is stored in
31d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  # resources.pak. It is still possible to load JS files from disk by passing
32d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  # --debug-devtools cmdline switch.
33d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  debug_devtools = false
34d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
35d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  # Enables WebRTC.
36d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  #enable_webrtc = !is_ios  TODO(GYP) use this condition when WebRTC works in
373551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  #                         the GN build.
38d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  enable_webrtc = false
39d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch}
40d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
41d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# Additional dependent variables -----------------------------------------------
423551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)
433551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)# Set the version of CLD.
443551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)#   0: Don't specify the version. This option is for the Finch testing.
453551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)#   1: Use only CLD1.
463551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)#   2: Use only CLD2.
47d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochif (is_android || is_ios) {
48d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  cld_version = 1
49d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch} else {
503551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  cld_version = 2
513551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)}
52d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
53d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# libudev usage. This currently only affects the content layer.
543551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)use_udev = is_linux
55d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
56d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# Enable the spell checker.
57d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochenable_spellcheck = !is_android
580f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
590f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win)
60d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
61d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochenable_browser_cdms = is_android
62d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
63d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# Enable printing support and UI. This variable is used to configure which
640f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)# parts of printing will be built. 0 disables printing completely, 1 enables it
65d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# fully, and 2 enables only the codepath to generate a Metafile (e.g.  usually
66d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# a PDF or EMF) and disables print preview, cloud print, UI, etc.
670f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)if (is_android) {
680f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)  printing_mode = 2
69d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch} else {
70d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  printing_mode = 1
71d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch}
72d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
73d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# The seccomp-bpf sandbox is only supported on three architectures
74d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# currently.
75d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# Do not disable seccomp_bpf anywhere without talking to
76d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# security@chromium.org!
77d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochuse_seccomp_bpf = (is_linux || is_android) &&
78d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  (cpu_arch == "x86" || cpu_arch == "x64" || cpu_arch == "arm")
79d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
80d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# Enable notifications everywhere except Android/iOS.
81d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# Android is http://crbug.com/115320
82d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochenable_notifications = !is_android && !is_ios
83d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
84d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# TODO(brettw) this should be moved to net and only dependents get this define.
85d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochdisable_ftp_support = is_ios
86d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
87d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochenable_web_speech = (!is_android && !is_ios)
88d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
89d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochuse_dbus = is_linux
90d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
91d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochenable_extensions = (!is_android && !is_ios)
923551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)
933551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)# Variable safe_browsing is used to control the build time configuration for
94d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# safe browsing feature. Safe browsing can be compiled in 3 different levels: 0
95d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# disables it, 1 enables it fully, and 2 enables only UI and reporting features
96d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# without enabling phishing and malware detection. This is useful to integrate
97d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# a third party phishing/malware detection to existing safe browsing logic.
983551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)if (is_android) {
99d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  safe_browsing_mode = 2
100d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch} else if (is_ios) {
1013551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)  safe_browsing_mode = 0
1023551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)} else {
103d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch  safe_browsing_mode = 1
104d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch}
105d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch
106d3868032626d59662ff73b372b5d584c1d144c53Ben Murdochenable_configuration_policy = true
1073551c9c881056c480085172ff9840cab31610854Torne (Richard Coles)
108d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# The data acquisition mode for CLD2. Possible values are:
109d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch#   static:     CLD2 data is statically linked to the executable.
110d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch#   standalone: CLD2 data is provided in a standalone file that is
111d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch#               bundled with the executable.
112d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch#   component:  CLD2 data is provided as a Chrome "component" and is
1130f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)#               downloaded via the component updater.
114d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch#
115d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# For more information on switching the CLD2 data source, see:
1160f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)#   https://sites.google.com/a/chromium.org/dev/developers/how-tos/compact-language-detector-cld-data-source-configuration
1170f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)cld2_data_source = "static"
1180f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
1190f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)# Enables support for background apps.
1200f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)enable_background = !is_ios && !is_android
1210f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
1220f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)enable_task_manager = !is_ios && !is_android
1230f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
1240f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)use_cups = is_desktop_linux || is_mac
1250f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
1260f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)enable_themes = !is_android && !is_chromeos
1270f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
128d3868032626d59662ff73b372b5d584c1d144c53Ben Murdoch# TODO(scottmg) remove this when we've fixed printing.
129f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)win_pdf_metafile_for_printing = true
130f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
131f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)enable_captive_portal_detection = !is_android && !is_ios
132f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
133f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)# Enables use of the session service, which is enabled by default.
134f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)# Android stores them separately on the Java side.
135f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)enable_session_service = !is_android && !is_ios
136f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
137f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)# Whether we are using the rlz library or not.  Platforms like Android send
138# rlz codes for searches but do not use the library.
139enable_rlz = is_chrome_branded && (is_win || is_mac || is_ios || is_chromeos)
140
141enable_plugin_installation = is_win || is_mac
142
143enable_app_list = !is_ios && !is_android
144enable_settings_app = enable_app_list && !is_chromeos
145
146enable_managed_users = !is_ios
147
148enable_service_discovery = enable_mdns || is_mac
149
150enable_autofill_dialog = !is_ios && !(is_android && is_android_webview_build)
151
152enable_wifi_bootstrapping = is_win || is_mac
153
154# Image loader extension is enabled on ChromeOS only.
155enable_image_loader_extension = is_chromeos
156
157enable_remoting = !is_ios && !is_android
158
159enable_google_now = !is_ios && !is_android
160
161enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos)
162
163# 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
170# Option controlling the use of GConf (the classic GNOME configuration
171# system).
172# TODO(GYP) also require !embedded to enable.
173use_gconf = is_linux && !is_chromeos
174