* Enable HEVC/H.265 software video decoding on Linux Adds FFmpeg-based HEVC/H.265 software decoding support for Linux, providing a fallback when hardware decode is unavailable (e.g., NVIDIA GPUs where VA-API is not functional in Chromium). - chromium_src override for supported_types.cc (HEVC as built-in codec) - brave/third_party/ffmpeg/sources.gni with HEVC source lists, imported via ffmpeg_generated.gni patch - Minimal patches for ffmpeg_common.cc and ffmpeg_video_decoder.cc (anonymous namespace / file-local functions, not overridable) - All HEVC code paths gated on BUILDFLAG(ENABLE_PLATFORM_HEVC) to allow disabling via build args - FFmpeg config patches for Linux x64 (config.h, config_components.h, codec_list.c, parser_list.c, autorename wrappers) - Enable enable_platform_hevc and enable_hevc_parser_and_hw_decoder - Add ffmpeg to patch apply/update infrastructure with s.path guard Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review: advertise HEVC support to web content on Linux On Linux, upstream's IsDecoderHevcProfileSupported takes the PLATFORM_HAS_OPTIONAL_HEVC_DECODE_SUPPORT path and consults the supplemental profile cache, which is populated only by hardware decoders registering via the GPU mojo interface. Since we ship a bundled FFmpeg software decoder that never touches that cache, MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L93.B0"') returned false even though the decoder could handle the stream. Override IsDefaultDecoderSupportedVideoType so that when upstream rejects HEVC for that reason alone (cache empty), we fall back to returning true. HDR, color space, and proprietary-codec gating from upstream are preserved. * Address review: round-trip new-file patches through apply/update_patches Two related issues with how brave's patch tooling handles patches that create new files (new file mode diffs): apply_patches would fail on a fresh checkout with "Target file does not exist" because isPatchStale treats a missing target as SRC_REMOVED and bails out before apply. Teach it to recognize "new file mode" patches and re-route through SRC_CHANGED so apply proceeds. Also unlink any leftover target before apply so re-runs on an existing checkout don't hit "already exists in working directory". update_patches would silently delete new-file patches because getModifiedPaths only inspected tracked/modified files. git apply creates new files without staging them, so they show up as untracked (??) and never reach the diff. Extend it to pick up untracked paths that correspond to an existing patch, and generate their diff via git diff --no-index /dev/null <path> to match the new-file-mode format produced by git apply. The four autorename_*.c.patch files in third_party/ffmpeg now round- trip cleanly across apply/update cycles, which addresses the "update_patches currently removes some patches you added here" review comment. * Address review: rebase HEVC patches onto Chromium 147 ffmpeg Refresh patch index hashes to the current third_party/ffmpeg tree, tighten the ffmpeg_generated.gni patch to avoid an empty line at the hunk boundary (presubmit warning), and pick up libavcodec/x86/hevc/ dequant.asm, which upstream added since the original patch set and whose absence caused an ff_hevc_dequant_8_ssse3 link error. All four autorename_*.c patches, the config/config_components toggles, the generated-list import, and the BUILD.gn include_dirs tweak now apply cleanly on Chromium 147 and the resulting build links and plays HEVC streams end-to-end. * Address review: host autorename stubs in brave/third_party/ffmpeg Moves the four HEVC autorename .c stubs from patches/third_party/ffmpeg/ into brave/third_party/ffmpeg/libavcodec/ (and libavcodec/hevc/) so they're regular brave-owned sources rather than new-file patches against upstream ffmpeg. This is what goodov suggested in review. The stubs use fully-qualified includes like "libavcodec/hevc/cabac.c", which resolve through the existing -I "." on ffmpeg_internal — so the upstream source is what actually gets compiled, just under a different object name to keep the linker happy. sources.gni references the new files with absolute //brave/... paths. One thing I missed on the first build: libavcodec/cabac.c and libavcodec/hevc/cabac.c are two different files, and the hevc stub needs to point at the latter or the linker complains about duplicate ff_init_cabac_decoder. Fixed before pushing. Since no new-file patches are left in the PR, the apply/update_patches tooling changes from c1b2b937cf9 don't have a reason to be here anymore. Reverted them — gitPatcher.js and updatePatches.js are back to where they were before this PR. Tested locally on Linux x64 component build: apply_patches and update_patches round-trip cleanly, gn_check passes, ffmpeg and media targets both build, and HEVC playback still works end to end. * Address review: centralize HEVC enabled check via FFmpegSupportsHEVC helper Introduces FFmpegSupportsHEVC() and HEVCAsH264IfFFmpegSupportsHEVC() in chromium_src/media/base/supported_types.{h,cc}. The helpers wrap the BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PLATFORM_HEVC) check in one place so callers don't have to repeat it. Most of this is shrinking the existing patches: - patches/media-filters-ffmpeg_video_decoder.cc.patch: drops the nested #if BUILDFLAG blocks around the kHEVC switch case and IsCodecSupported. The switch now reads `HEVCAsH264IfFFmpegSupportsHEVC(config.codec())` so kHEVC reuses the kH264 threading branch, and IsCodecSupported maps the incoming codec the same way before its kH264 comparison. - patches/media-ffmpeg-ffmpeg_common.cc.patch: one-line `if (FFmpegSupportsHEVC()) return "h264,hevc";` instead of a C-preprocessor branch. - chromium_src/media/base/supported_types.cc: IsDecoderBuiltInVideoCodec, IsDefaultDecoderSupportedVideoType and IsDecoderSupportedVideoType all go through FFmpegSupportsHEVC() now. The third one matters: blink (webcodecs, media_capabilities) calls the public IsDecoderSupportedVideoType, and the upstream definition calls IsDefaultDecoderSupportedVideoType internally — which under our #define rebrand routes to _ChromiumImpl and bypasses our override. Overriding the public entry point too keeps the helper authoritative whichever path the caller takes. The override file now includes media/base/supported_types.h *before* the rebrand #defines and forward-declares the *_ChromiumImpl variants. That way the MEDIA_EXPORT declarations of the three Is* functions are visible with their original names when our override definitions are compiled, so the symbols get the right visibility without having to repeat MEDIA_EXPORT on every override body. Verified by checking `nm -D libmedia.so` — IsDecoderBuiltInVideoCodec, IsDefaultDecoderSupportedVideoType and IsDecoderSupportedVideoType are all exported, and media:media_unittests links cleanly. sources.gni: collapses the two duplicated `is_linux && ffmpeg_branding` conditions into a single `enable_ffmpeg_hevc_support` flag derived from the upstream `enable_hevc_parser_and_hw_decoder` build arg. Drops chromeos / fuchsia from the condition (not relevant for this PR). Test adjustments for the new HEVC-supported reality on Linux: - media_unittests: SupportedTypesTest.IsDecoderBuiltInVideoCodec and IsDecoderSupportedVideoTypeBasics asserted HEVC=false unconditionally; switched to `EXPECT_EQ(..., FFmpegSupportsHEVC())` so they pass on Linux with the FFmpeg HEVC decoder built in and stay correct everywhere else. - browser_tests: EncryptedMediaSupportedTypesTest::CheckPlatformHevcSupport asserted UNSUPPORTED for HEVC on Linux. With the software decoder built in HEVC is supported via Clear Key too, so the assertion now flips to EXPECT_ECK_PROPRIETARY when FFmpegSupportsHEVC() is true. This fixes EncryptedMediaSupportedTypesClearKeyTest.Video_MP4 and the two ExternalClearKey variants (Basic, Video_MP4). Also renames the four autorename stubs to drop the "autorename_" prefix and removes the "Auto-generated" wording from their comments — they aren't produced by a script, they're hand-placed brave sources. The sources.gni references are updated to match. Verified on Linux x64 component build with chromium 149: gn_check, format, presubmit, full brave build, SupportedTypesTest.* (32 tests) and the four EME browser_tests above all green. HEVC playback + MSE isTypeSupported confirmed end to end on a Main / Main10 / Level 5 test clip. * Address review: enable HEVC software decoder on linux-arm64 Mirrors the linux-x64 enablement on linux-arm64 so HEVC isn't a brave-on-x64-only feature. ffmpeg config patches: four new patches under chromium/config/Chrome/ linux/arm64/, symmetric to the existing x64 ones — flip CONFIG_BSWAPDSP, CONFIG_HEVC_DECODER and CONFIG_HEVC_PARSER to 1, and add ff_hevc_decoder / ff_hevc_parser to codec_list.c / parser_list.c. sources.gni: new `if (enable_ffmpeg_hevc_support && current_cpu == "arm64")` block pulling in the libavcodec/aarch64 HEVC NEON files that upstream's Makefile lists for CONFIG_HEVC_DECODER (hevcdsp_init, hevcdsp_{deblock,dequant,idct}_neon and h26x/{epel,qpel,sao}_neon). Also introduce a `brave_third_party_ffmpeg_gas_sources` list — arm64 hand-written assembly goes through ffmpeg_gas_sources upstream rather than ffmpeg_asm_sources (which is nasm-only). The ffmpeg_generated.gni patch is extended to append it. Verified: gn_check, format, presubmit all green. autoninja third_party/ffmpeg:ffmpeg in a cross-compiled Component_arm64 build dir links cleanly. Couldn't get a full media:media_unittests build past unrelated clang segfaults on V8 torque-generated sources locally, but that's host-side flake — the brave CI arm64 builders should hit a clean environment. Don't have arm64 hardware to runtime-verify; relying on CI for that. --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1445 lines
96 KiB
C++
1445 lines
96 KiB
C++
/* Copyright (c) 2021 The Brave Authors. All rights reserved.
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
// This file is included into //chrome/browser/about_flags.cc.
|
|
|
|
#include <initializer_list>
|
|
|
|
#include "brave/browser/brave_browser_features.h"
|
|
#include "brave/browser/net/features.h"
|
|
#include "brave/browser/ui/brave_ui_features.h"
|
|
#include "brave/browser/updater/buildflags.h"
|
|
#include "brave/components/ai_chat/core/common/buildflags/buildflags.h"
|
|
#include "brave/components/brave_component_updater/browser/features.h"
|
|
#include "brave/components/brave_education/buildflags.h"
|
|
#include "brave/components/brave_news/common/buildflags/buildflags.h"
|
|
#include "brave/components/brave_origin/features.h"
|
|
#include "brave/components/brave_rewards/core/buildflags/buildflags.h"
|
|
#include "brave/components/brave_rewards/core/features.h"
|
|
#include "brave/components/brave_shields/core/common/features.h"
|
|
#include "brave/components/brave_sync/features.h"
|
|
#include "brave/components/brave_vpn/common/buildflags/buildflags.h"
|
|
#include "brave/components/brave_wallet/common/buildflags/buildflags.h"
|
|
#include "brave/components/containers/buildflags/buildflags.h"
|
|
#include "brave/components/de_amp/common/features.h"
|
|
#include "brave/components/debounce/core/common/features.h"
|
|
#include "brave/components/email_aliases/buildflags/buildflags.h"
|
|
#include "brave/components/google_sign_in_permission/features.h"
|
|
#include "brave/components/ntp_background_images/browser/features.h"
|
|
#include "brave/components/playlist/core/common/buildflags/buildflags.h"
|
|
#include "brave/components/psst/buildflags/buildflags.h"
|
|
#include "brave/components/request_otr/common/buildflags/buildflags.h"
|
|
#include "brave/components/skus/common/features.h"
|
|
#include "brave/components/speedreader/common/buildflags/buildflags.h"
|
|
#include "brave/components/v8/buildflags/buildflags.h"
|
|
#include "brave/components/webcompat/core/common/features.h"
|
|
#include "build/build_config.h"
|
|
#include "chrome/browser/buildflags.h"
|
|
#include "chrome/browser/ui/tabs/features.h"
|
|
#include "chrome/browser/ui/ui_features.h"
|
|
#include "components/content_settings/core/common/features.h"
|
|
#include "components/history/core/browser/features.h"
|
|
#include "components/history_embeddings/core/history_embeddings_features.h"
|
|
#include "components/omnibox/common/omnibox_features.h"
|
|
#include "components/sync/base/command_line_switches.h"
|
|
#include "components/translate/core/browser/translate_prefs.h"
|
|
#include "components/webui/flags/feature_entry.h"
|
|
#include "components/webui/flags/feature_entry_macros.h"
|
|
#include "components/webui/flags/flags_state.h"
|
|
#include "media/base/media_switches.h"
|
|
#include "media/media_buildflags.h"
|
|
#include "net/base/features.h"
|
|
#include "third_party/blink/public/common/features.h"
|
|
|
|
#if BUILDFLAG(ENABLE_AI_CHAT)
|
|
#include "brave/components/ai_chat/core/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_BRAVE_NEWS)
|
|
#include "brave/components/brave_news/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_BRAVE_VPN)
|
|
#include "brave/components/brave_vpn/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_PLAYLIST)
|
|
#include "brave/components/playlist/core/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_SPEEDREADER)
|
|
#include "brave/components/speedreader/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_REQUEST_OTR)
|
|
#include "brave/components/request_otr/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(IS_ANDROID)
|
|
#include "brave/browser/android/safe_browsing/features.h"
|
|
#include "brave/browser/android/youtube_script_injector/features.h"
|
|
#include "chrome/browser/flags/android/chrome_feature_list.h"
|
|
#else
|
|
#include "brave/browser/ui/views/tabs/switches.h"
|
|
#include "brave/browser/workspaces/features.h"
|
|
#include "brave/components/commander/common/features.h"
|
|
#include "brave/components/commands/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(IS_MAC)
|
|
#include "brave/browser/brave_browser_main_parts_mac.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(IS_WIN)
|
|
#include "sandbox/policy/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
#include "brave/browser/extensions/updater/features.h"
|
|
#include "extensions/common/extension_features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_BRAVE_EDUCATION)
|
|
#include "brave/components/brave_education/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_CONTAINERS)
|
|
#include "brave/components/containers/core/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_OMAHA4)
|
|
#include "brave/browser/updater/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_PSST)
|
|
#include "brave/components/psst/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_BRAVE_WALLET)
|
|
#include "brave/components/brave_wallet/common/features.h"
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_EMAIL_ALIASES)
|
|
#include "brave/components/email_aliases/features.h"
|
|
#endif
|
|
|
|
#if defined(TOOLKIT_VIEWS)
|
|
#include "brave/browser/ui/darker_theme/features.h"
|
|
#include "brave/browser/ui/focus_mode/focus_mode_features.h"
|
|
#include "brave/browser/ui/page_info/features.h"
|
|
#endif
|
|
|
|
#define EXPAND_FEATURE_ENTRIES(...) __VA_ARGS__,
|
|
|
|
#if BUILDFLAG(ENABLE_BRAVE_WALLET)
|
|
const flags_ui::FeatureEntry::FeatureParam
|
|
kZCashShieldedTransactionsDisabled[] = {
|
|
{"zcash_shielded_transactions_enabled", "false"}};
|
|
|
|
const flags_ui::FeatureEntry::FeatureParam kZCashShieldedTransactionsEnabled[] =
|
|
{{"zcash_shielded_transactions_enabled", "true"}};
|
|
|
|
const flags_ui::FeatureEntry::FeatureVariation kZCashFeatureVariations[] = {
|
|
{"- Shielded support disabled", kZCashShieldedTransactionsDisabled,
|
|
nullptr},
|
|
{"- Shielded support enabled", kZCashShieldedTransactionsEnabled, nullptr}};
|
|
#endif // BUILDFLAG(ENABLE_BRAVE_WALLET)
|
|
|
|
namespace {
|
|
const char* const kBraveSyncImplLink[1] = {"https://github.com/brave/go-sync"};
|
|
} // namespace
|
|
|
|
#define SPEEDREADER_FEATURE_ENTRIES \
|
|
IF_BUILDFLAG( \
|
|
ENABLE_SPEEDREADER, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-speedreader", \
|
|
"Enable SpeedReader", \
|
|
"Enables faster loading of simplified article-style web pages.", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(speedreader::features::kSpeedreaderFeature), \
|
|
}))
|
|
|
|
#define REQUEST_OTR_FEATURE_ENTRIES \
|
|
IF_BUILDFLAG( \
|
|
ENABLE_REQUEST_OTR, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-request-otr-tab", \
|
|
"Enable Request-OTR Tab", \
|
|
"Suggest going off-the-record when visiting potentially sensitive " \
|
|
"URLs", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(request_otr::features::kBraveRequestOTRTab), \
|
|
}))
|
|
|
|
#define BRAVE_MODULE_FILENAME_PATCH \
|
|
IF_BUILDFLAG( \
|
|
IS_WIN, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-module-filename-patch", \
|
|
"Enable Module Filename patch", \
|
|
"Enables patching of executable's name from brave.exe to " \
|
|
"chrome.exe in sandboxed processes.", \
|
|
kOsWin, \
|
|
FEATURE_VALUE_TYPE(sandbox::policy::features::kModuleFileNamePatch), \
|
|
}))
|
|
|
|
#define BRAVE_WORKAROUND_NEW_WINDOW_FLASH \
|
|
IF_BUILDFLAG( \
|
|
IS_WIN, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-workaround-new-window-flash", \
|
|
"Workaround a white flash on new window creation", \
|
|
"Enable workaround to prevent new windows being created with a " \
|
|
"white background", \
|
|
kOsWin, \
|
|
FEATURE_VALUE_TYPE(::features::kBraveWorkaroundNewWindowFlash), \
|
|
}))
|
|
|
|
#if BUILDFLAG(ENABLE_BRAVE_WALLET)
|
|
#define BRAVE_NATIVE_WALLET_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES( \
|
|
{"brave-wallet-zcash", "Enable BraveWallet ZCash support", \
|
|
"Zcash support for native Brave Wallet", kOsDesktop | kOsAndroid, \
|
|
FEATURE_WITH_PARAMS_VALUE_TYPE( \
|
|
brave_wallet::features::kBraveWalletZCashFeature, \
|
|
kZCashFeatureVariations, "BraveWalletZCash")}, \
|
|
{ \
|
|
"brave-wallet-polkadot", \
|
|
"Enable experimental Brave Wallet Polkadot support", \
|
|
"The Polkadot integration in Brave Wallet is currently in preview " \
|
|
"and under active development. This version should not be used " \
|
|
"with real funds. Use at your own risk.", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_wallet::features::kBraveWalletPolkadotFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-wallet-bitcoin", \
|
|
"Enable Brave Wallet Bitcoin support", \
|
|
"Bitcoin support for native Brave Wallet", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_wallet::features::kBraveWalletBitcoinFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-wallet-cardano", \
|
|
"Enable Brave Wallet Cardano support", \
|
|
"Cardano support for native Brave Wallet", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_wallet::features::kBraveWalletCardanoFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-wallet-enable-ankr-balances", \
|
|
"Enable Ankr balances", \
|
|
"Enable usage of Ankr Advanced API for fetching balances in Brave " \
|
|
"Wallet", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_wallet::features::kBraveWalletAnkrBalancesFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-wallet-enable-transaction-simulations", \
|
|
"Enable transaction simulations", \
|
|
"Enable usage of Blowfish API for running transaction simulations " \
|
|
"in Brave Wallet", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(brave_wallet::features:: \
|
|
kBraveWalletTransactionSimulationsFeature), \
|
|
})
|
|
#else
|
|
#define BRAVE_NATIVE_WALLET_FEATURE_ENTRIES
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_BRAVE_NEWS)
|
|
#define BRAVE_NEWS_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES( \
|
|
{ \
|
|
"brave-news-peek", \
|
|
"Brave News prompts on New Tab Page", \
|
|
"Prompt Brave News via the top featured article peeking up from " \
|
|
"the bottom of the New Tab Page, after a short delay.", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(brave_news::features::kBraveNewsCardPeekFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-news-feed-update", \
|
|
"Brave News Feed Update", \
|
|
"Use the updated Brave News feed", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(brave_news::features::kBraveNewsFeedUpdate), \
|
|
})
|
|
#else
|
|
#define BRAVE_NEWS_FEATURE_ENTRIES
|
|
#endif // BUILDFLAG(ENABLE_BRAVE_NEWS)
|
|
|
|
#if BUILDFLAG(ENABLE_PLAYLIST)
|
|
#define PLAYLIST_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES( \
|
|
{ \
|
|
"playlist", \
|
|
"Playlist", \
|
|
"Enables Playlist", \
|
|
kOsMac | kOsWin | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(playlist::features::kPlaylist), \
|
|
}, \
|
|
{ \
|
|
"playlist-fake-ua", \
|
|
"PlaylistFakeUA", \
|
|
"Use fake UA for playlist", \
|
|
kOsMac | kOsWin | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(playlist::features::kPlaylistFakeUA), \
|
|
})
|
|
#else
|
|
#define PLAYLIST_FEATURE_ENTRIES
|
|
#endif // BUILDFLAG(ENABLE_PLAYLIST)
|
|
|
|
#define PSST_FEATURE_ENTRIES \
|
|
IF_BUILDFLAG(ENABLE_PSST, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"enable-psst", \
|
|
"Enable PSST (Privacy Site Settings Tool) feature", \
|
|
"Enable PSST feature", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(psst::features::kEnablePsst), \
|
|
}))
|
|
|
|
#if !BUILDFLAG(IS_ANDROID)
|
|
#define BRAVE_COMMANDS_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES( \
|
|
{ \
|
|
"brave-commands", \
|
|
"Brave Commands", \
|
|
"Enable experimental page for viewing and executing commands in " \
|
|
"Brave", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(commands::features::kBraveCommands), \
|
|
}, \
|
|
{"brave-commands-omnibox", "Brave Commands in Omnibox", \
|
|
"Enable quick commands in the omnibox", kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(features::kBraveCommandsInOmnibox)})
|
|
#else
|
|
#define BRAVE_COMMANDS_FEATURE_ENTRIES
|
|
#endif
|
|
|
|
#define CONTAINERS_FEATURE_ENTRIES \
|
|
IF_BUILDFLAG( \
|
|
ENABLE_CONTAINERS, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"containers", \
|
|
"Enable Containers", \
|
|
"Allows websites to be opened in contained tabs, keeping different " \
|
|
"identities separate within the same browser profile", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(containers::features::kContainers), \
|
|
}))
|
|
|
|
#if BUILDFLAG(IS_LINUX)
|
|
#define BRAVE_CHANGE_ACTIVE_TAB_ON_SCROLL_EVENT_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-change-active-tab-on-scroll-event", \
|
|
"Change active tab on scroll event", \
|
|
"Change the active tab when scroll events occur on tab strip.", \
|
|
kOsLinux, \
|
|
FEATURE_VALUE_TYPE(tabs::kBraveChangeActiveTabOnScrollEvent), \
|
|
})
|
|
#else
|
|
#define BRAVE_CHANGE_ACTIVE_TAB_ON_SCROLL_EVENT_FEATURE_ENTRIES
|
|
#endif
|
|
|
|
#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PLATFORM_HEVC)
|
|
#define BRAVE_FFMPEG_SOFTWARE_HEVC_DECODER_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-ffmpeg-software-hevc-decoder", \
|
|
"Software HEVC/H.265 decoder", \
|
|
"Enables the bundled FFmpeg HEVC software decoder. Useful as a " \
|
|
"fallback when hardware decode is unavailable (e.g. NVIDIA GPUs " \
|
|
"on Linux). Disable if HEVC playback misbehaves.", \
|
|
kOsLinux, \
|
|
FEATURE_VALUE_TYPE(media::kFFmpegSoftwareHEVCDecoder), \
|
|
})
|
|
#else
|
|
#define BRAVE_FFMPEG_SOFTWARE_HEVC_DECODER_FEATURE_ENTRIES
|
|
#endif
|
|
|
|
#if BUILDFLAG(IS_ANDROID)
|
|
#define BRAVE_BACKGROUND_VIDEO_PLAYBACK_ANDROID \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-background-video-playback", \
|
|
"Background video playback", \
|
|
"Enables play audio from video in background when tab is not active or " \
|
|
"device screen is turned off.", \
|
|
kOsAndroid, \
|
|
FEATURE_VALUE_TYPE( \
|
|
preferences::features::kBraveBackgroundVideoPlayback), \
|
|
})
|
|
#define BRAVE_SAFE_BROWSING_ANDROID \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-safe-browsing", \
|
|
"Safe Browsing", \
|
|
"Enables Google Safe Browsing for determining whether a URL has been " \
|
|
"marked as a known threat.", \
|
|
kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(safe_browsing::features::kBraveAndroidSafeBrowsing), \
|
|
})
|
|
#define BRAVE_ADAPTIVE_BUTTON_IN_TOOLBAR_ANDROID \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"adaptive-button-in-toolbar", \
|
|
"Adaptive Button In Toolbar (quick shortcut)", \
|
|
"Show quick shortcut button in toolbar. ", \
|
|
kOsAndroid, \
|
|
FEATURE_VALUE_TYPE( \
|
|
chrome::android::kAdaptiveButtonInTopToolbarCustomizationV2), \
|
|
})
|
|
#define BRAVE_ANDROID_DYNAMIC_COLORS \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-android-dynamic-colors", \
|
|
"Dynamic Colors", \
|
|
"Use dynamic colors in the application. This feature is only " \
|
|
"available on Android 12 and above.", \
|
|
kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(features::kBraveAndroidDynamicColors), \
|
|
})
|
|
#define BRAVE_CUSTOM_SEARCH_ENGINES \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-custom-search-engines", \
|
|
"Custom Search Engines", \
|
|
"Enable the ability to add, edit, and remove custom search engines " \
|
|
"from the search engine settings.", \
|
|
kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(features::kBraveCustomSearchEngines), \
|
|
})
|
|
#else
|
|
#define BRAVE_BACKGROUND_VIDEO_PLAYBACK_ANDROID
|
|
#define BRAVE_SAFE_BROWSING_ANDROID
|
|
#define BRAVE_ADAPTIVE_BUTTON_IN_TOOLBAR_ANDROID
|
|
#define BRAVE_ANDROID_DYNAMIC_COLORS
|
|
#define BRAVE_CUSTOM_SEARCH_ENGINES
|
|
#endif // BUILDFLAG(IS_ANDROID)
|
|
|
|
#if !BUILDFLAG(IS_ANDROID)
|
|
constexpr flags_ui::FeatureEntry::Choice kVerticalTabExpandDelayChoices[] = {
|
|
{"default", "", ""},
|
|
{"0ms", tabs::switches::kVerticalTabExpandDelaySwitch, "0"},
|
|
{"50ms", tabs::switches::kVerticalTabExpandDelaySwitch, "50"},
|
|
{"100ms", tabs::switches::kVerticalTabExpandDelaySwitch, "100"},
|
|
{"150ms", tabs::switches::kVerticalTabExpandDelaySwitch, "150"},
|
|
{"200ms", tabs::switches::kVerticalTabExpandDelaySwitch, "200"},
|
|
{"250ms", tabs::switches::kVerticalTabExpandDelaySwitch, "250"},
|
|
{"300ms", tabs::switches::kVerticalTabExpandDelaySwitch, "300"},
|
|
{"400ms", tabs::switches::kVerticalTabExpandDelaySwitch, "400"},
|
|
};
|
|
|
|
constexpr flags_ui::FeatureEntry::Choice kVerticalTabCollapseDelayChoices[] = {
|
|
{"default", "", ""},
|
|
{"0ms", tabs::switches::kVerticalTabCollapseDelaySwitch, "0"},
|
|
{"50ms", tabs::switches::kVerticalTabCollapseDelaySwitch, "50"},
|
|
{"100ms", tabs::switches::kVerticalTabCollapseDelaySwitch, "100"},
|
|
{"150ms", tabs::switches::kVerticalTabCollapseDelaySwitch, "150"},
|
|
{"200ms", tabs::switches::kVerticalTabCollapseDelaySwitch, "200"},
|
|
{"250ms", tabs::switches::kVerticalTabCollapseDelaySwitch, "250"},
|
|
{"300ms", tabs::switches::kVerticalTabCollapseDelaySwitch, "300"},
|
|
{"400ms", tabs::switches::kVerticalTabCollapseDelaySwitch, "400"},
|
|
};
|
|
|
|
#define BRAVE_TABS_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES( \
|
|
{ \
|
|
"brave-shared-pinned-tabs", \
|
|
"Shared pinned tab", \
|
|
"Pinned tabs are shared across windows", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(tabs::kBraveSharedPinnedTabs), \
|
|
}, \
|
|
{ \
|
|
"brave-horizontal-tabs-update", \
|
|
"Updated horizontal tabs design", \
|
|
"Updates the look and feel or horizontal tabs", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(tabs::kBraveHorizontalTabsUpdate), \
|
|
}, \
|
|
{ \
|
|
"brave-vertical-tab-scroll-bar", \
|
|
"Show scroll bar on vertical tab strip", \
|
|
"Shows scroll bar on vertical tab strip when it overflows", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(tabs::kBraveVerticalTabScrollBar), \
|
|
}, \
|
|
{ \
|
|
"brave-vertical-tab-hide-completely", \
|
|
"Brave Vertical Tab Hide Completely", \
|
|
"Hides the vertical tab strip when collapsed", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(tabs::kBraveVerticalTabHideCompletely), \
|
|
}, \
|
|
{ \
|
|
"brave-vertical-tab-expand-delay", \
|
|
"Brave Vertical Tab Expand Delay", \
|
|
"Delay before expanding the vertical tab strip when hovering", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
MULTI_VALUE_TYPE(kVerticalTabExpandDelayChoices), \
|
|
}, \
|
|
{ \
|
|
"brave-vertical-tab-collapse-delay", \
|
|
"Brave Vertical Tab Collapse Delay", \
|
|
"Delay before collapsing the vertical tab strip when mouse exits", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
MULTI_VALUE_TYPE(kVerticalTabCollapseDelayChoices), \
|
|
}, \
|
|
{ \
|
|
"brave-tree-tab", \
|
|
"Brave Tree Tab", \
|
|
"Enables the Tree Tab feature", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(tabs::kBraveTreeTab), \
|
|
}, \
|
|
{ \
|
|
"brave-scrollable-tab-strip", \
|
|
"Scrollable horizontal tab strip", \
|
|
"Enables scrolling for horizontal tab strip when tabs overflow", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(tabs::kBraveScrollableTabStrip), \
|
|
})
|
|
|
|
#else
|
|
#define BRAVE_TABS_FEATURE_ENTRIES
|
|
#endif
|
|
|
|
#define BRAVE_UPGRADE_WHEN_IDLE_FEATURE_ENTRY \
|
|
IF_BUILDFLAG( \
|
|
IS_MAC, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"upgrade-when-idle", \
|
|
"Upgrade when idle", \
|
|
"Restart the browser to apply a pending update when no windows are " \
|
|
"open, the system is idle, and no data would be cleared on exit.", \
|
|
kOsMac, \
|
|
FEATURE_VALUE_TYPE(brave::kUpgradeWhenIdle), \
|
|
}))
|
|
|
|
#if defined(TOOLKIT_VIEWS)
|
|
#define BRAVE_DARKER_THEME_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-ultra-dark-theme", \
|
|
"Brave Ultra Dark Theme", \
|
|
"Enables the Brave Ultra Dark theme", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(darker_theme::features::kBraveDarkerTheme), \
|
|
})
|
|
#else
|
|
#define BRAVE_DARKER_THEME_FEATURE_ENTRIES
|
|
#endif // defined(TOOLKIT_VIEWS)
|
|
|
|
#if defined(TOOLKIT_VIEWS)
|
|
#define BRAVE_FOCUS_MODE_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-focus-mode", \
|
|
"Focus Mode", \
|
|
"Enables Focus Mode, which hides browser chrome and provides " \
|
|
"hover-to-reveal access to hidden UI elements", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(features::kBraveFocusMode), \
|
|
})
|
|
#else
|
|
#define BRAVE_FOCUS_MODE_FEATURE_ENTRIES
|
|
#endif // defined(TOOLKIT_VIEWS)
|
|
|
|
#if defined(TOOLKIT_VIEWS)
|
|
#define BRAVE_PAGE_INFO_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-shields-page-info", \
|
|
"Show Brave Shields in Page Info", \
|
|
"Shows Brave Shields settings in the Page Info bubble", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(page_info::features::kShowBraveShieldsInPageInfo), \
|
|
})
|
|
#else
|
|
#define BRAVE_PAGE_INFO_FEATURE_ENTRIES
|
|
#endif // defined(TOOLKIT_VIEWS)
|
|
|
|
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
|
|
#define BRAVE_MIDDLE_CLICK_AUTOSCROLL_FEATURE_ENTRY \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"middle-button-autoscroll", \
|
|
"Middle button autoscroll", \
|
|
"Enables autoscrolling when the middle mouse button is clicked", \
|
|
kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(blink::features::kMiddleButtonClickAutoscroll), \
|
|
})
|
|
#else
|
|
#define BRAVE_MIDDLE_CLICK_AUTOSCROLL_FEATURE_ENTRY
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_AI_CHAT)
|
|
#define BRAVE_AI_CHAT_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES( \
|
|
{ \
|
|
"brave-ai-chat", \
|
|
"Brave AI Chat", \
|
|
"Summarize articles and engage in conversation with AI", \
|
|
kOsWin | kOsMac | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kAIChat), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-first", \
|
|
"Brave AI Chat First", \
|
|
"Prioritize Leo vs Search within Brave", \
|
|
kOsWin | kOsMac | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kAIChatFirst), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-history", \
|
|
"Brave AI Chat History", \
|
|
"Enables AI Chat History persistence and management", \
|
|
kOsWin | kOsMac | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kAIChatHistory), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-global-side-panel", \
|
|
"Brave AI Chat Global Side Panel", \
|
|
"Keeps the same conversation when navigating sites or changing " \
|
|
"active tab", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE( \
|
|
ai_chat::features::kAIChatGlobalSidePanelEverywhere), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-rich-search-widgets", \
|
|
"Brave AI Chat Rich Search Widgets", \
|
|
"Enables AI Chat Rich Search Widgets", \
|
|
kOsWin | kOsMac | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kRichSearchWidgets), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-user-choice-tool", \
|
|
"Brave AI Chat User Choice Tool", \
|
|
"AI can offer a multiple choice question to the user during a " \
|
|
"conversation.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kAIChatUserChoiceTool), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-agent-profile", \
|
|
"Brave's AI browsing", \
|
|
"Enables Ai browsing features and only in a separate built-in " \
|
|
"profile.", \
|
|
kOsWin | kOsMac | kOsLinux, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kAIChatAgentProfile), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-host-specific-distillation", \
|
|
"Brave AI Host-Specific Distillation", \
|
|
"Enables support for host-specific distillation scripts", \
|
|
kOsWin | kOsMac | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kCustomSiteDistillerScripts), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-context-menu-rewrite-in-place", \
|
|
"Brave AI Chat Rewrite In Place From Context Menu", \
|
|
"Enables AI Chat rewrite in place feature from the context menu", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kContextMenuRewriteInPlace), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-allow-private-ips", \
|
|
"Private IP Addresses for Custom Model Endpoints", \
|
|
"Permits the use of private IP addresses as model endpoint URLs", \
|
|
kOsWin | kOsMac | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kAllowPrivateIPs), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-open-leo-from-brave-search", \
|
|
"Open Leo AI Chat from Brave Search", \
|
|
"Enables opening Leo AI Chat from Brave Search", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kOpenAIChatFromBraveSearch), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-web-content-association-default", \
|
|
"Brave AI Chat Web Content Association Default", \
|
|
"For AI Chat Conversations which are associated with web content, " \
|
|
"allow the toggle for sending page content to be set to enabled " \
|
|
"when the conversation is created.", \
|
|
kOsWin | kOsMac | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kPageContextEnabledInitially), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-show-input-on-new-tab-page", \
|
|
"Show AI Chat input on the New Tab Page", \
|
|
"Show a Brave AI chat input on the New Tab Page.", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kShowAIChatInputOnNewTabPage), \
|
|
}, \
|
|
{ \
|
|
"brave-ai-chat-detailed-page-content-extraction", \
|
|
"Brave AI Chat Detailed Page Content Extraction", \
|
|
"Uses optimization_guide-based page content extraction as the " \
|
|
"default method for AI Chat page context.", \
|
|
kOsWin | kOsMac | kOsLinux | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE( \
|
|
ai_chat::features::kAIChatDetailedPageContentExtraction), \
|
|
})
|
|
#else
|
|
#define BRAVE_AI_CHAT_FEATURE_ENTRIES
|
|
#endif
|
|
|
|
#define BRAVE_AI_CHAT_TAB_MANAGEMENT_TOOL_ENTRY \
|
|
IF_BUILDFLAG(ENABLE_AI_CHAT_TAB_MANAGEMENT_TOOL, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-ai-chat-tab-management-tool", \
|
|
"Brave AI Chat Tab Management Tool", \
|
|
"AI can offer to sort, group, or close tabs to solve a " \
|
|
"user task during a conversation.", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(ai_chat::features::kTabManagementTool), \
|
|
}))
|
|
|
|
// The upstream "history-embeddings" flag expired at M145. Use a
|
|
// different name to bypass the expiry system while controlling the
|
|
// same underlying kHistoryEmbeddings feature.
|
|
#define BRAVE_HISTORY_EMBEDDINGS_FLAG \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-history-embeddings", \
|
|
"History Embeddings", \
|
|
"Enables semantic history search using local embeddings.", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(history_embeddings::kHistoryEmbeddings), \
|
|
})
|
|
|
|
#define BRAVE_OMNIBOX_FEATURES \
|
|
EXPAND_FEATURE_ENTRIES( \
|
|
{ \
|
|
"brave-omnibox-tab-switch-by-default", \
|
|
"Brave Tab Switch by Default", \
|
|
"Prefer switching to already open tabs, rather than navigating in " \
|
|
"a " \
|
|
"new tab", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE(omnibox::kOmniboxTabSwitchByDefault), \
|
|
}, \
|
|
{ \
|
|
"brave-history-more-search-results", \
|
|
"Brave More History", \
|
|
"Include more history in the omnibox search results", \
|
|
kOsWin | kOsLinux | kOsMac | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(history::kHistoryMoreSearchResults), \
|
|
})
|
|
|
|
#define BRAVE_EXTENSIONS_MANIFEST_V2 \
|
|
IF_BUILDFLAG( \
|
|
ENABLE_EXTENSIONS, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-extensions-manifest-v2", \
|
|
"Brave Extensions manifest V2", \
|
|
"Enables Brave support for some manifest V2 extensions", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(extensions_mv2::features::kExtensionsManifestV2), \
|
|
}))
|
|
|
|
#define BRAVE_EXTENSION_AUTO_UPDATE_FEATURE_ENTRY \
|
|
IF_BUILDFLAG( \
|
|
ENABLE_EXTENSIONS, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-user-extension-auto-update", \
|
|
"Automatically Update Extensions", \
|
|
"Automatically update user-installed Web extensions. When " \
|
|
"disabled, extensions will not update in the background. Folks can " \
|
|
"still update them manually from the brave://extensions page.", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE( \
|
|
extensions::features::kBraveAutoUpdateExtensions), \
|
|
}))
|
|
|
|
#if BUILDFLAG(ENABLE_BRAVE_EDUCATION)
|
|
#define BRAVE_EDUCATION_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-show-getting-started-page", \
|
|
"Show getting started pages", \
|
|
"Show a getting started page after completing the Welcome UX.", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(brave_education::features::kShowGettingStartedPage), \
|
|
})
|
|
#else
|
|
#define BRAVE_EDUCATION_FEATURE_ENTRIES
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_OMAHA4)
|
|
#define BRAVE_UPDATER_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-use-omaha4", \
|
|
"Use Omaha 4", \
|
|
"Use the new automatic update system", \
|
|
kOsMac, \
|
|
FEATURE_VALUE_TYPE(brave_updater::kBraveUseOmaha4), \
|
|
})
|
|
#else
|
|
#define BRAVE_UPDATER_FEATURE_ENTRIES
|
|
#endif
|
|
|
|
#define BRAVE_WEBASSEMBLY_JITLESS_FEATURE_ENTRY \
|
|
IF_BUILDFLAG(BRAVE_V8_ENABLE_DRUMBRAKE, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-webassembly-jitless", \
|
|
"Allow WebAssembly to run without JIT", \
|
|
"Allow WebAssembly to run in interpreter mode even when " \
|
|
"JIT compilation is disabled. " \
|
|
"This enables WebAssembly content to work on sites with " \
|
|
"strict security settings.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(features::kBraveWebAssemblyJitless), \
|
|
}))
|
|
|
|
#define BRAVE_FORCE_POPUP_TO_BE_OPENED_IN_NEW_TAB_FEATURE_ENTRY \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"force-popup-to-be-opened-as-tab", \
|
|
"Force popups to be opened as tab", \
|
|
"Forces all popup windows to be opened in a new tab instead.", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(features::kForcePopupToBeOpenedAsTab), \
|
|
})
|
|
|
|
#define EMAIL_ALIASES_FEATURE_ENTRIES \
|
|
IF_BUILDFLAG( \
|
|
ENABLE_EMAIL_ALIASES, \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-email-aliases", \
|
|
"Enable Email Aliases", \
|
|
"Enable Email Aliases to create unique, private " \
|
|
"addresses that forward to your primary inbox. This allows you to " \
|
|
"sign up for services anonymously and keep your main account free " \
|
|
"from spam.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(email_aliases::features::kEmailAliases), \
|
|
}))
|
|
|
|
#if !BUILDFLAG(IS_ANDROID)
|
|
#define BRAVE_WORKSPACE_FEATURE_ENTRY \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-workspace", \
|
|
"Brave Workspace", \
|
|
"Save sets of windows and tabs into loadable workspaces.", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE(features::kWorkspaces), \
|
|
})
|
|
#else
|
|
#define BRAVE_WORKSPACE_FEATURE_ENTRY
|
|
#endif
|
|
|
|
// Keep the last item empty.
|
|
#define LAST_BRAVE_FEATURE_ENTRIES_ITEM
|
|
|
|
#define BRAVE_ABOUT_FLAGS_FEATURE_ENTRIES \
|
|
EXPAND_FEATURE_ENTRIES( \
|
|
{ \
|
|
"brave-v8-jitless-mode", \
|
|
"V8 Jitless mode", \
|
|
"Enable V8 jitless mode when optimizations are disabled. " \
|
|
"V8 runs in jitless mode which reduces performance but improves " \
|
|
"security. This does not affect all pages.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(features::kBraveV8JitlessMode), \
|
|
}, \
|
|
{ \
|
|
"use-dev-updater-url", \
|
|
"Use dev updater url", \
|
|
"Use the dev url for the component updater. This is for internal " \
|
|
"testing only.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_component_updater::kUseDevUpdaterUrl), \
|
|
}, \
|
|
{ \
|
|
"brave-ntp-search-widget", \
|
|
"Brave Search Widget on the NTP", \
|
|
"Enables searching directly from the New Tab Page", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(features::kBraveNtpSearchWidget), \
|
|
}, \
|
|
{ \
|
|
"center-ntt-cta-button", \
|
|
"Center image NTT CTA button", \
|
|
"Centers image NTT CTA button above the widget area", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE( \
|
|
ntp_background_images::features::kCenterNttCtaButton), \
|
|
}, \
|
|
{ \
|
|
"brave-filled-bookmark-folder-icon", \
|
|
"Use filled bookmark folder icon", \
|
|
"Uses the legacy filled bookmark folder icon instead of the " \
|
|
"default outlined icon", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(features::kBraveFilledBookmarkFolderIcon), \
|
|
}, \
|
|
{ \
|
|
"brave-ntp-refresh-enabled", \
|
|
"New Tab Page refresh", \
|
|
"Enables the refreshed version of the New Tab Page", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(features::kBraveNewTabPageRefreshEnabled), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-dat-cache", \
|
|
"Enable adblock DAT file caching", \
|
|
"Cache compiled adblock engines to disk as serialized DAT files. " \
|
|
"On subsequent startups, cached DAT files are loaded instead of " \
|
|
"reprocessing filter lists, improving startup time.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kAdblockDATCache), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-cname-uncloaking", \
|
|
"Enable CNAME uncloaking", \
|
|
"Take DNS CNAME records into account when making network request " \
|
|
"blocking decisions.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockCnameUncloaking), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-collapse-blocked-elements", \
|
|
"Collapse HTML elements with blocked source attributes", \
|
|
"Cause iframe and img elements to be collapsed if the URL of their " \
|
|
"src attribute is blocked", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockCollapseBlockedElements), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-cookie-list-default", \
|
|
"Treat 'Easylist-Cookie List' as a default list source", \
|
|
"Enables the 'Easylist-Cookie List' regional list if its toggle in " \
|
|
"brave://adblock hasn't otherwise been modified", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockCookieListDefault), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-cosmetic-filtering", \
|
|
"Enable cosmetic filtering", \
|
|
"Enable support for cosmetic filtering", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockCosmeticFiltering), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-csp-rules", \
|
|
"Enable support for CSP rules", \
|
|
"Applies additional CSP rules to pages for which a $csp rule has " \
|
|
"been loaded from a filter list", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kBraveAdblockCspRules), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-default-1p-blocking", \
|
|
"Shields first-party network blocking", \
|
|
"Allow Brave Shields to block first-party network requests in " \
|
|
"Standard blocking mode", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockDefault1pBlocking), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-mobile-notifications-list-default", \
|
|
"Treat 'Fanboy's Mobile Notifications List' as a default list " \
|
|
"source", \
|
|
\
|
|
"Enables the 'Fanboy's Mobile Notifications List' regional list if " \
|
|
"its toggle in brave://adblock hasn't otherwise been modified", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features:: \
|
|
kBraveAdblockMobileNotificationsListDefault), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-procedural-filtering", \
|
|
"Enable procedural filtering", \
|
|
"Enable support for procedural cosmetic filtering", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockProceduralFiltering), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-experimental-list-default", \
|
|
"Treat 'Brave Experimental Adblock Rules' as a default list " \
|
|
"source", \
|
|
\
|
|
"Enables the 'Brave Experimental Adblock Rules' regional list if " \
|
|
"its toggle in brave://adblock hasn't otherwise been modified", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockExperimentalListDefault), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-scriptlet-debug-logs", \
|
|
"Enable debug logging for scriptlet injections", \
|
|
"Enable console debugging for scriptlets injected by cosmetic " \
|
|
"filtering, exposing additional information that can be useful for " \
|
|
"filter authors.", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockScriptletDebugLogs), \
|
|
}, \
|
|
{ \
|
|
"brave-adblock-show-hidden-components", \
|
|
"Show hidden adblock filter list components", \
|
|
"Reveals adblock filter list components in " \
|
|
"brave://settings/shields/filters that would normally be hidden.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveAdblockShowHiddenComponents), \
|
|
}, \
|
|
{ \
|
|
"brave-dark-mode-block", \
|
|
"Enable dark mode blocking fingerprinting protection", \
|
|
"Always report light mode when fingerprinting protections set to " \
|
|
"Strict", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kBraveDarkModeBlock), \
|
|
}, \
|
|
{ \
|
|
"brave-domain-block", \
|
|
"Enable domain blocking", \
|
|
"Enable support for blocking domains with an interstitial page", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kBraveDomainBlock), \
|
|
}, \
|
|
{ \
|
|
"brave-domain-block-1pes", \
|
|
"Enable domain blocking using First Party Ephemeral Storage", \
|
|
"When visiting a blocked domain, Brave will try to enable " \
|
|
"Ephemeral Storage for a first party context, meaning neither " \
|
|
"cookies nor localStorage data will be persisted after a website " \
|
|
"is closed. Ephemeral Storage will be auto-enabled only if no data " \
|
|
"was previously stored for a website", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kBraveDomainBlock1PES), \
|
|
}, \
|
|
{ \
|
|
"brave-debounce", \
|
|
"Enable debouncing", \
|
|
"Enable support for skipping top-level redirect tracking URLs", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(debounce::features::kBraveDebounce), \
|
|
}, \
|
|
{ \
|
|
"brave-de-amp", \
|
|
"Enable De-AMP", \
|
|
"Enable De-AMPing feature", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(de_amp::features::kBraveDeAMP), \
|
|
}, \
|
|
{ \
|
|
"brave-google-sign-in-permission", \
|
|
"Enable Google Sign-In Permission Prompt", \
|
|
"Enable permissioning access to legacy Google Sign-In", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(google_sign_in_permission::features:: \
|
|
kBraveGoogleSignInPermission), \
|
|
}, \
|
|
{ \
|
|
"brave-extension-network-blocking", \
|
|
"Enable extension network blocking", \
|
|
"Enable blocking for network requests initiated by extensions", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveExtensionNetworkBlocking), \
|
|
}, \
|
|
{ \
|
|
"brave-reduce-language", \
|
|
"Reduce language identifiability", \
|
|
"Reduce the identifiability of my language preferences", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kBraveReduceLanguage), \
|
|
}, \
|
|
{ \
|
|
"brave-cosmetic-filtering-sync-load", \
|
|
"Enable sync loading of cosmetic filter rules", \
|
|
"Enable sync loading of cosmetic filter rules", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kCosmeticFilteringSyncLoad), \
|
|
}, \
|
|
{ \
|
|
"block-all-cookies-toggle", \
|
|
"'Block all cookies' option in Shields global defaults", \
|
|
"Shows the 'Block all cookies' toggle in Shields global defaults. " \
|
|
"This global setting prevents all websites from storing cookies " \
|
|
"on your device, but is also very likely to lead to site breakage.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kBlockAllCookiesToggle), \
|
|
}, \
|
|
{ \
|
|
"block-element-feature", \
|
|
"Enable Block Element feature", \
|
|
"Allows to block selected HTML element on the page", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveShieldsElementPicker), \
|
|
}, \
|
|
{ \
|
|
"brave-farbling", \
|
|
"Enable Brave Farbling", \
|
|
"Enables randomization of fingerprinting-susceptible WebAPIs", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kBraveFarbling), \
|
|
}, \
|
|
{ \
|
|
"brave-provisional-tld-ephemeral-lifetime", \
|
|
"Enable Provisional TLDEphemeralLifetime", \
|
|
"Cleanup third party cookies set during redirects", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
net::features::kBraveProvisionalTLDEphemeralLifetime), \
|
|
}, \
|
|
{ \
|
|
"brave-ephemeral-storage", \
|
|
"Enable Ephemeral Storage", \
|
|
"Use ephemeral storage for third-party frames", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(net::features::kBraveEphemeralStorage), \
|
|
}, \
|
|
{ \
|
|
"brave-ephemeral-storage-keep-alive", \
|
|
"Ephemeral Storage Keep Alive", \
|
|
"Keep ephemeral storage partitions alive for a specified time " \
|
|
"after all tabs for that origin are closed", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(net::features::kBraveEphemeralStorageKeepAlive), \
|
|
}, \
|
|
{ \
|
|
"brave-first-party-ephemeral-storage", \
|
|
"Enable First Party Ephemeral Storage", \
|
|
"Enable support for First Party Ephemeral Storage using " \
|
|
"SESSION_ONLY cookie setting", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(net::features::kBraveFirstPartyEphemeralStorage), \
|
|
}, \
|
|
{ \
|
|
"brave-forget-first-party-storage", \
|
|
"Enable First Party Storage Cleanup support", \
|
|
"Add cookie blocking mode which allows Brave to cleanup first " \
|
|
"party storage (Cookies, DOM Storage) on website close", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(net::features::kBraveForgetFirstPartyStorage), \
|
|
}, \
|
|
{ \
|
|
"brave-rewards-verbose-logging", \
|
|
"Enable Brave Rewards verbose logging", \
|
|
"Enables detailed logging of Brave Rewards system events to a log " \
|
|
"file stored on your device. Please note that this log file could " \
|
|
"include information such as browsing history and credentials such " \
|
|
"as passwords and access tokens depending on your activity. Please " \
|
|
"do not share it unless asked to by Brave staff.", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(brave_rewards::features::kVerboseLoggingFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-rewards-allow-unsupported-wallet-providers", \
|
|
"Always show Brave Rewards custodial connection options", \
|
|
\
|
|
"Allows all custodial options to be selected in Brave Rewards, " \
|
|
"including those not supported for your Rewards country.", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(brave_rewards::features:: \
|
|
kAllowUnsupportedWalletProvidersFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-rewards-allow-self-custody-providers", \
|
|
"Enable Brave Rewards self-custody connection options", \
|
|
"Enables self-custody options to be selected in Brave Rewards.", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_rewards::features::kAllowSelfCustodyProvidersFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-rewards-animated-background", \
|
|
"Show an animated background on the Rewards UI", \
|
|
"Shows an animated background on the Rewards panel and page.", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_rewards::features::kAnimatedBackgroundFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-rewards-platform-creator-detection", \
|
|
"Detect Brave Creators on media platform sites", \
|
|
"Enables detection of Brave Creator pages on media platform sites.", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_rewards::features::kPlatformCreatorDetectionFeature), \
|
|
}, \
|
|
{ \
|
|
"file-system-access-api", \
|
|
"File System Access API", \
|
|
"Enables the File System Access API, giving websites access to the " \
|
|
"file system", \
|
|
kOsDesktop, \
|
|
FEATURE_VALUE_TYPE(blink::features::kFileSystemAccessAPI), \
|
|
}, \
|
|
{ \
|
|
"brave-web-bluetooth-api", \
|
|
"Web Bluetooth API", \
|
|
"Enables the Web Bluetooth API, giving websites access to " \
|
|
"Bluetooth devices", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(blink::features::kBraveWebBluetoothAPI), \
|
|
}, \
|
|
{ \
|
|
"navigator-connection-attribute", \
|
|
"Enable navigator.connection attribute", \
|
|
"Enables the navigator.connection API. Enabling this API will " \
|
|
"allow sites to learn information about your network and internet " \
|
|
"connection. Trackers can use this information to fingerprint your " \
|
|
"browser, or to infer when you are traveling or at home.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(blink::features::kNavigatorConnectionAttribute), \
|
|
}, \
|
|
{ \
|
|
"restrict-websockets-pool", \
|
|
"Restrict WebSockets pool", \
|
|
"Limits simultaneous active WebSockets connections per eTLD+1", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(blink::features::kRestrictWebSocketsPool), \
|
|
}, \
|
|
{ \
|
|
"allow-incognito-permission-inheritance", \
|
|
"Allow permission inheritance in incognito profiles", \
|
|
"When enabled, most permissions set in a normal profile will be " \
|
|
"inherited in incognito profile if they are less permissive, for " \
|
|
"ex. Geolocation BLOCK will be automatically set to BLOCK in " \
|
|
"incognito.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
content_settings::kAllowIncognitoPermissionInheritance), \
|
|
}, \
|
|
{ \
|
|
"brave-block-screen-fingerprinting", \
|
|
"Block screen fingerprinting", \
|
|
"Prevents JavaScript and CSS from learning the user's screen " \
|
|
"dimensions or window position.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
blink::features::kBraveBlockScreenFingerprinting), \
|
|
}, \
|
|
{ \
|
|
"brave-tor-windows-https-only", \
|
|
"Use HTTPS-Only Mode in Private Windows with Tor", \
|
|
"Prevents Private Windows with Tor from making any insecure HTTP " \
|
|
"connections without warning the user first.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(net::features::kBraveTorWindowsHttpsOnly), \
|
|
}, \
|
|
{ \
|
|
"brave-round-time-stamps", \
|
|
"Round time stamps", \
|
|
"Prevents JavaScript from getting access to high-resolution clocks " \
|
|
"by rounding all DOMHighResTimeStamps to the nearest millisecond.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(blink::features::kBraveRoundTimeStamps), \
|
|
}, \
|
|
{ \
|
|
"restrict-event-source-pool", \
|
|
"Restrict Event Source Pool", \
|
|
"Limits simultaneous active WebSockets connections per eTLD+1", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(blink::features::kRestrictEventSourcePool), \
|
|
}, \
|
|
{ \
|
|
"brave-copy-clean-link-by-default", \
|
|
"Override default copy hotkey with copy clean link", \
|
|
"Sanitize url before copying, replaces default ctrl+c hotkey for " \
|
|
"url ", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE(features::kBraveCopyCleanLinkByDefault), \
|
|
}, \
|
|
{ \
|
|
"brave-clean-link-js-api", \
|
|
"Sanitize URLs in the clipboard", \
|
|
"Sanitize URLs in the clipboard when they are added via the JS API " \
|
|
"(share/copy buttons). ", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE(features::kBraveCopyCleanLinkFromJs), \
|
|
}, \
|
|
{ \
|
|
"brave-global-privacy-control-enabled", \
|
|
"Enable Global Privacy Control", \
|
|
"Enable the Sec-GPC request header and the " \
|
|
"navigator.globalPrivacyControl JS API", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(blink::features::kBraveGlobalPrivacyControl), \
|
|
}, \
|
|
{ \
|
|
"https-by-default", \
|
|
"Use HTTPS by Default", \
|
|
"Attempt to connect to all websites using HTTPS before falling " \
|
|
"back to HTTP.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(net::features::kBraveHttpsByDefault), \
|
|
}, \
|
|
{ \
|
|
"fallback-dns-over-https", \
|
|
"Use a fallback DoH provider", \
|
|
"In Automatic DoH mode, use a fallback DoH provider if the current " \
|
|
"provider doesn't offer Secure DNS.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(net::features::kBraveFallbackDoHProvider), \
|
|
}, \
|
|
{ \
|
|
"brave-show-strict-fingerprinting-mode", \
|
|
"Show Strict Fingerprinting Mode", \
|
|
"Show Strict (aggressive) option for Fingerprinting Mode in " \
|
|
"Brave Shields ", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kBraveShowStrictFingerprintingMode), \
|
|
}, \
|
|
{ \
|
|
"brave-override-download-danger-level", \
|
|
"Override download danger level", \
|
|
"Disables download warnings for files which are considered " \
|
|
"dangerous when Safe Browsing is disabled. Use at your own risks. " \
|
|
"Not recommended.", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE(features::kBraveOverrideDownloadDangerLevel), \
|
|
}, \
|
|
{ \
|
|
"brave-webcompat-exceptions-service", \
|
|
"Allow feature exceptions for webcompat", \
|
|
"Disables Brave features for specific websites when they break " \
|
|
"website functionality.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
webcompat::features::kBraveWebcompatExceptionsService), \
|
|
}, \
|
|
{ \
|
|
"brave-rounded-corners-by-default", \
|
|
"Use rounded corners on main content areas by default", \
|
|
"Renders the main content area and sidebar panel with rounded " \
|
|
"corners, padding, and a drop shadow by default", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE(features::kBraveRoundedCornersByDefault), \
|
|
}, \
|
|
{ \
|
|
"brave-override-sync-server-url", \
|
|
"Override Brave Sync server URL", \
|
|
"Allows you to use a self-hosted server with Brave Sync. You can " \
|
|
"learn more about the server implementation in the repository link " \
|
|
"mentioned below. " \
|
|
"Note: Only HTTPS URLs are supported by default. HTTP URLs are " \
|
|
"only allowed for potentially trustworthy origins like localhost. " \
|
|
"Insecure URLs that don't meet these requirements will be ignored " \
|
|
"in favor of the official Brave-hosted server", \
|
|
kOsAll, \
|
|
ORIGIN_LIST_VALUE_TYPE(syncer::kSyncServiceURL, ""), \
|
|
kBraveSyncImplLink, \
|
|
}, \
|
|
{ \
|
|
"brave-ad-block-only-mode", \
|
|
"Enable Adblock-Only Mode", \
|
|
"Adblock-Only mode retains core ad blocking rules of Brave " \
|
|
"Shields. Warning: removes all privacy protections. Please note " \
|
|
"that for individual websites broken by Brave's privacy " \
|
|
"protections, you can set Shields to DOWN. This is an experimental " \
|
|
"mode.", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kAdblockOnlyMode), \
|
|
}, \
|
|
{ \
|
|
"brave-show-updated-shields-panel", \
|
|
"Show updated shields panel", \
|
|
"Shows an updated WebUI for the Brave Shields panel.", \
|
|
kOsWin | kOsLinux | kOsMac, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_shields::features::kShowUpdatedShieldsPanel), \
|
|
}, \
|
|
{ \
|
|
"brave-sync-default-passwords", \
|
|
"Enable password syncing by default", \
|
|
"Turn on password syncing when Sync is enabled.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE( \
|
|
brave_sync::features::kBraveSyncDefaultPasswords), \
|
|
}, \
|
|
{ \
|
|
"brave-shred", \
|
|
"Enable Brave 'Shred' Feature", \
|
|
"Enable the Brave 'Shred' feature which will allow a user to " \
|
|
"easily delete all site data on demand or automatically when " \
|
|
"closing a site or terminating the application.", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(brave_shields::features::kBraveShredFeature), \
|
|
}, \
|
|
{ \
|
|
"brave-request-info-unique-ptr", \
|
|
"BraveRequestInfo unique_ptr", \
|
|
"Enable experimental use of unique_ptr/WeakPtr instead of " \
|
|
"shared_ptr " \
|
|
"for BraveRequestInfo", \
|
|
kOsAll, \
|
|
FEATURE_VALUE_TYPE(features::kBraveRequestInfoUniquePtr), \
|
|
}) \
|
|
BRAVE_NATIVE_WALLET_FEATURE_ENTRIES \
|
|
BRAVE_NEWS_FEATURE_ENTRIES \
|
|
SPEEDREADER_FEATURE_ENTRIES \
|
|
REQUEST_OTR_FEATURE_ENTRIES \
|
|
BRAVE_MODULE_FILENAME_PATCH \
|
|
PLAYLIST_FEATURE_ENTRIES \
|
|
BRAVE_COMMANDS_FEATURE_ENTRIES \
|
|
CONTAINERS_FEATURE_ENTRIES \
|
|
BRAVE_BACKGROUND_VIDEO_PLAYBACK_ANDROID \
|
|
BRAVE_SAFE_BROWSING_ANDROID \
|
|
BRAVE_ADAPTIVE_BUTTON_IN_TOOLBAR_ANDROID \
|
|
BRAVE_ANDROID_DYNAMIC_COLORS \
|
|
BRAVE_CUSTOM_SEARCH_ENGINES \
|
|
BRAVE_CHANGE_ACTIVE_TAB_ON_SCROLL_EVENT_FEATURE_ENTRIES \
|
|
BRAVE_FFMPEG_SOFTWARE_HEVC_DECODER_FEATURE_ENTRIES \
|
|
BRAVE_TABS_FEATURE_ENTRIES \
|
|
BRAVE_DARKER_THEME_FEATURE_ENTRIES \
|
|
BRAVE_PAGE_INFO_FEATURE_ENTRIES \
|
|
BRAVE_FOCUS_MODE_FEATURE_ENTRIES \
|
|
BRAVE_AI_CHAT_FEATURE_ENTRIES \
|
|
BRAVE_AI_CHAT_TAB_MANAGEMENT_TOOL_ENTRY \
|
|
BRAVE_HISTORY_EMBEDDINGS_FLAG \
|
|
BRAVE_OMNIBOX_FEATURES \
|
|
BRAVE_MIDDLE_CLICK_AUTOSCROLL_FEATURE_ENTRY \
|
|
BRAVE_UPGRADE_WHEN_IDLE_FEATURE_ENTRY \
|
|
BRAVE_EXTENSIONS_MANIFEST_V2 \
|
|
BRAVE_EXTENSION_AUTO_UPDATE_FEATURE_ENTRY \
|
|
BRAVE_WORKAROUND_NEW_WINDOW_FLASH \
|
|
BRAVE_WEBASSEMBLY_JITLESS_FEATURE_ENTRY \
|
|
BRAVE_EDUCATION_FEATURE_ENTRIES \
|
|
BRAVE_UPDATER_FEATURE_ENTRIES \
|
|
PSST_FEATURE_ENTRIES \
|
|
BRAVE_FORCE_POPUP_TO_BE_OPENED_IN_NEW_TAB_FEATURE_ENTRY \
|
|
EMAIL_ALIASES_FEATURE_ENTRIES \
|
|
BRAVE_WORKSPACE_FEATURE_ENTRY \
|
|
EXPAND_FEATURE_ENTRIES({ \
|
|
"brave-origin", \
|
|
"Enable Brave Origin", \
|
|
"Enables Brave Origin features and settings.", \
|
|
kOsDesktop | kOsAndroid, \
|
|
FEATURE_VALUE_TYPE(brave_origin::features::kBraveOrigin), \
|
|
}) \
|
|
LAST_BRAVE_FEATURE_ENTRIES_ITEM // Keep it as the last item.
|
|
namespace flags_ui {
|
|
namespace {
|
|
|
|
// Unused function to reference Brave feature entries for clang
|
|
// checks.
|
|
[[maybe_unused]] void UseBraveAboutFlags() {
|
|
// These vars are declared in anonymous namespace in
|
|
// //chrome/browser/about_flags.cc. We declare them here
|
|
// manually to instantiate BRAVE_ABOUT_FLAGS_FEATURE_ENTRIES
|
|
// without errors.
|
|
constexpr int kOsAll = 0;
|
|
constexpr int kOsDesktop = 0;
|
|
|
|
static_assert(
|
|
std::initializer_list<FeatureEntry>{BRAVE_ABOUT_FLAGS_FEATURE_ENTRIES}
|
|
.size());
|
|
} // namespace
|
|
|
|
} // namespace
|
|
} // namespace flags_ui
|