Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2914)

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 11280236: A11y: Add the option to always show the a11y tray menu regardless of the state of a11y features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 6c555a6fa53750688036a9901547a151ba08aadb..60cc4935172739259e92106c49a5e4a917a03713 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -100,7 +100,7 @@ ChromeShellDelegate::~ChromeShellDelegate() {
instance_ = NULL;
}
-bool ChromeShellDelegate::IsUserLoggedIn() {
+bool ChromeShellDelegate::IsUserLoggedIn() const {
#if defined(OS_CHROMEOS)
// When running a Chrome OS build outside of a device (i.e. on a developer's
// workstation) and not running as login-manager, pretend like we're always
@@ -372,8 +372,16 @@ void ChromeShellDelegate::SetMagnifier(ash::MagnifierType type) {
bool ChromeShellDelegate::ShouldAlwaysShowAccessibilityMenu() const {
#if defined(OS_CHROMEOS)
- // TODO(yoshiki): Add the checkbox on chrome://settings. crbug.com/158287
- return false;
+ if (!IsUserLoggedIn())
+ return true;
+
+ Profile* profile = ProfileManager::GetDefaultProfile();
+ if (!profile)
+ return false;
+
+ PrefService* user_pref_service = profile->GetPrefs();
+ return user_pref_service &&
+ user_pref_service->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu);
#else
return false;
#endif

Powered by Google App Engine
This is Rietveld 408576698