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

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

Issue 1014143003: Change set_continuous_parameters() for removing duplicated behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | chrome/browser/speech/tts_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/speech/extension_api/tts_extension_api.cc
diff --git a/chrome/browser/speech/extension_api/tts_extension_api.cc b/chrome/browser/speech/extension_api/tts_extension_api.cc
index e7b65e175c62026c0ab86247117388c380fb16f0..adf8e7ce4183803d4cf76385a7d66f63a9dd4741 100644
--- a/chrome/browser/speech/extension_api/tts_extension_api.cc
+++ b/chrome/browser/speech/extension_api/tts_extension_api.cc
@@ -269,11 +269,6 @@ bool TtsSpeakFunction::RunAsync() {
// the behavior more predictable and easier to write unit tests for too.
SendResponse(true);
- UtteranceContinuousParameters continuous_params;
- continuous_params.rate = rate;
- continuous_params.pitch = pitch;
- continuous_params.volume = volume;
-
Utterance* utterance = new Utterance(GetProfile());
utterance->set_text(text);
utterance->set_voice_name(voice_name);
@@ -281,7 +276,7 @@ bool TtsSpeakFunction::RunAsync() {
utterance->set_src_url(source_url());
utterance->set_lang(lang);
utterance->set_gender(gender);
- utterance->set_continuous_parameters(continuous_params);
+ utterance->set_continuous_parameters(rate, pitch, volume);
utterance->set_can_enqueue(can_enqueue);
utterance->set_required_event_types(required_event_types);
utterance->set_desired_event_types(desired_event_types);
« no previous file with comments | « no previous file | chrome/browser/speech/tts_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698