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

Side by Side Diff: chrome/browser/speech/extension_api/tts_extension_api_chromeos.cc

Issue 10796113: Chrome OS TTS API should not report it's speaking when it's not. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698