--- chrome/browser/about_flags.cc.orig 2024-11-14 07:57:23 UTC +++ chrome/browser/about_flags.cc @@ -246,7 +246,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 @@ -341,7 +341,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) @@ -350,7 +350,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) @@ -360,7 +360,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 @@ -506,7 +506,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, @@ -783,6 +783,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[] = { @@ -1224,7 +1244,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"}, }; @@ -1268,7 +1288,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"}, @@ -1886,7 +1906,7 @@ const FeatureEntry::FeatureVariation kTabScrollingVari #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kTabstripDeclutterQuickModeParams[] = { {"stale_threshold_duration", "10s"}, {"declutter_timer_interval", "10s"}, @@ -3635,7 +3655,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[] = @@ -4159,7 +4179,7 @@ const FeatureEntry::FeatureVariation std::size(kSecurePaymentConfirmationNetworkAndIssuerIcons_Rows), nullptr}}; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kTranslationAPI_SkipLanguagePackLimit[] = { {"TranslationAPIAcceptLanguagesCheck", "false"}, {"TranslationAPILimitLanguagePackCount", "false"}}; @@ -4905,7 +4925,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, @@ -5314,7 +5334,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kDesktopPWAsSyncChangesDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kWebAppDontAddExistingAppsToSync)}, #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, @@ -5469,7 +5489,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, @@ -5500,9 +5520,18 @@ const FeatureEntry kFeatureEntries[] = { {"wayland-ui-scaling", flag_descriptions::kWaylandUiScalingName, flag_descriptions::kWaylandUiScalingDescription, kOsLinux, FEATURE_VALUE_TYPE(features::kWaylandUiScale)}, +#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, @@ -6414,7 +6443,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, @@ -6620,7 +6649,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, @@ -7235,7 +7264,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, @@ -8239,7 +8268,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, @@ -8255,7 +8284,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(media::kUseOutOfProcessVideoDecoding)}, #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#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, @@ -9069,7 +9098,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperGooglePhotosSharedAlbums)}, #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, @@ -9102,7 +9131,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, @@ -9603,7 +9632,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, @@ -10390,7 +10419,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), @@ -10421,7 +10450,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, @@ -10546,7 +10575,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, @@ -10588,7 +10617,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, @@ -11476,7 +11505,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, @@ -11575,7 +11604,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, @@ -11584,7 +11613,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)}, @@ -11629,7 +11658,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, @@ -11882,7 +11911,7 @@ const FeatureEntry kFeatureEntries[] = { segmentation_platform::features::kSegmentationSurveyPage)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"autofill-enable-buy-now-pay-later-for-affirm", flag_descriptions::kAutofillEnableBuyNowPayLaterForAffirmName, flag_descriptions::kAutofillEnableBuyNowPayLaterForAffirmDescription, @@ -12017,7 +12046,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE( autofill::features::kAutofillEnableCardInfoRuntimeRetrieval)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"translation-api", flag_descriptions::kTranslationAPIName, flag_descriptions::kTranslationAPIDescription, kOsMac | kOsWin | kOsLinux, FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kEnableTranslationAPI,