feat: add nativeTheme.inForcedColorsMode (#32956)
This commit is contained in:
parent
4cc2ed842e
commit
755feb4d81
4 changed files with 18 additions and 1 deletions
|
@ -67,6 +67,10 @@ bool NativeTheme::ShouldUseHighContrastColors() {
|
|||
return ui_theme_->UserHasContrastPreference();
|
||||
}
|
||||
|
||||
bool NativeTheme::InForcedColorsMode() {
|
||||
return ui_theme_->InForcedColorsMode();
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
const CFStringRef WhiteOnBlack = CFSTR("whiteOnBlack");
|
||||
const CFStringRef UniversalAccessDomain = CFSTR("com.apple.universalaccess");
|
||||
|
@ -106,7 +110,8 @@ gin::ObjectTemplateBuilder NativeTheme::GetObjectTemplateBuilder(
|
|||
.SetProperty("shouldUseHighContrastColors",
|
||||
&NativeTheme::ShouldUseHighContrastColors)
|
||||
.SetProperty("shouldUseInvertedColorScheme",
|
||||
&NativeTheme::ShouldUseInvertedColorScheme);
|
||||
&NativeTheme::ShouldUseInvertedColorScheme)
|
||||
.SetProperty("inForcedColorsMode", &NativeTheme::InForcedColorsMode);
|
||||
}
|
||||
|
||||
const char* NativeTheme::GetTypeName() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue