Index: build/config/features.gni |
diff --git a/build/config/features.gni b/build/config/features.gni |
index b1e9280c0921a5e4d1057ed114f07f16961abc40..31cc4a9ec2553ad1b0fbff374cc119188c22f484 100644 |
--- a/build/config/features.gni |
+++ b/build/config/features.gni |
@@ -25,6 +25,11 @@ declare_args() { |
enable_plugins = !is_android && !is_ios |
+ # This indicates whether the chromeos interfaces and features should be |
+ # made available. Contrast with whether we are targetting the embedded |
+ # OS. That flag controls the linking, flags, filesystems, etc. we expect. |
+ use_cros_fe = is_chromeos |
+ |
# Enables Native Client support. |
# TODO(GYP): Get NaCl linking on other platforms. |
# Also, see if we can always get rid of enable_nacl_untrusted and |
@@ -36,7 +41,7 @@ declare_args() { |
# the commented out logic. |
# Eventually we want this to be: |
# enable_nacl = !is_ios && !is_android |
- enable_nacl = (is_linux && !is_chromeos && current_cpu == "x64") || is_nacl |
+ enable_nacl = (is_linux && !use_cros_fe && current_cpu == "x64") || is_nacl |
enable_nacl_untrusted = enable_nacl |
enable_pnacl = enable_nacl_untrusted |
@@ -82,7 +87,7 @@ declare_args() { |
enable_google_now = !is_ios && !is_android |
- enable_one_click_signin = is_win || is_mac || (is_linux && !is_chromeos) |
+ enable_one_click_signin = is_win || is_mac || (is_linux && !use_cros_fe) |
enable_remoting = !is_ios && !is_android |
@@ -143,7 +148,7 @@ enable_spellcheck = !is_ios |
use_browser_spellchecker = is_android || is_mac |
# Enable basic printing support and UI. |
-enable_basic_printing = !is_chromeos |
+enable_basic_printing = !use_cros_fe |
# Enable printing with print preview. It does not imply |
# enable_basic_printing. It's possible to build Chrome with preview only. |
@@ -180,32 +185,47 @@ win_pdf_metafile_for_printing = true |
# Whether we are using the rlz library or not. Platforms like Android send |
# rlz codes for searches but do not use the library. |
-enable_rlz_support = is_win || is_mac || is_ios || is_chromeos |
+enable_rlz_support = is_win || is_mac || is_ios || use_cros_fe |
enable_rlz = is_chrome_branded && enable_rlz_support |
-enable_settings_app = enable_app_list && !is_chromeos |
+enable_settings_app = enable_app_list && !use_cros_fe |
enable_service_discovery = enable_mdns || is_mac |
enable_wifi_bootstrapping = is_win || is_mac |
# Image loader extension is enabled on ChromeOS only. |
-enable_image_loader_extension = is_chromeos |
+enable_image_loader_extension = use_cros_fe |
# Chrome OS: whether to also build the upcoming version of |
# ChromeVox, which can then be enabled via a command-line switch. |
enable_chromevox_next = false |
# Use brlapi from brltty for braille display support. |
-use_brlapi = is_chromeos |
+use_brlapi = use_cros_fe |
# Option controlling the use of GConf (the classic GNOME configuration |
# system). |
# TODO(GYP) also require !embedded to enable. |
-use_gconf = is_linux && !is_chromeos |
+use_gconf = is_linux && !use_cros_fe |
# Whether to back up data before sync. |
-enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) |
+enable_pre_sync_backup = is_win || is_mac || (is_linux && !use_cros_fe) |
# WebVR support disabled until platform implementations have been added |
enable_webvr = false |
+ |
+# |
+# Maintain some sanity for refactoring build configs. |
+# |
+if (is_chromeos_os) { |
+ assert(use_cros_fe, "ChromeOS targetting requires ChromeOS UI") |
+} |
+ |
+if (use_cros_fe) { |
+ assert(!is_desktop_linux, "ChromeOS Frontend is not desktop linux") |
+} |
+ |
+assert(use_cros_fe == is_chromeos, |
+ "is_chromeos and use_cros_fe are expected to be aliases, " + |
+ "old and new, respectively") |