| OLD | NEW |
| 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/accessibility_util.h" | 5 #include "chrome/browser/chromeos/accessibility_util.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 10 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 props.append(queue ? "1;" : "0;"); | 161 props.append(queue ? "1;" : "0;"); |
| 162 props.append("interruptible="); | 162 props.append("interruptible="); |
| 163 props.append(interruptible ? "1;" : "0;"); | 163 props.append(interruptible ? "1;" : "0;"); |
| 164 chromeos::DBusThreadManager::Get()->speech_synthesizer_client()-> | 164 chromeos::DBusThreadManager::Get()->speech_synthesizer_client()-> |
| 165 SetSpeakProperties(props); | 165 SetSpeakProperties(props); |
| 166 } | 166 } |
| 167 chromeos::DBusThreadManager::Get()->speech_synthesizer_client()-> | 167 chromeos::DBusThreadManager::Get()->speech_synthesizer_client()-> |
| 168 Speak(speak_str); | 168 Speak(speak_str); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void MaybeSpeak(const char* speak_str, bool queue, bool interruptible) { | |
| 172 bool accessibility_enabled = g_browser_process && | |
| 173 g_browser_process->local_state()->GetBoolean( | |
| 174 prefs::kAccessibilityEnabled); | |
| 175 if (accessibility_enabled) { | |
| 176 Speak(speak_str, queue, interruptible); | |
| 177 } | |
| 178 } | |
| 179 | 171 |
| 180 } // namespace accessibility | 172 } // namespace accessibility |
| 181 } // namespace chromeos | 173 } // namespace chromeos |
| OLD | NEW |