--- chrome/browser/about_flags.cc.orig 2024-10-16 21:30:55 UTC +++ chrome/browser/about_flags.cc @@ -244,7 +244,7 @@ #include "ui/ui_features.h" #include "url/url_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif @@ -337,7 +337,7 @@ #include "device/vr/public/cpp/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) @@ -346,7 +346,7 @@ #include "chrome/browser/win/mica_titlebar.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/profile_management/profile_management_features.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) @@ -356,7 +356,7 @@ #include "components/user_education/common/user_education_features.h" // nogncheck #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/ui_features.h" #include "ui/base/ui_base_features.h" #endif @@ -498,7 +498,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap {"Max 3 Frames", &kDXGIWaitableSwapChain3Frames, 1, nullptr}}; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = { {flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""}, {flag_descriptions::kOzonePlatformHintChoiceAuto, @@ -775,6 +775,26 @@ const FeatureEntry::FeatureVariation std::size(kWebIdentityDigitalIdentityCredentialHighRiskDialogParam), nullptr}}; +#if BUILDFLAG(IS_BSD) +const FeatureEntry::FeatureParam kAudioBackendPulseAudio[] = { + { "audio-backend", "pulseaudio" }}; +const FeatureEntry::FeatureParam kAudioBackendSndio[] = { + { "audio-backend", "sndio" }}; +const FeatureEntry::FeatureParam kAudioBackendAlsa[] = { + { "audio-backend", "alsa" }}; +const FeatureEntry::FeatureVariation + kAudioBackendVariations[] = { + {"using PulseAudio by default if available", kAudioBackendPulseAudio, + std::size(kAudioBackendPulseAudio), + nullptr}, + {"using sndio by default if available", kAudioBackendSndio, + std::size(kAudioBackendSndio), + nullptr}, + {"using ALSA by default if available", kAudioBackendAlsa, + std::size(kAudioBackendAlsa), + nullptr}}; +#endif + const FeatureEntry::FeatureParam kClipboardMaximumAge60Seconds[] = { {"UIClipboardMaximumAge", "60"}}; const FeatureEntry::FeatureParam kClipboardMaximumAge90Seconds[] = { @@ -1188,7 +1208,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kHistoryEmbeddingsAtKeywordAcceleration[]{ {"AtKeywordAcceleration", "true"}, }; @@ -1232,7 +1252,7 @@ const FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSingleUrl[] = { {"ShortcutBoostSearchScore", "0"}, {"ShortcutBoostNonTopHitThreshold", "0"}, @@ -3678,7 +3698,7 @@ const flags_ui::FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOn[] = {{"link_capturing_state", "on_by_default"}}; const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOff[] = @@ -4920,7 +4940,7 @@ const FeatureEntry kFeatureEntries[] = { }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "fluent-overlay-scrollbars", flag_descriptions::kFluentOverlayScrollbarsName, @@ -5332,7 +5352,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWebAppUniversalInstallDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kWebAppUniversalInstall)}, #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"shortcuts-not-apps", flag_descriptions::kShortcutsNotAppsName, flag_descriptions::kShortcutsNotAppsDescription, kOsMac | kOsWin | kOsLinux, @@ -5487,7 +5507,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"pulseaudio-loopback-for-cast", flag_descriptions::kPulseaudioLoopbackForCastName, flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, @@ -5514,9 +5534,18 @@ const FeatureEntry kFeatureEntries[] = { {"wayland-text-input-v3", flag_descriptions::kWaylandTextInputV3Name, flag_descriptions::kWaylandTextInputV3Description, kOsLinux, FEATURE_VALUE_TYPE(features::kWaylandTextInputV3)}, +#if BUILDFLAG(IS_BSD) + {"audio-backend", + flag_descriptions::kAudioBackendName, + flag_descriptions::kAudioBackendDescription, kOsLinux, + FEATURE_WITH_PARAMS_VALUE_TYPE( + media::kAudioBackend, + kAudioBackendVariations, + "AudioBackend")}, +#endif #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, @@ -6465,7 +6494,7 @@ const FeatureEntry kFeatureEntries[] = { "MlUrlScoring")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"omnibox-domain-suggestions", flag_descriptions::kOmniboxDomainSuggestionsName, flag_descriptions::kOmniboxDomainSuggestionsDescription, kOsDesktop, @@ -6752,7 +6781,7 @@ const FeatureEntry kFeatureEntries[] = { "OrganicRepeatableQueries")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"history-embeddings", flag_descriptions::kHistoryEmbeddingsName, flag_descriptions::kHistoryEmbeddingsDescription, kOsDesktop, FEATURE_WITH_PARAMS_VALUE_TYPE(history_embeddings::kHistoryEmbeddings, @@ -7341,7 +7370,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(printing::features::kAddPrinterViaPrintscanmgr)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"cups-ipp-printing-backend", flag_descriptions::kCupsIppPrintingBackendName, flag_descriptions::kCupsIppPrintingBackendDescription, kOsDesktop, @@ -8326,7 +8355,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kCooperativeSchedulingDescription, kOsAll, FEATURE_VALUE_TYPE(features::kCooperativeScheduling)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-network-service-sandbox", flag_descriptions::kEnableNetworkServiceSandboxName, flag_descriptions::kEnableNetworkServiceSandboxDescription, @@ -8350,7 +8379,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(media::kV4L2FlatStatefulVideoDecoder)}, #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"enable-family-link-extensions-permissions", flag_descriptions:: kEnableExtensionsPermissionsForSupervisedUsersOnDesktopName, @@ -9184,7 +9213,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, @@ -9217,7 +9246,7 @@ const FeatureEntry kFeatureEntries[] = { #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { "ui-debug-tools", flag_descriptions::kUIDebugToolsName, @@ -9745,7 +9774,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kRenderPassDrawnRect)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"media-session-enter-picture-in-picture", flag_descriptions::kMediaSessionEnterPictureInPictureName, flag_descriptions::kMediaSessionEnterPictureInPictureDescription, @@ -10592,7 +10621,7 @@ const FeatureEntry kFeatureEntries[] = { kOsDesktop | kOsAndroid, FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"camera-mic-effects", flag_descriptions::kCameraMicEffectsName, flag_descriptions::kCameraMicEffectsDescription, static_cast(kOsMac | kOsWin | kOsLinux), @@ -10630,7 +10659,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kSiteInstanceGroupsForDataUrls)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"site-search-settings-policy", flag_descriptions::kSiteSearchSettingsPolicyName, flag_descriptions::kSiteSearchSettingsPolicyDescription, kOsAll, @@ -10759,7 +10788,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kHideIncognitoMediaMetadataDescription, kOsAll, FEATURE_VALUE_TYPE(media::kHideIncognitoMediaMetadata)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"third-party-profile-management", flag_descriptions::kThirdPartyProfileManagementName, flag_descriptions::kThirdPartyProfileManagementDescription, @@ -10801,7 +10830,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-user-navigation-capturing-pwa", flag_descriptions::kPwaNavigationCapturingName, flag_descriptions::kPwaNavigationCapturingDescription, @@ -11726,7 +11755,7 @@ const FeatureEntry kFeatureEntries[] = { kAuthenticateUsingUserConsentVerifierInteropApi)}, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"sync-enable-bookmarks-in-transport-mode", flag_descriptions::kSyncEnableBookmarksInTransportModeName, flag_descriptions::kSyncEnableBookmarksInTransportModeDescription, @@ -11816,7 +11845,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"classify-url-on-process-response-event", flag_descriptions::kClassifyUrlOnProcessResponseEventName, flag_descriptions::kClassifyUrlOnProcessResponseEventDescription, @@ -11825,7 +11854,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"tab-organization", flag_descriptions::kTabOrganizationName, flag_descriptions::kTabOrganizationDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kTabOrganization)}, @@ -11864,7 +11893,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kLanguageDetectionAPIDescription, kOsAll, FEATURE_VALUE_TYPE(blink::features::kLanguageDetectionAPI)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"supervised-profile-hide-guest", flag_descriptions::kSupervisedProfileHideGuestName, flag_descriptions::kSupervisedProfileHideGuestDescription,