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

Side by Side Diff: chrome/browser/chromeos/dbus/speech_synthesizer_client.h

Issue 8334018: Move the code in libcros' chromeos_speech_synthesis.cc into Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments and copyright, cleaned up includes Created 9 years, 2 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_
6 #define CHROME_BROWSER_CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/callback.h"
12
13 namespace dbus {
14 class Bus;
15 }
16
17 namespace chromeos {
18
19 // SpeechSynthesizerClient is used to communicate with the speech synthesizer.
20 // All method should be called from the origin thread (UI thread) which
21 // initializes the DBusThreadManager instance.
22 class SpeechSynthesizerClient {
23 public:
24 typedef base::Callback<void(bool)> IsSpeakingCallback;
satorux1 2011/10/18 20:49:25 Would be nice to document about the boolean parame
hashimoto 2011/10/19 00:08:47 Done.
25
26 virtual ~SpeechSynthesizerClient() {}
27
28 // Speaks the specified text.
29 virtual void Speak(const std::string& text) = 0;
30
31 // Sets options for the subsequent speech synthesis requests.
32 // Use the constants below.
33 virtual void SetSpeakProperties(const std::string& props) = 0;
34
35 // Stops speaking the current utterance.
36 virtual void StopSpeaking() = 0;
37
38 // Checks if the engine is currently speaking.
39 // |callback| will be called on the origin thread later with the result.
40 virtual void IsSpeaking(IsSpeakingCallback callback) = 0;
41
42 // Factory function, creates a new instance and returns ownership.
43 // For normal usage, access the singleton via DBusThreadManager::Get().
44 static SpeechSynthesizerClient* Create(dbus::Bus* bus);
45
46 // Constants to be used with SetSpeakProperties.
47 static const char kSpeechPropertyLocale[];
48 static const char kSpeechPropertyGender[];
49 static const char kSpeechPropertyRate[];
50 static const char kSpeechPropertyPitch[];
51 static const char kSpeechPropertyVolume[];
52 static const char kSpeechPropertyEquals[];
53 static const char kSpeechPropertyDelimiter[];
54 };
55
56 } // namespace chromeos
57
58 #endif // CHROME_BROWSER_CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698