diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-07 05:25:00 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-07 05:25:00 +0000 |
commit | c63f2b7fe4fe2977f858a8e36d5f48db17eff2e7 (patch) | |
tree | 3d04e487b74ab61f09d2454850104d8e3b125996 /chrome/browser/extensions/extension_tts_api_linux.cc | |
parent | 3768ee10e91e95f4ff90bbe8177ffa407725d955 (diff) | |
download | chromium_src-c63f2b7fe4fe2977f858a8e36d5f48db17eff2e7.zip chromium_src-c63f2b7fe4fe2977f858a8e36d5f48db17eff2e7.tar.gz chromium_src-c63f2b7fe4fe2977f858a8e36d5f48db17eff2e7.tar.bz2 |
Extend TTS extension API to support richer events returned from the engine
to the client. Previously we just had a completed event; this adds start,
word boundary, sentence boundary, and marker boundary. In addition,
interrupted and canceled, which were previously errors, now become events.
Mac and Windows implementations extended to support as many of these events
as possible.
BUG=67713
BUG=70198
BUG=75106
BUG=83404
TEST=Updates all TTS API tests to be event-based, and adds new tests.
Review URL: http://codereview.chromium.org/6792014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91665 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tts_api_linux.cc')
-rw-r--r-- | chrome/browser/extensions/extension_tts_api_linux.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/browser/extensions/extension_tts_api_linux.cc b/chrome/browser/extensions/extension_tts_api_linux.cc index d008526..07e6c61 100644 --- a/chrome/browser/extensions/extension_tts_api_linux.cc +++ b/chrome/browser/extensions/extension_tts_api_linux.cc @@ -2,11 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extension_tts_api.h" - #include "base/memory/singleton.h" - -namespace util = extension_tts_api_util; +#include "chrome/browser/extensions/extension_tts_api_platform.h" namespace { const char kNotSupportedError[] = @@ -15,13 +12,15 @@ const char kNotSupportedError[] = class ExtensionTtsPlatformImplLinux : public ExtensionTtsPlatformImpl { public: + virtual bool PlatformImplAvailable() { + return false; + } + virtual bool Speak( + int utterance_id, const std::string& utterance, - const std::string& language, - const std::string& gender, - double rate, - double pitch, - double volume) { + const std::string& lang, + const UtteranceContinuousParameters& params) { error_ = kNotSupportedError; return false; } @@ -36,6 +35,10 @@ class ExtensionTtsPlatformImplLinux : public ExtensionTtsPlatformImpl { return false; } + virtual bool SendsEvent(TtsEventType event_type) { + return false; + } + // Get the single instance of this class. static ExtensionTtsPlatformImplLinux* GetInstance() { return Singleton<ExtensionTtsPlatformImplLinux>::get(); |