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

Side by Side Diff: chrome/browser/chromeos/login/wizard_accessibility_helper.cc

Issue 7609001: Enable ChromeVox on the OOBE screens when using the keyboard shortcut. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" 5 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/accessibility_util.h"
10 #include "chrome/browser/extensions/extension_accessibility_api.h" 11 #include "chrome/browser/extensions/extension_accessibility_api.h"
11 #include "chrome/browser/prefs/pref_service.h" 12 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
15 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
16 #include "content/common/notification_registrar.h" 17 #include "content/common/notification_registrar.h"
17 #include "content/common/notification_service.h" 18 #include "content/common/notification_service.h"
18 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
19 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 SetAccessibilityEnabled(true); 104 SetAccessibilityEnabled(true);
104 } else { 105 } else {
105 SetAccessibilityEnabled(false); 106 SetAccessibilityEnabled(false);
106 if (registered_notifications_) 107 if (registered_notifications_)
107 UnregisterNotifications(); 108 UnregisterNotifications();
108 } 109 }
109 } 110 }
110 111
111 void WizardAccessibilityHelper::SetAccessibilityEnabled(bool enabled) { 112 void WizardAccessibilityHelper::SetAccessibilityEnabled(bool enabled) {
112 bool doSpeak = (IsAccessibilityEnabled() != enabled); 113 bool doSpeak = (IsAccessibilityEnabled() != enabled);
113 if (g_browser_process) { 114 accessibility::EnableAccessibility(enabled, NULL);
114 PrefService* prefService = g_browser_process->local_state();
115 prefService->SetBoolean(prefs::kAccessibilityEnabled, enabled);
116 prefService->ScheduleSavePersistentPrefs();
dmazzoni 2011/08/10 05:12:02 Hey, I noticed that accessibility_util.cc doesn't
117 }
118 ExtensionAccessibilityEventRouter::GetInstance()->
119 SetAccessibilityEnabled(enabled);
120 if (doSpeak) { 115 if (doSpeak) {
121 accessibility_handler_->Speak(enabled ? 116 accessibility_handler_->Speak(enabled ?
122 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_ACCESS_ENABLED).c_str() : 117 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_ACCESS_ENABLED).c_str() :
123 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_ACCESS_DISABLED).c_str(), 118 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_ACCESS_DISABLED).c_str(),
124 false, true); 119 false, true);
125 } 120 }
126 } 121 }
127 122
128 } // namespace chromeos 123 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698