blob: bf177ce00b77e71769e9a36dda18963b0f111651 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001# 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 Chrome-feature-related build flags (see ui.gni for
6# UI-related ones). These should theoretically be moved to the build files of
7# the features themselves.
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 to match the GYP configuration. Also,
11# anything that needs a grit define must be in either this file or ui.gni.
12#
13# PLEASE TRY TO AVOID ADDING FLAGS TO THIS FILE in cases where grit isn't
14# required. See the declare_args block of BUILDCONFIG.gn for advice on how
15# to set up feature flags.
16
17import("//build/config/chrome_build.gni")
18import("//build/config/chromecast_build.gni")
19if (is_android) {
20 import("//build/config/android/config.gni")
21}
22
23declare_args() {
24 # Multicast DNS.
25 enable_mdns = is_win || is_linux
26
27 enable_extensions = !is_android && !is_ios
28 enable_plugins = (!is_android && !is_ios) || is_chromecast
29 enable_pdf = !is_android && !is_ios && !is_chromecast
30
31 # Enables Native Client support.
32 # TODO(mcgrathr): When mipsel-nacl-clang is available, drop the exclusion.
33 enable_nacl =
34 !is_ios && !is_android && !is_chromecast && current_cpu != "mipsel"
35
36 # If debug_devtools is set to true, JavaScript files for DevTools are stored
37 # as is and loaded from disk. Otherwise, a concatenated file is stored in
38 # resources.pak. It is still possible to load JS files from disk by passing
39 # --debug-devtools cmdline switch.
40 debug_devtools = false
41
42 # Enables WebRTC.
43 enable_webrtc = !is_ios
44
45 # Enables the Media Router.
46 enable_media_router = !is_ios
47
48 # Enables proprietary codecs and demuxers; e.g. H264, AAC, MP3, and MP4.
49 # We always build Google Chrome and Chromecast with proprietary codecs.
50 proprietary_codecs = is_chrome_branded || is_chromecast
51
52 enable_captive_portal_detection = !is_android && !is_ios
53
54 # Enables use of the session service, which is enabled by default.
55 # Android stores them separately on the Java side.
56 enable_session_service = !is_android && !is_ios
57
58 enable_plugin_installation = is_win || is_mac
59
60 enable_app_list = !is_ios && !is_android && !is_chromecast
61
62 enable_supervised_users = !is_ios
63
64 enable_remoting = !is_ios && !is_chromecast
65
66 # Enable hole punching for the protected video.
67 enable_video_hole = is_android
68
69 # Enables browser side Content Decryption Modules. Required for embedders
70 # (e.g. Android and ChromeCast) that use a browser side CDM.
71 enable_browser_cdms = is_android || is_chromecast
72
73 # Hangout services is an extension that adds extra features to Hangouts.
74 # For official GYP builds, this flag is set.
75 enable_hangout_services_extension = false
76
77 # Variable safe_browsing is used to control the build time configuration for
78 # safe browsing feature. Safe browsing can be compiled in 3 different levels:
79 # 0 disables it, 1 enables it fully, and 2 enables mobile protection via an
80 # external API.
81 if (is_android) {
82 safe_browsing_mode = 2
83 } else if (is_ios) {
84 safe_browsing_mode = 0
85 } else {
86 safe_browsing_mode = 1
87 }
88
89 # Set to true make a build that disables activation of field trial tests
90 # specified in testing/variations/fieldtrial_testing_config_*.json.
91 # Note: this setting is ignored if is_chrome_branded.
92 fieldtrial_testing_like_official_build = is_chrome_branded
93
94 use_cups = (is_desktop_linux || is_mac) && !is_chromecast
95
96 # Enables Wi-Fi Display functionality
97 # WARNING: This enables MPEG Transport Stream (MPEG-TS) encoding!
98 enable_wifi_display = false
99
100 # libudev usage. This currently only affects the content layer.
101 use_udev = is_linux && !is_chromecast
102
103 use_dbus = is_linux && !is_chromecast
104
105 # Option controlling the use of GConf (the classic GNOME configuration
106 # system).
107 use_gconf = is_linux && !is_chromeos && !is_chromecast
108
109 use_gio = is_linux && !is_chromeos && !is_chromecast
110
111 # Enable basic printing support and UI.
112 enable_basic_printing = !is_chromeos && !is_chromecast && !is_ios
113
114 # Enable printing with print preview. It does not imply
115 # enable_basic_printing. It's possible to build Chrome with preview only.
116 enable_print_preview = !is_android && !is_chromecast && !is_ios
117}
118
119# Additional dependent variables -----------------------------------------------
120
121# Enable the spell checker.
122enable_spellcheck = !is_ios
123
124# Use the operating system's spellchecker rather than hunspell.
125use_browser_spellchecker = is_android || is_mac
126
127# Enables the use of CDMs in pepper plugins.
128enable_pepper_cdms =
129 enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast
130
131# The seccomp-bpf sandbox is only supported on five architectures
132# currently.
133# Do not disable seccomp_bpf anywhere without talking to
134# security@chromium.org!
135use_seccomp_bpf =
136 (is_linux || is_android) &&
137 (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm" ||
138 current_cpu == "arm64" || current_cpu == "mipsel")
139
140# Enable notifications everywhere except iOS.
141enable_notifications = !is_ios
142
143enable_web_speech = !is_android && !is_ios
144
145enable_task_manager = !is_ios && !is_android
146
147enable_themes = !is_android && !is_ios
148
149# Whether we are using the rlz library or not. Platforms like Android send
150# rlz codes for searches but do not use the library.
151enable_rlz_support = is_win || is_mac || is_ios || is_chromeos
152enable_rlz = is_chrome_branded && enable_rlz_support
153
154enable_settings_app = enable_app_list && !is_chromeos
155
156enable_service_discovery = enable_mdns || is_mac
157
158# Image loader extension is enabled on ChromeOS only.
159enable_image_loader_extension = is_chromeos
160
161# Chrome OS: whether to also build the upcoming version of
162# ChromeVox, which can then be enabled via a command-line switch.
163enable_chromevox_next = false
164
165# Use brlapi from brltty for braille display support.
166use_brlapi = is_chromeos
167
168# Enable WebVR support by default on Android
169# Still requires command line flag to access API
170enable_webvr = is_android
171
172enable_configuration_policy = !is_ios