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.h" | 5 #include "chrome/browser/speech/extension_api/tts_extension_api.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 registry->RegisterFunction<TtsPauseFunction>(); | 360 registry->RegisterFunction<TtsPauseFunction>(); |
361 registry->RegisterFunction<TtsResumeFunction>(); | 361 registry->RegisterFunction<TtsResumeFunction>(); |
362 | 362 |
363 // Ensure we're observing newly added engines for the given context. | 363 // Ensure we're observing newly added engines for the given context. |
364 TtsEngineExtensionObserver::GetInstance(Profile::FromBrowserContext(context)); | 364 TtsEngineExtensionObserver::GetInstance(Profile::FromBrowserContext(context)); |
365 } | 365 } |
366 | 366 |
367 TtsAPI::~TtsAPI() { | 367 TtsAPI::~TtsAPI() { |
368 } | 368 } |
369 | 369 |
370 static base::LazyInstance<BrowserContextKeyedAPIFactory<TtsAPI> > g_factory = | 370 static base::LazyInstance< |
| 371 BrowserContextKeyedAPIFactory<TtsAPI>>::DestructorAtExit g_factory = |
371 LAZY_INSTANCE_INITIALIZER; | 372 LAZY_INSTANCE_INITIALIZER; |
372 | 373 |
373 BrowserContextKeyedAPIFactory<TtsAPI>* TtsAPI::GetFactoryInstance() { | 374 BrowserContextKeyedAPIFactory<TtsAPI>* TtsAPI::GetFactoryInstance() { |
374 return g_factory.Pointer(); | 375 return g_factory.Pointer(); |
375 } | 376 } |
376 | 377 |
377 } // namespace extensions | 378 } // namespace extensions |
OLD | NEW |