| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/extensions/extension_accessibility_api.h" | 10 #include "chrome/browser/extensions/extension_accessibility_api.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void WizardAccessibilityHelper::MaybeSpeak(const char* str, bool queue, | 80 void WizardAccessibilityHelper::MaybeSpeak(const char* str, bool queue, |
| 81 bool interruptible) { | 81 bool interruptible) { |
| 82 if (g_browser_process && | 82 if (g_browser_process && |
| 83 g_browser_process->local_state()->GetBoolean( | 83 g_browser_process->local_state()->GetBoolean( |
| 84 prefs::kAccessibilityEnabled)) { | 84 prefs::kAccessibilityEnabled)) { |
| 85 accessibility_handler_->Speak(str, queue, interruptible); | 85 accessibility_handler_->Speak(str, queue, interruptible); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 void WizardAccessibilityHelper::EnableAccessibility(views::View* view_tree) { | 89 void WizardAccessibilityHelper::EnableAccessibility(views::View* view_tree) { |
| 90 LOG(INFO) << "Enabling accessibility."; | 90 VLOG(1) << "Enabling accessibility."; |
| 91 if (!registered_notifications_) | 91 if (!registered_notifications_) |
| 92 RegisterNotifications(); | 92 RegisterNotifications(); |
| 93 if (g_browser_process) { | 93 if (g_browser_process) { |
| 94 PrefService* prefService = g_browser_process->local_state(); | 94 PrefService* prefService = g_browser_process->local_state(); |
| 95 if (!prefService->GetBoolean(prefs::kAccessibilityEnabled)) { | 95 if (!prefService->GetBoolean(prefs::kAccessibilityEnabled)) { |
| 96 prefService->SetBoolean(prefs::kAccessibilityEnabled, true); | 96 prefService->SetBoolean(prefs::kAccessibilityEnabled, true); |
| 97 prefService->ScheduleSavePersistentPrefs(); | 97 prefService->ScheduleSavePersistentPrefs(); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 ExtensionAccessibilityEventRouter::GetInstance()-> | 100 ExtensionAccessibilityEventRouter::GetInstance()-> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 125 if ((*iter).first == view_tree) { | 125 if ((*iter).first == view_tree) { |
| 126 view_exists = true; | 126 view_exists = true; |
| 127 break; | 127 break; |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 if (!view_exists) | 130 if (!view_exists) |
| 131 views_buffer_[view_tree] = false; | 131 views_buffer_[view_tree] = false; |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace chromeos | 134 } // namespace chromeos |
| OLD | NEW |