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

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

Issue 1291703008: Rename is_chromeos in chrome/src. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: retry Created 5 years, 4 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/config/BUILDCONFIG.gn ('k') | build/config/linux/BUILD.gn » ('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 if (is_android) { 18 if (is_android) {
19 import("//build/config/android/config.gni") 19 import("//build/config/android/config.gni")
20 } 20 }
21 21
22 declare_args() { 22 declare_args() {
23 # Multicast DNS. 23 # Multicast DNS.
24 enable_mdns = is_win || is_linux 24 enable_mdns = is_win || is_linux
25 25
26 enable_plugins = !is_android && !is_ios 26 enable_plugins = !is_android && !is_ios
27 27
28 # This indicates whether the chromeos interfaces and features should be
29 # made available. Contrast with whether we are targetting the embedded
30 # OS. That flag controls the linking, flags, filesystems, etc. we expect.
31 use_cros_fe = is_chromeos
32
28 # Enables Native Client support. 33 # Enables Native Client support.
29 # TODO(GYP): Get NaCl linking on other platforms. 34 # TODO(GYP): Get NaCl linking on other platforms.
30 # Also, see if we can always get rid of enable_nacl_untrusted and 35 # Also, see if we can always get rid of enable_nacl_untrusted and
31 # enable_pnacl and always build them if enable_nacl is true. 36 # enable_pnacl and always build them if enable_nacl is true.
32 # The "is_nacl" part of the condition is needed to ensure that 37 # The "is_nacl" part of the condition is needed to ensure that
33 # the untrusted code is built properly; arguably it should be 38 # the untrusted code is built properly; arguably it should be
34 # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but 39 # guarded by "is_nacl" directly rather than enable_nacl_untrusted, but
35 # this will go away when Mac and Win are working and we can just use 40 # this will go away when Mac and Win are working and we can just use
36 # the commented out logic. 41 # the commented out logic.
37 # Eventually we want this to be: 42 # Eventually we want this to be:
38 # enable_nacl = !is_ios && !is_android 43 # enable_nacl = !is_ios && !is_android
39 enable_nacl = (is_linux && !is_chromeos && current_cpu == "x64") || is_nacl 44 enable_nacl = (is_linux && !use_cros_fe && current_cpu == "x64") || is_nacl
40 enable_nacl_untrusted = enable_nacl 45 enable_nacl_untrusted = enable_nacl
41 enable_pnacl = enable_nacl_untrusted 46 enable_pnacl = enable_nacl_untrusted
42 47
43 # If debug_devtools is set to true, JavaScript files for DevTools are stored 48 # If debug_devtools is set to true, JavaScript files for DevTools are stored
44 # as is and loaded from disk. Otherwise, a concatenated file is stored in 49 # as is and loaded from disk. Otherwise, a concatenated file is stored in
45 # resources.pak. It is still possible to load JS files from disk by passing 50 # resources.pak. It is still possible to load JS files from disk by passing
46 # --debug-devtools cmdline switch. 51 # --debug-devtools cmdline switch.
47 debug_devtools = false 52 debug_devtools = false
48 53
49 # Enables WebRTC. 54 # Enables WebRTC.
(...skipping 25 matching lines...) Expand all
75 enable_plugin_installation = is_win || is_mac 80 enable_plugin_installation = is_win || is_mac
76 81
77 enable_app_list = !is_ios && !is_android 82 enable_app_list = !is_ios && !is_android
78 83
79 enable_supervised_users = !is_ios 84 enable_supervised_users = !is_ios
80 85
81 enable_autofill_dialog = !is_ios 86 enable_autofill_dialog = !is_ios
82 87
83 enable_google_now = !is_ios && !is_android 88 enable_google_now = !is_ios && !is_android
84 89
85 enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos) 90 enable_one_click_signin = is_win || is_mac || (is_linux && !use_cros_fe)
86 91
87 enable_remoting = !is_ios && !is_android 92 enable_remoting = !is_ios && !is_android
88 93
89 # Enable hole punching for the protected video. 94 # Enable hole punching for the protected video.
90 enable_video_hole = is_android 95 enable_video_hole = is_android
91 96
92 # Enables browser side Content Decryption Modules. Required for embedders 97 # Enables browser side Content Decryption Modules. Required for embedders
93 # (e.g. Android and ChromeCast) that use a browser side CDM. 98 # (e.g. Android and ChromeCast) that use a browser side CDM.
94 enable_browser_cdms = is_android 99 enable_browser_cdms = is_android
95 100
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 # libudev usage. This currently only affects the content layer. 141 # libudev usage. This currently only affects the content layer.
137 use_udev = is_linux 142 use_udev = is_linux
138 143
139 # Enable the spell checker. 144 # Enable the spell checker.
140 enable_spellcheck = !is_ios 145 enable_spellcheck = !is_ios
141 146
142 # Use the operating system's spellchecker rather than hunspell. 147 # Use the operating system's spellchecker rather than hunspell.
143 use_browser_spellchecker = is_android || is_mac 148 use_browser_spellchecker = is_android || is_mac
144 149
145 # Enable basic printing support and UI. 150 # Enable basic printing support and UI.
146 enable_basic_printing = !is_chromeos 151 enable_basic_printing = !use_cros_fe
147 152
148 # Enable printing with print preview. It does not imply 153 # Enable printing with print preview. It does not imply
149 # enable_basic_printing. It's possible to build Chrome with preview only. 154 # enable_basic_printing. It's possible to build Chrome with preview only.
150 enable_print_preview = !is_android 155 enable_print_preview = !is_android
151 156
152 # The seccomp-bpf sandbox is only supported on three architectures 157 # The seccomp-bpf sandbox is only supported on three architectures
153 # currently. 158 # currently.
154 # Do not disable seccomp_bpf anywhere without talking to 159 # Do not disable seccomp_bpf anywhere without talking to
155 # security@chromium.org! 160 # security@chromium.org!
156 use_seccomp_bpf = (is_linux || is_android) && 161 use_seccomp_bpf = (is_linux || is_android) &&
(...skipping 16 matching lines...) Expand all
173 178
174 use_cups = is_desktop_linux || is_mac 179 use_cups = is_desktop_linux || is_mac
175 180
176 enable_themes = !is_android && !is_ios 181 enable_themes = !is_android && !is_ios
177 182
178 # TODO(scottmg) remove this when we've fixed printing. 183 # TODO(scottmg) remove this when we've fixed printing.
179 win_pdf_metafile_for_printing = true 184 win_pdf_metafile_for_printing = true
180 185
181 # Whether we are using the rlz library or not. Platforms like Android send 186 # Whether we are using the rlz library or not. Platforms like Android send
182 # rlz codes for searches but do not use the library. 187 # rlz codes for searches but do not use the library.
183 enable_rlz_support = is_win || is_mac || is_ios || is_chromeos 188 enable_rlz_support = is_win || is_mac || is_ios || use_cros_fe
184 enable_rlz = is_chrome_branded && enable_rlz_support 189 enable_rlz = is_chrome_branded && enable_rlz_support
185 190
186 enable_settings_app = enable_app_list && !is_chromeos 191 enable_settings_app = enable_app_list && !use_cros_fe
187 192
188 enable_service_discovery = enable_mdns || is_mac 193 enable_service_discovery = enable_mdns || is_mac
189 194
190 enable_wifi_bootstrapping = is_win || is_mac 195 enable_wifi_bootstrapping = is_win || is_mac
191 196
192 # Image loader extension is enabled on ChromeOS only. 197 # Image loader extension is enabled on ChromeOS only.
193 enable_image_loader_extension = is_chromeos 198 enable_image_loader_extension = use_cros_fe
194 199
195 # Chrome OS: whether to also build the upcoming version of 200 # Chrome OS: whether to also build the upcoming version of
196 # ChromeVox, which can then be enabled via a command-line switch. 201 # ChromeVox, which can then be enabled via a command-line switch.
197 enable_chromevox_next = false 202 enable_chromevox_next = false
198 203
199 # Use brlapi from brltty for braille display support. 204 # Use brlapi from brltty for braille display support.
200 use_brlapi = is_chromeos 205 use_brlapi = use_cros_fe
201 206
202 # Option controlling the use of GConf (the classic GNOME configuration 207 # Option controlling the use of GConf (the classic GNOME configuration
203 # system). 208 # system).
204 # TODO(GYP) also require !embedded to enable. 209 # TODO(GYP) also require !embedded to enable.
205 use_gconf = is_linux && !is_chromeos 210 use_gconf = is_linux && !use_cros_fe
206 211
207 # Whether to back up data before sync. 212 # Whether to back up data before sync.
208 enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) 213 enable_pre_sync_backup = is_win || is_mac || (is_linux && !use_cros_fe)
209 214
210 # WebVR support disabled until platform implementations have been added 215 # WebVR support disabled until platform implementations have been added
211 enable_webvr = false 216 enable_webvr = false
217
218 #
219 # Maintain some sanity for refactoring build configs.
220 #
221 if (is_chromeos_os) {
222 assert(use_cros_fe, "ChromeOS targetting requires ChromeOS UI")
223 }
224
225 if (use_cros_fe) {
226 assert(!is_desktop_linux, "ChromeOS Frontend is not desktop linux")
227 }
228
229 assert(use_cros_fe == is_chromeos,
230 "is_chromeos and use_cros_fe are expected to be aliases, " +
231 "old and new, respectively")
OLDNEW
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | build/config/linux/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698