summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-01 16:44:57 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-01 16:44:57 +0000
commit78127e620e70c4bdf030ebd8e54598c9182b0e4e (patch)
treeac0ccc1631ea68e135b246c8d8995d7d24951eab /chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
parent29ccd8e9c7a8f16e2174fdcf9f0bafe10a74db98 (diff)
downloadchromium_src-78127e620e70c4bdf030ebd8e54598c9182b0e4e.zip
chromium_src-78127e620e70c4bdf030ebd8e54598c9182b0e4e.tar.gz
chromium_src-78127e620e70c4bdf030ebd8e54598c9182b0e4e.tar.bz2
Implement Google network speech synthesis.
See bug for context. Implements a component extension that provides speech synthesis using Google's speech synthesis API. Adds a "remote" flag to the TTS and TTS Engine APIs so that it's possible for clients to distinguish between local and remote speech engines. Adds a new private extension API to expose Google's API key, needed to make the request. BUG=308250 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232242 Review URL: https://codereview.chromium.org/27034009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc')
-rw-r--r--chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
index bed4937..e18c594 100644
--- a/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
+++ b/chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc
@@ -29,7 +29,8 @@ struct TtsVoices : public Extension::ManifestData {
} // namespace
-TtsVoice::TtsVoice() {}
+TtsVoice::TtsVoice() : remote(false) {}
+
TtsVoice::~TtsVoice() {}
// static
@@ -95,6 +96,13 @@ bool TtsEngineManifestHandler::Parse(Extension* extension, string16* error) {
return false;
}
}
+ if (one_tts_voice->HasKey(keys::kTtsVoicesRemote)) {
+ if (!one_tts_voice->GetBoolean(
+ keys::kTtsVoicesRemote, &voice_data.remote)) {
+ *error = ASCIIToUTF16(errors::kInvalidTtsVoicesRemote);
+ return false;
+ }
+ }
if (one_tts_voice->HasKey(keys::kTtsVoicesEventTypes)) {
const base::ListValue* event_types_list;
if (!one_tts_voice->GetList(