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" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 return true; | 160 return true; |
161 } | 161 } |
162 | 162 |
163 chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient()-> | 163 chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient()-> |
164 StopSpeaking(); | 164 StopSpeaking(); |
165 return true; | 165 return true; |
166 } | 166 } |
167 | 167 |
168 bool ExtensionTtsPlatformImplChromeOs::IsSpeaking() { | 168 bool ExtensionTtsPlatformImplChromeOs::IsSpeaking() { |
169 // Defers to controller's utterance based detection of is speaking. | 169 // Defers to controller's utterance based detection of is speaking. |
170 return true; | 170 return false; |
171 } | 171 } |
172 | 172 |
173 bool ExtensionTtsPlatformImplChromeOs::SendsEvent(TtsEventType event_type) { | 173 bool ExtensionTtsPlatformImplChromeOs::SendsEvent(TtsEventType event_type) { |
174 return (event_type == TTS_EVENT_START || | 174 return (event_type == TTS_EVENT_START || |
175 event_type == TTS_EVENT_END || | 175 event_type == TTS_EVENT_END || |
176 event_type == TTS_EVENT_ERROR); | 176 event_type == TTS_EVENT_ERROR); |
177 } | 177 } |
178 | 178 |
179 void ExtensionTtsPlatformImplChromeOs::Enable() { | 179 void ExtensionTtsPlatformImplChromeOs::Enable() { |
180 enabled_ = true; | 180 enabled_ = true; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // static | 237 // static |
238 ExtensionTtsPlatformImplChromeOs* | 238 ExtensionTtsPlatformImplChromeOs* |
239 ExtensionTtsPlatformImplChromeOs::GetInstance() { | 239 ExtensionTtsPlatformImplChromeOs::GetInstance() { |
240 return Singleton<ExtensionTtsPlatformImplChromeOs>::get(); | 240 return Singleton<ExtensionTtsPlatformImplChromeOs>::get(); |
241 } | 241 } |
242 | 242 |
243 // global | 243 // global |
244 void EnableChromeOsTts() { | 244 void EnableChromeOsTts() { |
245 ExtensionTtsPlatformImplChromeOs::GetInstance()->Enable(); | 245 ExtensionTtsPlatformImplChromeOs::GetInstance()->Enable(); |
246 } | 246 } |
OLD | NEW |