| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/accessibility/accessibility_manager.h" | 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 6 | 6 |
| 7 #include "ash/audio/sounds.h" | 7 #include "ash/audio/sounds.h" |
| 8 #include "ash/autoclick/autoclick_controller.h" | 8 #include "ash/autoclick/autoclick_controller.h" |
| 9 #include "ash/high_contrast/high_contrast_controller.h" | 9 #include "ash/high_contrast/high_contrast_controller.h" |
| 10 #include "ash/metrics/user_metrics_recorder.h" | 10 #include "ash/metrics/user_metrics_recorder.h" |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 | 820 |
| 821 void AccessibilityManager::ReceiveBrailleDisplayState( | 821 void AccessibilityManager::ReceiveBrailleDisplayState( |
| 822 scoped_ptr<extensions::api::braille_display_private::DisplayState> state) { | 822 scoped_ptr<extensions::api::braille_display_private::DisplayState> state) { |
| 823 OnBrailleDisplayStateChanged(*state); | 823 OnBrailleDisplayStateChanged(*state); |
| 824 } | 824 } |
| 825 | 825 |
| 826 void AccessibilityManager::UpdateBrailleImeState() { | 826 void AccessibilityManager::UpdateBrailleImeState() { |
| 827 if (!profile_) | 827 if (!profile_) |
| 828 return; | 828 return; |
| 829 PrefService* pref_service = profile_->GetPrefs(); | 829 PrefService* pref_service = profile_->GetPrefs(); |
| 830 std::vector<std::string> preload_engines; | 830 std::vector<std::string> preload_engines = |
| 831 base::SplitString(pref_service->GetString(prefs::kLanguagePreloadEngines), | 831 base::SplitString(pref_service->GetString(prefs::kLanguagePreloadEngines), |
| 832 ',', | 832 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 833 &preload_engines); | |
| 834 std::vector<std::string>::iterator it = | 833 std::vector<std::string>::iterator it = |
| 835 std::find(preload_engines.begin(), | 834 std::find(preload_engines.begin(), |
| 836 preload_engines.end(), | 835 preload_engines.end(), |
| 837 extension_misc::kBrailleImeEngineId); | 836 extension_misc::kBrailleImeEngineId); |
| 838 bool is_enabled = (it != preload_engines.end()); | 837 bool is_enabled = (it != preload_engines.end()); |
| 839 bool should_be_enabled = | 838 bool should_be_enabled = |
| 840 (spoken_feedback_enabled_ && braille_display_connected_); | 839 (spoken_feedback_enabled_ && braille_display_connected_); |
| 841 if (is_enabled == should_be_enabled) | 840 if (is_enabled == should_be_enabled) |
| 842 return; | 841 return; |
| 843 if (should_be_enabled) | 842 if (should_be_enabled) |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { | 1122 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { |
| 1124 // Do any teardown work needed immediately after ChromeVox actually unloads. | 1123 // Do any teardown work needed immediately after ChromeVox actually unloads. |
| 1125 if (system_sounds_enabled_) | 1124 if (system_sounds_enabled_) |
| 1126 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); | 1125 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); |
| 1127 // Clear the accessibility focus ring. | 1126 // Clear the accessibility focus ring. |
| 1128 AccessibilityFocusRingController::GetInstance()->SetFocusRing( | 1127 AccessibilityFocusRingController::GetInstance()->SetFocusRing( |
| 1129 std::vector<gfx::Rect>()); | 1128 std::vector<gfx::Rect>()); |
| 1130 } | 1129 } |
| 1131 | 1130 |
| 1132 } // namespace chromeos | 1131 } // namespace chromeos |
| OLD | NEW |