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

Side by Side Diff: chrome/browser/speech/tts_platform.h

Issue 15108002: Add Pause and Resume to Web TTS & Extension TTS APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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
« no previous file with comments | « chrome/browser/speech/tts_message_filter.cc ('k') | chrome/browser/speech/tts_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TTS_PLATFORM_H_ 5 #ifndef CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_
6 #define CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_ 6 #define CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/speech/tts_controller.h" 10 #include "chrome/browser/speech/tts_controller.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Stop speaking immediately and return true on success. 42 // Stop speaking immediately and return true on success.
43 virtual bool StopSpeaking() = 0; 43 virtual bool StopSpeaking() = 0;
44 44
45 // Returns whether any speech is on going. 45 // Returns whether any speech is on going.
46 virtual bool IsSpeaking() = 0; 46 virtual bool IsSpeaking() = 0;
47 47
48 // Append information about voices provided by this platform implementation 48 // Append information about voices provided by this platform implementation
49 // to |out_voices|. 49 // to |out_voices|.
50 virtual void GetVoices(std::vector<VoiceData>* out_voices) = 0; 50 virtual void GetVoices(std::vector<VoiceData>* out_voices) = 0;
51 51
52 // Pause the current utterance, if any, until a call to Resume,
53 // Speak, or StopSpeaking.
54 virtual void Pause() = 0;
55
56 // Resume speaking the current utterance, if it was paused.
57 virtual void Resume() = 0;
58
52 virtual std::string error(); 59 virtual std::string error();
53 virtual void clear_error(); 60 virtual void clear_error();
54 virtual void set_error(const std::string& error); 61 virtual void set_error(const std::string& error);
55 62
56 protected: 63 protected:
57 TtsPlatformImpl() {} 64 TtsPlatformImpl() {}
58 65
59 // On some platforms this may be a leaky singleton - do not rely on the 66 // On some platforms this may be a leaky singleton - do not rely on the
60 // destructor being called! http://crbug.com/122026 67 // destructor being called! http://crbug.com/122026
61 virtual ~TtsPlatformImpl() {} 68 virtual ~TtsPlatformImpl() {}
62 69
63 std::string error_; 70 std::string error_;
64 71
65 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImpl); 72 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImpl);
66 }; 73 };
67 74
68 #endif // CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_ 75 #endif // CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_
OLDNEW
« no previous file with comments | « chrome/browser/speech/tts_message_filter.cc ('k') | chrome/browser/speech/tts_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698