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

Side by Side Diff: chrome/browser/speech/tts_android.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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_ANDROID_H_ 5 #ifndef CHROME_BROWSER_SPEECH_TTS_ANDROID_H_
6 #define CHROME_BROWSER_SPEECH_TTS_ANDROID_H_ 6 #define CHROME_BROWSER_SPEECH_TTS_ANDROID_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "chrome/browser/speech/tts_platform.h" 10 #include "chrome/browser/speech/tts_platform.h"
11 11
12 class TtsPlatformImplAndroid : public TtsPlatformImpl { 12 class TtsPlatformImplAndroid : public TtsPlatformImpl {
13 public: 13 public:
14 // TtsPlatformImpl implementation. 14 // TtsPlatformImpl implementation.
15 virtual bool PlatformImplAvailable() OVERRIDE; 15 virtual bool PlatformImplAvailable() OVERRIDE;
16 virtual bool Speak( 16 virtual bool Speak(
17 int utterance_id, 17 int utterance_id,
18 const std::string& utterance, 18 const std::string& utterance,
19 const std::string& lang, 19 const std::string& lang,
20 const VoiceData& voice, 20 const VoiceData& voice,
21 const UtteranceContinuousParameters& params) OVERRIDE; 21 const UtteranceContinuousParameters& params) OVERRIDE;
22 virtual bool StopSpeaking() OVERRIDE; 22 virtual bool StopSpeaking() OVERRIDE;
23 virtual void Pause() OVERRIDE;
24 virtual void Resume() OVERRIDE;
23 virtual bool IsSpeaking() OVERRIDE; 25 virtual bool IsSpeaking() OVERRIDE;
24 virtual void GetVoices(std::vector<VoiceData>* out_voices) OVERRIDE; 26 virtual void GetVoices(std::vector<VoiceData>* out_voices) OVERRIDE;
25 27
26 // Methods called from Java via JNI. 28 // Methods called from Java via JNI.
27 void VoicesChanged(JNIEnv* env, jobject obj); 29 void VoicesChanged(JNIEnv* env, jobject obj);
28 void OnEndEvent(JNIEnv* env, jobject obj, jint utterance_id); 30 void OnEndEvent(JNIEnv* env, jobject obj, jint utterance_id);
29 void OnErrorEvent(JNIEnv* env, jobject obj, jint utterance_id); 31 void OnErrorEvent(JNIEnv* env, jobject obj, jint utterance_id);
30 void OnStartEvent(JNIEnv* env, jobject obj, jint utterance_id); 32 void OnStartEvent(JNIEnv* env, jobject obj, jint utterance_id);
31 33
32 // Static functions. 34 // Static functions.
(...skipping 10 matching lines...) Expand all
43 int utterance_id, TtsEventType event_type, int char_index); 45 int utterance_id, TtsEventType event_type, int char_index);
44 46
45 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 47 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
46 int utterance_id_; 48 int utterance_id_;
47 std::string utterance_; 49 std::string utterance_;
48 50
49 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplAndroid); 51 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImplAndroid);
50 }; 52 };
51 53
52 #endif // CHROME_BROWSER_SPEECH_TTS_ANDROID_H_ 54 #endif // CHROME_BROWSER_SPEECH_TTS_ANDROID_H_
OLDNEW
« no previous file with comments | « chrome/browser/speech/extension_api/tts_extension_apitest.cc ('k') | chrome/browser/speech/tts_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698