# Copyright 2015 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. declare_args() { # Select the desired branding flavor. False means normal Chromium branding, # true means official Google Chrome branding (requires extra Google-internal # resources). is_chrome_branded = false # Whether to enable the Chrome for Testing (CfT) flavor. This arg is not # compatible with `is_chrome_branded`. # # Design document: https://goo.gle/chrome-for-testing is_chrome_for_testing = false # Whether to use internal Chrome for Testing (CfT). # Requires `src-internal/` and `is_chrome_for_testing = true`. # # When true, use Google-internal icons, otherwise fall back to Chromium icons. is_chrome_for_testing_branded = false # Set to true to enable settings for high end Android devices, typically # enhancing speed at the expense of resources such as binary sizes and memory. is_high_end_android = target_cpu == "arm64" || target_cpu == "x64" # Set to true to set defaults that enable features on Android that are more # typically available on desktop. is_desktop_android = false if (is_android) { # By default, Trichrome channels are compiled using separate package names. # Set this to 'true' to compile Trichrome channels using the Stable channel's # package name. This currently only affects builds with `android_channel = # "beta"`. use_stable_package_name_for_trichrome = false } } # Ensure !is_android implies !is_high_end_android. is_high_end_android = is_high_end_android && is_android if (is_desktop_android) { assert(target_os == "android", "Target must be Android to use is_desktop_android.") # Disable for non-android secondary toolchains. is_desktop_android = is_android } declare_args() { # Whether to apply size->speed trade-offs to the secondary toolchain. # Relevant only for 64-bit target_cpu. is_high_end_android_secondary_toolchain = false } assert(!is_chrome_for_testing || !is_chrome_branded, "`is_chrome_for_testing` is incompatible with `is_chrome_branded`") assert(is_chrome_for_testing || !is_chrome_for_testing_branded, "`is_chrome_for_testing_branded` requires `is_chrome_for_testing`") declare_args() { # Refers to the subdirectory for branding in various places including # chrome/app/theme. # # `branding_path_product` must not contain slashes. if (is_chrome_for_testing) { if (is_chrome_for_testing_branded) { branding_path_component = "google_chrome/google_chrome_for_testing" } else { branding_path_component = "chromium" } branding_path_product = "chromium" } else if (is_chrome_branded) { branding_path_component = "google_chrome" branding_path_product = "google_chrome" } else { branding_path_component = "chromium" branding_path_product = "chromium" } } declare_args() { # The path to the BRANDING file in chrome/app/theme. branding_file_path = "//chrome/app/theme/$branding_path_component/BRANDING" }