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 #include "chrome/browser/speech/extension_api/tts_extension_api_chromeos.h" | 5 #include "chrome/browser/speech/extension_api/tts_extension_api_chromeos.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
15 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | |
16 #include "chrome/browser/chromeos/dbus/speech_synthesizer_client.h" | |
17 #include "chrome/browser/speech/extension_api/tts_extension_api_controller.h" | 15 #include "chrome/browser/speech/extension_api/tts_extension_api_controller.h" |
18 #include "chrome/browser/speech/extension_api/tts_extension_api_platform.h" | 16 #include "chrome/browser/speech/extension_api/tts_extension_api_platform.h" |
| 17 #include "chromeos/dbus/dbus_thread_manager.h" |
| 18 #include "chromeos/dbus/speech_synthesizer_client.h" |
19 | 19 |
20 using base::DoubleToString; | 20 using base::DoubleToString; |
21 | 21 |
22 namespace { | 22 namespace { |
23 const int kSpeechCheckDelayIntervalMs = 100; | 23 const int kSpeechCheckDelayIntervalMs = 100; |
24 }; | 24 }; |
25 | 25 |
26 // Very simple queue of utterances that can't be spoken because audio | 26 // Very simple queue of utterances that can't be spoken because audio |
27 // isn't initialized yet. | 27 // isn't initialized yet. |
28 struct QueuedUtterance { | 28 struct QueuedUtterance { |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // static | 230 // static |
231 ExtensionTtsPlatformImplChromeOs* | 231 ExtensionTtsPlatformImplChromeOs* |
232 ExtensionTtsPlatformImplChromeOs::GetInstance() { | 232 ExtensionTtsPlatformImplChromeOs::GetInstance() { |
233 return Singleton<ExtensionTtsPlatformImplChromeOs>::get(); | 233 return Singleton<ExtensionTtsPlatformImplChromeOs>::get(); |
234 } | 234 } |
235 | 235 |
236 // global | 236 // global |
237 void EnableChromeOsTts() { | 237 void EnableChromeOsTts() { |
238 ExtensionTtsPlatformImplChromeOs::GetInstance()->Enable(); | 238 ExtensionTtsPlatformImplChromeOs::GetInstance()->Enable(); |
239 } | 239 } |
OLD | NEW |