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

Side by Side Diff: chrome/browser/speech/extension_api/tts_extension_api_platform.h

Issue 9967021: Uses a system-wide notion of isSpeaking in the Mac extension TTS api. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update tts.json and run build/build.py Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_ 5 #ifndef CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_
6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_ 6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/speech/extension_api/tts_extension_api_controller.h" 10 #include "chrome/browser/speech/extension_api/tts_extension_api_controller.h"
(...skipping 16 matching lines...) Expand all
27 // before speaking again. 27 // before speaking again.
28 virtual bool Speak( 28 virtual bool Speak(
29 int utterance_id, 29 int utterance_id,
30 const std::string& utterance, 30 const std::string& utterance,
31 const std::string& lang, 31 const std::string& lang,
32 const UtteranceContinuousParameters& params) = 0; 32 const UtteranceContinuousParameters& params) = 0;
33 33
34 // Stop speaking immediately and return true on success. 34 // Stop speaking immediately and return true on success.
35 virtual bool StopSpeaking() = 0; 35 virtual bool StopSpeaking() = 0;
36 36
37 // Returns whether any speech is on going.
38 virtual bool IsSpeaking() = 0;
39
37 // Return true if this platform implementation will fire the given event. 40 // Return true if this platform implementation will fire the given event.
38 // All platform implementations must fire the TTS_EVENT_END event at a 41 // All platform implementations must fire the TTS_EVENT_END event at a
39 // minimum. 42 // minimum.
40 virtual bool SendsEvent(TtsEventType event_type) = 0; 43 virtual bool SendsEvent(TtsEventType event_type) = 0;
41 44
42 // Return the gender of the voice, should be either "male" or "female" 45 // Return the gender of the voice, should be either "male" or "female"
43 // if known, otherwise the empty string. 46 // if known, otherwise the empty string.
44 virtual std::string gender(); 47 virtual std::string gender();
45 48
46 virtual std::string error(); 49 virtual std::string error();
47 virtual void clear_error(); 50 virtual void clear_error();
48 virtual void set_error(const std::string& error); 51 virtual void set_error(const std::string& error);
49 52
50 protected: 53 protected:
51 ExtensionTtsPlatformImpl() {} 54 ExtensionTtsPlatformImpl() {}
52 virtual ~ExtensionTtsPlatformImpl() {} 55 virtual ~ExtensionTtsPlatformImpl() {}
53 56
54 std::string error_; 57 std::string error_;
55 58
56 DISALLOW_COPY_AND_ASSIGN(ExtensionTtsPlatformImpl); 59 DISALLOW_COPY_AND_ASSIGN(ExtensionTtsPlatformImpl);
57 }; 60 };
58 61
59 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_ 62 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_PLATFORM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698