This source file includes following definitions.
- EnableVirtualKeyboard
- IsVirtualKeyboardEnabled
- ShowAccessibilityHelp
#include "chrome/browser/chromeos/accessibility/accessibility_util.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "url/gurl.h"
namespace chromeos {
namespace accessibility {
void EnableVirtualKeyboard(bool enabled) {
PrefService* pref_service = g_browser_process->local_state();
pref_service->SetBoolean(prefs::kVirtualKeyboardEnabled, enabled);
pref_service->CommitPendingWrite();
}
bool IsVirtualKeyboardEnabled() {
if (!g_browser_process) {
return false;
}
PrefService* prefs = g_browser_process->local_state();
bool virtual_keyboard_enabled = prefs &&
prefs->GetBoolean(prefs::kVirtualKeyboardEnabled);
return virtual_keyboard_enabled;
}
void ShowAccessibilityHelp(Browser* browser) {
chrome::ShowSingletonTab(browser, GURL(chrome::kChromeAccessibilityHelpURL));
}
}
}