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 <math.h> | 5 #include <math.h> |
6 #include <sapi.h> | 6 #include <sapi.h> |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 SPFEI(SPEI_SENTENCE_BOUNDARY) | | 200 SPFEI(SPEI_SENTENCE_BOUNDARY) | |
201 SPFEI(SPEI_END_INPUT_STREAM); | 201 SPFEI(SPEI_END_INPUT_STREAM); |
202 speech_synthesizer_->SetInterest(event_mask, event_mask); | 202 speech_synthesizer_->SetInterest(event_mask, event_mask); |
203 speech_synthesizer_->SetNotifyCallbackFunction( | 203 speech_synthesizer_->SetNotifyCallbackFunction( |
204 ExtensionTtsPlatformImplWin::SpeechEventCallback, 0, 0); | 204 ExtensionTtsPlatformImplWin::SpeechEventCallback, 0, 0); |
205 } | 205 } |
206 } | 206 } |
207 | 207 |
208 // static | 208 // static |
209 ExtensionTtsPlatformImplWin* ExtensionTtsPlatformImplWin::GetInstance() { | 209 ExtensionTtsPlatformImplWin* ExtensionTtsPlatformImplWin::GetInstance() { |
210 return Singleton<ExtensionTtsPlatformImplWin>::get(); | 210 return Singleton<ExtensionTtsPlatformImplWin, |
| 211 LeakySingletonTraits<ExtensionTtsPlatformImplWin> >::get(); |
211 } | 212 } |
212 | 213 |
213 // static | 214 // static |
214 void ExtensionTtsPlatformImplWin::SpeechEventCallback( | 215 void ExtensionTtsPlatformImplWin::SpeechEventCallback( |
215 WPARAM w_param, LPARAM l_param) { | 216 WPARAM w_param, LPARAM l_param) { |
216 GetInstance()->OnSpeechEvent(); | 217 GetInstance()->OnSpeechEvent(); |
217 } | 218 } |
OLD | NEW |