fix: nativeTheme.themeSource = 'dark' on windows (#26237)

Manually backports #25373.
This commit is contained in:
Charles Kerr
2020-10-29 09:03:15 -05:00
committed by GitHub
parent 682b382aa3
commit ffd1e9bad2
8 changed files with 241 additions and 0 deletions

View File

@@ -57,6 +57,10 @@ bool IsPictureInPictureEnabled() {
return BUILDFLAG(ENABLE_PICTURE_IN_PICTURE);
}
bool IsWinDarkModeWindowUiEnabled() {
return BUILDFLAG(ENABLE_WIN_DARK_MODE_WINDOW_UI);
}
bool IsComponentBuild() {
#if defined(COMPONENT_BUILD)
return true;
@@ -84,6 +88,7 @@ void Initialize(v8::Local<v8::Object> exports,
dict.SetMethod("isPictureInPictureEnabled", &IsPictureInPictureEnabled);
dict.SetMethod("isComponentBuild", &IsComponentBuild);
dict.SetMethod("isExtensionsEnabled", &IsExtensionsEnabled);
dict.SetMethod("isWinDarkModeWindowUiEnabled", &IsWinDarkModeWindowUiEnabled);
}
} // namespace