Add an --enable-container-culling commandline flag.
[chromium-blink-merge.git] / chrome / browser / chromeos / accessibility / accessibility_util.cc
blob04379c3be29a3ea3405e6e2991209acb6625967b
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/ui/singleton_tabs.h"
10 #include "chrome/common/pref_names.h"
11 #include "chrome/common/url_constants.h"
12 #include "url/gurl.h"
14 // TODO(yoshiki): move the following method to accessibility_manager.cc and
15 // remove this file.
17 namespace chromeos {
18 namespace accessibility {
20 void EnableVirtualKeyboard(bool enabled) {
21 PrefService* pref_service = g_browser_process->local_state();
22 pref_service->SetBoolean(prefs::kVirtualKeyboardEnabled, enabled);
23 pref_service->CommitPendingWrite();
26 bool IsVirtualKeyboardEnabled() {
27 if (!g_browser_process) {
28 return false;
30 PrefService* prefs = g_browser_process->local_state();
31 bool virtual_keyboard_enabled = prefs &&
32 prefs->GetBoolean(prefs::kVirtualKeyboardEnabled);
33 return virtual_keyboard_enabled;
36 void ShowAccessibilityHelp(Browser* browser) {
37 chrome::ShowSingletonTab(browser, GURL(chrome::kChromeAccessibilityHelpURL));
40 } // namespace accessibility
41 } // namespace chromeos