fix: use ScreenCaptureKit exclusively on macOS 14.4 and higher (#41397)
This fixes a nasty warning / permission dialog that pops up to end-users when consuming legacy APIs. Chrome has flipped these flags via field trials as have other Electron apps. It should just be the default.
This commit is contained in:
parent
e72f4f7f26
commit
ddd93529d5
4 changed files with 43 additions and 0 deletions
|
@ -49,6 +49,11 @@ void InitializeFeatureList() {
|
|||
// 'custom dictionary word list API' spec to crash.
|
||||
std::string(",") + spellcheck::kWinDelaySpellcheckServiceInit.name;
|
||||
#endif
|
||||
std::string platform_specific_enable_features =
|
||||
EnablePlatformSpecificFeatures();
|
||||
if (platform_specific_enable_features.size() > 0) {
|
||||
enable_features += std::string(",") + platform_specific_enable_features;
|
||||
}
|
||||
base::FeatureList::InitInstance(enable_features, disable_features);
|
||||
}
|
||||
|
||||
|
@ -60,4 +65,10 @@ void InitializeFieldTrials() {
|
|||
base::FieldTrialList::CreateTrialsFromString(force_fieldtrials);
|
||||
}
|
||||
|
||||
#if !BUILDFLAG(IS_MAC)
|
||||
std::string EnablePlatformSpecificFeatures() {
|
||||
return "";
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue