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

Unified Diff: chrome/browser/speech/extension_api/tts_engine_extension_api.cc

Issue 188633003: Revert of Eliminate the dependence of tts extension API for tts_controller.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
Index: chrome/browser/speech/extension_api/tts_engine_extension_api.cc
diff --git a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
index 0588d9f1b80fbf888df834a66cd84b1c91db8428..f80b6bda65c3d8d23b0922add5b61e271f87c825 100644
--- a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
+++ b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
@@ -60,12 +60,7 @@
};
} // anonymous namespace
-TtsExtensionEngine* TtsExtensionEngine::GetInstance() {
- return Singleton<TtsExtensionEngine>::get();
-}
-
-void TtsExtensionEngine::GetVoices(Profile* profile,
- std::vector<VoiceData>* out_voices) {
+void GetExtensionVoices(Profile* profile, std::vector<VoiceData>* out_voices) {
ExtensionService* service = profile->GetExtensionService();
DCHECK(service);
EventRouter* event_router =
@@ -132,8 +127,7 @@
}
}
-void TtsExtensionEngine::Speak(Utterance* utterance,
- const VoiceData& voice) {
+void ExtensionTtsEngineSpeak(Utterance* utterance, const VoiceData& voice) {
// See if the engine supports the "end" event; if so, we can keep the
// utterance around and track it. If not, we're finished with this
// utterance now.
@@ -177,7 +171,7 @@
DispatchEventToExtension(utterance->extension_id(), event.Pass());
}
-void TtsExtensionEngine::Stop(Utterance* utterance) {
+void ExtensionTtsEngineStop(Utterance* utterance) {
scoped_ptr<base::ListValue> args(new base::ListValue());
scoped_ptr<extensions::Event> event(new extensions::Event(
tts_engine_events::kOnStop, args.Pass()));
@@ -186,7 +180,7 @@
DispatchEventToExtension(utterance->extension_id(), event.Pass());
}
-void TtsExtensionEngine::Pause(Utterance* utterance) {
+void ExtensionTtsEnginePause(Utterance* utterance) {
scoped_ptr<base::ListValue> args(new base::ListValue());
scoped_ptr<extensions::Event> event(new extensions::Event(
tts_engine_events::kOnPause, args.Pass()));
@@ -198,7 +192,7 @@
WarnIfMissingPauseOrResumeListener(profile, event_router, id);
}
-void TtsExtensionEngine::Resume(Utterance* utterance) {
+void ExtensionTtsEngineResume(Utterance* utterance) {
scoped_ptr<base::ListValue> args(new base::ListValue());
scoped_ptr<extensions::Event> event(new extensions::Event(
tts_engine_events::kOnResume, args.Pass()));
« no previous file with comments | « chrome/browser/speech/extension_api/tts_engine_extension_api.h ('k') | chrome/browser/speech/tts_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698