Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Side by Side Diff: build/config/features.gni

Issue 1845473003: headless: Replace is_headless gn setting with an args template (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better documentation. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/args/headless.gn ('k') | build/config/headless_build.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file contains Chrome-feature-related build flags (see ui.gni for 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 6 # UI-related ones). These should theoretically be moved to the build files of
7 # the features themselves. 7 # the features themselves.
8 # 8 #
9 # However, today we have many "bad" dependencies on some of these flags from, 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, 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. 11 # anything that needs a grit define must be in either this file or ui.gni.
12 # 12 #
13 # PLEASE TRY TO AVOID ADDING FLAGS TO THIS FILE in cases where grit isn't 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 14 # required. See the declare_args block of BUILDCONFIG.gn for advice on how
15 # to set up feature flags. 15 # to set up feature flags.
16 16
17 import("//build/config/chrome_build.gni") 17 import("//build/config/chrome_build.gni")
18 import("//build/config/chromecast_build.gni") 18 import("//build/config/chromecast_build.gni")
19 import("//build/config/headless_build.gni")
20 if (is_android) { 19 if (is_android) {
21 import("//build/config/android/config.gni") 20 import("//build/config/android/config.gni")
22 } 21 }
23 22
24 declare_args() { 23 declare_args() {
25 # Multicast DNS. 24 # Multicast DNS.
26 enable_mdns = is_win || is_linux 25 enable_mdns = is_win || is_linux
27 26
28 enable_extensions = !is_android && !is_ios 27 enable_extensions = !is_android && !is_ios
29 enable_plugins = (!is_android && !is_ios) || is_chromecast 28 enable_plugins = (!is_android && !is_ios) || is_chromecast
(...skipping 27 matching lines...) Expand all
57 enable_session_service = !is_android && !is_ios 56 enable_session_service = !is_android && !is_ios
58 57
59 enable_plugin_installation = is_win || is_mac 58 enable_plugin_installation = is_win || is_mac
60 59
61 enable_app_list = !is_ios && !is_android 60 enable_app_list = !is_ios && !is_android
62 61
63 enable_supervised_users = !is_ios 62 enable_supervised_users = !is_ios
64 63
65 enable_autofill_dialog = !is_ios 64 enable_autofill_dialog = !is_ios
66 65
67 enable_remoting = !is_ios && !is_chromecast && !is_headless 66 enable_remoting = !is_ios && !is_chromecast
68 67
69 # Enable hole punching for the protected video. 68 # Enable hole punching for the protected video.
70 enable_video_hole = is_android 69 enable_video_hole = is_android
71 70
72 # Enables browser side Content Decryption Modules. Required for embedders 71 # Enables browser side Content Decryption Modules. Required for embedders
73 # (e.g. Android and ChromeCast) that use a browser side CDM. 72 # (e.g. Android and ChromeCast) that use a browser side CDM.
74 enable_browser_cdms = is_android || is_chromecast 73 enable_browser_cdms = is_android || is_chromecast
75 74
76 # Hangout services is an extension that adds extra features to Hangouts. 75 # Hangout services is an extension that adds extra features to Hangouts.
77 # For official GYP builds, this flag is set. 76 # For official GYP builds, this flag is set.
78 enable_hangout_services_extension = false 77 enable_hangout_services_extension = false
79 78
80 # Variable safe_browsing is used to control the build time configuration for 79 # Variable safe_browsing is used to control the build time configuration for
81 # safe browsing feature. Safe browsing can be compiled in 3 different levels: 80 # safe browsing feature. Safe browsing can be compiled in 3 different levels:
82 # 0 disables it, 1 enables it fully, and 2 enables mobile protection via an 81 # 0 disables it, 1 enables it fully, and 2 enables mobile protection via an
83 # external API. 82 # external API.
84 if (is_android) { 83 if (is_android) {
85 safe_browsing_mode = 2 84 safe_browsing_mode = 2
86 } else if (is_ios) { 85 } else if (is_ios) {
87 safe_browsing_mode = 0 86 safe_browsing_mode = 0
88 } else { 87 } else {
89 safe_browsing_mode = 1 88 safe_browsing_mode = 1
90 } 89 }
91 90
92 # Set to true make a build that disables activation of field trial tests 91 # Set to true make a build that disables activation of field trial tests
93 # specified in testing/variations/fieldtrial_testing_config_*.json. 92 # specified in testing/variations/fieldtrial_testing_config_*.json.
94 # Note: this setting is ignored if is_chrome_branded. 93 # Note: this setting is ignored if is_chrome_branded.
95 fieldtrial_testing_like_official_build = is_chrome_branded 94 fieldtrial_testing_like_official_build = is_chrome_branded
96 95
97 use_cups = (is_desktop_linux || is_mac) && !is_chromecast && !is_headless 96 use_cups = (is_desktop_linux || is_mac) && !is_chromecast
98 97
99 # Enables Wi-Fi Display functionality 98 # Enables Wi-Fi Display functionality
100 # WARNING: This enables MPEG Transport Stream (MPEG-TS) encoding! 99 # WARNING: This enables MPEG Transport Stream (MPEG-TS) encoding!
101 enable_wifi_display = false 100 enable_wifi_display = false
101
102 # libudev usage. This currently only affects the content layer.
103 use_udev = is_linux && !is_chromecast
104
105 use_dbus = is_linux && !is_chromecast
106
107 # Option controlling the use of GConf (the classic GNOME configuration
108 # system).
109 use_gconf = is_linux && !is_chromeos && !is_chromecast
110
111 use_gio = is_linux && !is_chromeos && !is_chromecast
112
113 # Enable basic printing support and UI.
114 enable_basic_printing = !is_chromeos && !is_chromecast && !is_ios
115
116 # Enable printing with print preview. It does not imply
117 # enable_basic_printing. It's possible to build Chrome with preview only.
118 enable_print_preview = !is_android && !is_chromecast && !is_ios
102 } 119 }
103 120
104 # Additional dependent variables ----------------------------------------------- 121 # Additional dependent variables -----------------------------------------------
105 122
106 # Set the version of CLD. 123 # Set the version of CLD.
107 # 1: (DEPRECATED! See http://crbug.com/528305 for info) Use only CLD1. 124 # 1: (DEPRECATED! See http://crbug.com/528305 for info) Use only CLD1.
108 # 2: Use only CLD2. 125 # 2: Use only CLD2.
109 cld_version = 2 126 cld_version = 2
110 127
111 # libudev usage. This currently only affects the content layer.
112 use_udev = is_linux && !is_chromecast && !is_headless
113
114 # Enable the spell checker. 128 # Enable the spell checker.
115 enable_spellcheck = !is_ios 129 enable_spellcheck = !is_ios
116 130
117 # Use the operating system's spellchecker rather than hunspell. 131 # Use the operating system's spellchecker rather than hunspell.
118 use_browser_spellchecker = is_android || is_mac 132 use_browser_spellchecker = is_android || is_mac
119 133
120 # Enable basic printing support and UI.
121 enable_basic_printing =
122 !is_chromeos && !is_chromecast && !is_ios && !is_headless
123
124 # Enable printing with print preview. It does not imply
125 # enable_basic_printing. It's possible to build Chrome with preview only.
126 enable_print_preview = !is_android && !is_chromecast && !is_ios && !is_headless
127
128 # Enables the use of CDMs in pepper plugins. 134 # Enables the use of CDMs in pepper plugins.
129 enable_pepper_cdms = 135 enable_pepper_cdms =
130 enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast 136 enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast
131 137
132 # The seccomp-bpf sandbox is only supported on five architectures 138 # The seccomp-bpf sandbox is only supported on five architectures
133 # currently. 139 # currently.
134 # Do not disable seccomp_bpf anywhere without talking to 140 # Do not disable seccomp_bpf anywhere without talking to
135 # security@chromium.org! 141 # security@chromium.org!
136 use_seccomp_bpf = 142 use_seccomp_bpf =
137 (is_linux || is_android) && 143 (is_linux || is_android) &&
138 (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm" || 144 (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm" ||
139 current_cpu == "arm64" || current_cpu == "mipsel") 145 current_cpu == "arm64" || current_cpu == "mipsel")
140 146
141 # Enable notifications everywhere except iOS. 147 # Enable notifications everywhere except iOS.
142 enable_notifications = !is_ios 148 enable_notifications = !is_ios
143 149
144 enable_web_speech = !is_android && !is_ios 150 enable_web_speech = !is_android && !is_ios
145 151
146 use_dbus = is_linux && !is_chromecast && !is_headless
147
148 enable_task_manager = !is_ios && !is_android 152 enable_task_manager = !is_ios && !is_android
149 153
150 enable_themes = !is_android && !is_ios 154 enable_themes = !is_android && !is_ios
151 155
152 # Whether we are using the rlz library or not. Platforms like Android send 156 # Whether we are using the rlz library or not. Platforms like Android send
153 # rlz codes for searches but do not use the library. 157 # rlz codes for searches but do not use the library.
154 enable_rlz_support = is_win || is_mac || is_ios || is_chromeos 158 enable_rlz_support = is_win || is_mac || is_ios || is_chromeos
155 enable_rlz = is_chrome_branded && enable_rlz_support 159 enable_rlz = is_chrome_branded && enable_rlz_support
156 160
157 enable_settings_app = enable_app_list && !is_chromeos 161 enable_settings_app = enable_app_list && !is_chromeos
158 162
159 enable_service_discovery = enable_mdns || is_mac 163 enable_service_discovery = enable_mdns || is_mac
160 164
161 # Image loader extension is enabled on ChromeOS only. 165 # Image loader extension is enabled on ChromeOS only.
162 enable_image_loader_extension = is_chromeos 166 enable_image_loader_extension = is_chromeos
163 167
164 # Chrome OS: whether to also build the upcoming version of 168 # Chrome OS: whether to also build the upcoming version of
165 # ChromeVox, which can then be enabled via a command-line switch. 169 # ChromeVox, which can then be enabled via a command-line switch.
166 enable_chromevox_next = false 170 enable_chromevox_next = false
167 171
168 # Use brlapi from brltty for braille display support. 172 # Use brlapi from brltty for braille display support.
169 use_brlapi = is_chromeos 173 use_brlapi = is_chromeos
170 174
171 # Option controlling the use of GConf (the classic GNOME configuration
172 # system).
173 use_gconf = is_linux && !is_chromeos && !is_chromecast && !is_headless
174
175 # Enable WebVR support by default on Android 175 # Enable WebVR support by default on Android
176 # Still requires command line flag to access API 176 # Still requires command line flag to access API
177 enable_webvr = is_android 177 enable_webvr = is_android
178 178
179 use_gio = is_linux && !is_chromeos && !is_chromecast && !is_headless
180
181 enable_configuration_policy = !is_ios 179 enable_configuration_policy = !is_ios
OLDNEW
« no previous file with comments | « build/args/headless.gn ('k') | build/config/headless_build.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698