feat: add app.runningUnderRosettaTranslation to detect running under rosetta (#26444)

* feat: add app.isRunningUnderRosettaTranslation to detect running under rosetta

* chore: fixup

* chore: make const

* chore: add missing import
This commit is contained in:
Samuel Attard 2020-11-13 12:53:32 -08:00 committed by GitHub
parent d6431a0ff2
commit d6019634f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

View file

@ -1666,6 +1666,8 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuilder(v8::Isolate* isolate) {
#endif
#if defined(OS_MAC)
.SetProperty("dock", &App::GetDockAPI)
.SetProperty("runningUnderRosettaTranslation",
&App::IsRunningUnderRosettaTranslation)
#endif
.SetProperty("userAgentFallback", &App::GetUserAgentFallback,
&App::SetUserAgentFallback)