Add accessibility setter to the app
This commit is contained in:
parent
9605e6cb40
commit
6717f0d2bb
4 changed files with 38 additions and 6 deletions
|
@ -869,6 +869,18 @@ bool App::IsAccessibilitySupportEnabled() {
|
|||
return ax_state->IsAccessibleBrowser();
|
||||
}
|
||||
|
||||
void App::SetAccessibilitySupportEnabled(bool value) {
|
||||
auto ax_state = content::BrowserAccessibilityState::GetInstance();
|
||||
|
||||
if (value) {
|
||||
ax_state->OnScreenReaderDetected();
|
||||
} else {
|
||||
ax_state->DisableAccessibility();
|
||||
}
|
||||
|
||||
Browser::Get()->OnAccessibilitySupportChanged();
|
||||
}
|
||||
|
||||
Browser::LoginItemSettings App::GetLoginItemSettings(mate::Arguments* args) {
|
||||
Browser::LoginItemSettings options;
|
||||
args->GetNext(&options);
|
||||
|
@ -1141,6 +1153,8 @@ void App::BuildPrototype(
|
|||
.SetMethod("relaunch", &App::Relaunch)
|
||||
.SetMethod("isAccessibilitySupportEnabled",
|
||||
&App::IsAccessibilitySupportEnabled)
|
||||
.SetMethod("setAccessibilitySupportEnabled",
|
||||
&App::SetAccessibilitySupportEnabled)
|
||||
.SetMethod("disableHardwareAcceleration",
|
||||
&App::DisableHardwareAcceleration)
|
||||
.SetMethod("disableDomainBlockingFor3DAPIs",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue