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

Unified Diff: chrome/browser/chromeos/accessibility_util.cc

Issue 8334018: Move the code in libcros' chromeos_speech_synthesis.cc into Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed ScopedRunnableMethodFactory Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cros_library.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility_util.cc
diff --git a/chrome/browser/chromeos/accessibility_util.cc b/chrome/browser/chromeos/accessibility_util.cc
index b487e78e8bcab31a63219b443dc3289ddb3b80e6..dce20f9bc67c4df191e84e3cd589bf22dba7233d 100644
--- a/chrome/browser/chromeos/accessibility_util.cc
+++ b/chrome/browser/chromeos/accessibility_util.cc
@@ -7,8 +7,8 @@
#include "base/callback.h"
#include "base/logging.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chromeos/cros/cros_library.h"
-#include "chrome/browser/chromeos/cros/speech_synthesis_library.h"
+#include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
+#include "chrome/browser/chromeos/dbus/speech_synthesizer_client.h"
#include "chrome/browser/extensions/extension_accessibility_api.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/file_reader.h"
@@ -155,19 +155,17 @@ void ToggleAccessibility(WebUI* login_web_ui) {
};
void Speak(const char* speak_str, bool queue, bool interruptible) {
- if (chromeos::CrosLibrary::Get()->EnsureLoaded()) {
- if (queue || !interruptible) {
- std::string props = "";
- props.append("enqueue=");
- props.append(queue ? "1;" : "0;");
- props.append("interruptible=");
- props.append(interruptible ? "1;" : "0;");
- chromeos::CrosLibrary::Get()->GetSpeechSynthesisLibrary()->
- SetSpeakProperties(props.c_str());
- }
- chromeos::CrosLibrary::Get()->GetSpeechSynthesisLibrary()->
- Speak(speak_str);
+ if (queue || !interruptible) {
+ std::string props = "";
+ props.append("enqueue=");
+ props.append(queue ? "1;" : "0;");
+ props.append("interruptible=");
+ props.append(interruptible ? "1;" : "0;");
+ chromeos::DBusThreadManager::Get()->speech_synthesizer_client()->
+ SetSpeakProperties(props);
}
+ chromeos::DBusThreadManager::Get()->speech_synthesizer_client()->
+ Speak(speak_str);
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cros_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698