| OLD | NEW |
| 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_CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "chrome/browser/chromeos/dbus/dbus_client_implementation_type.h" | 12 #include "chromeos/chromeos_export.h" |
| 13 #include "chromeos/dbus/dbus_client_implementation_type.h" |
| 13 | 14 |
| 14 namespace dbus { | 15 namespace dbus { |
| 15 class Bus; | 16 class Bus; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace chromeos { | 19 namespace chromeos { |
| 19 | 20 |
| 20 // SpeechSynthesizerClient is used to communicate with the speech synthesizer. | 21 // SpeechSynthesizerClient is used to communicate with the speech synthesizer. |
| 21 // All method should be called from the origin thread (UI thread) which | 22 // All method should be called from the origin thread (UI thread) which |
| 22 // initializes the DBusThreadManager instance. | 23 // initializes the DBusThreadManager instance. |
| 23 class SpeechSynthesizerClient { | 24 class CHROMEOS_EXPORT SpeechSynthesizerClient { |
| 24 public: | 25 public: |
| 25 // A callback function called when the result of IsSpeaking is ready. | 26 // A callback function called when the result of IsSpeaking is ready. |
| 26 // The argument indicates if the speech synthesizer is speaking or not. | 27 // The argument indicates if the speech synthesizer is speaking or not. |
| 27 typedef base::Callback<void(bool)> IsSpeakingCallback; | 28 typedef base::Callback<void(bool)> IsSpeakingCallback; |
| 28 | 29 |
| 29 virtual ~SpeechSynthesizerClient(); | 30 virtual ~SpeechSynthesizerClient(); |
| 30 | 31 |
| 31 // Speaks the specified text with properties. | 32 // Speaks the specified text with properties. |
| 32 // Use the constants below for properties. | 33 // Use the constants below for properties. |
| 33 // An example of |properties|: "rate=1.0 pitch=1.0" | 34 // An example of |properties|: "rate=1.0 pitch=1.0" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 58 protected: | 59 protected: |
| 59 // Create() should be used instead. | 60 // Create() should be used instead. |
| 60 SpeechSynthesizerClient(); | 61 SpeechSynthesizerClient(); |
| 61 | 62 |
| 62 private: | 63 private: |
| 63 DISALLOW_COPY_AND_ASSIGN(SpeechSynthesizerClient); | 64 DISALLOW_COPY_AND_ASSIGN(SpeechSynthesizerClient); |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace chromeos | 67 } // namespace chromeos |
| 67 | 68 |
| 68 #endif // CHROME_BROWSER_CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_ | 69 #endif // CHROMEOS_DBUS_SPEECH_SYNTHESIZER_CLIENT_H_ |
| OLD | NEW |