diff options
Diffstat (limited to 'chrome/browser/speech')
-rw-r--r-- | chrome/browser/speech/extension_api/tts_extension_api.cc | 8 | ||||
-rw-r--r-- | chrome/browser/speech/extension_api/tts_extension_api.h | 9 |
2 files changed, 5 insertions, 12 deletions
diff --git a/chrome/browser/speech/extension_api/tts_extension_api.cc b/chrome/browser/speech/extension_api/tts_extension_api.cc index e9fd625..dcb5e3a 100644 --- a/chrome/browser/speech/extension_api/tts_extension_api.cc +++ b/chrome/browser/speech/extension_api/tts_extension_api.cc @@ -10,7 +10,6 @@ #include "base/memory/weak_ptr.h" #include "base/values.h" #include "chrome/browser/extensions/extension_function_registry.h" -#include "chrome/browser/profiles/profile.h" #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" #include "chrome/browser/speech/extension_api/tts_extension_api_constants.h" #include "chrome/browser/speech/tts_controller.h" @@ -342,12 +341,7 @@ bool TtsGetVoicesFunction::RunImpl() { return true; } -// static -TtsAPI* TtsAPI::Get(Profile* profile) { - return ProfileKeyedAPIFactory<TtsAPI>::GetForProfile(profile); -} - -TtsAPI::TtsAPI(Profile* profile) { +TtsAPI::TtsAPI(content::BrowserContext* context) { ExtensionFunctionRegistry* registry = ExtensionFunctionRegistry::GetInstance(); registry->RegisterFunction<ExtensionTtsEngineSendTtsEventFunction>(); diff --git a/chrome/browser/speech/extension_api/tts_extension_api.h b/chrome/browser/speech/extension_api/tts_extension_api.h index a8f3c19..4746e09 100644 --- a/chrome/browser/speech/extension_api/tts_extension_api.h +++ b/chrome/browser/speech/extension_api/tts_extension_api.h @@ -11,7 +11,9 @@ #include "chrome/browser/extensions/chrome_extension_function.h" #include "chrome/browser/speech/tts_controller.h" -class Profile; +namespace content { +class BrowserContext; +} const char *TtsEventTypeToString(TtsEventType event_type); TtsEventType TtsEventTypeFromString(const std::string& str); @@ -62,12 +64,9 @@ class TtsGetVoicesFunction : public ChromeSyncExtensionFunction { class TtsAPI : public ProfileKeyedAPI { public: - explicit TtsAPI(Profile* profile); + explicit TtsAPI(content::BrowserContext* context); virtual ~TtsAPI(); - // Convenience method to get the TtsAPI for a profile. - static TtsAPI* Get(Profile* profile); - // ProfileKeyedAPI implementation. static ProfileKeyedAPIFactory<TtsAPI>* GetFactoryInstance(); |