summaryrefslogtreecommitdiffstats
path: root/chrome/browser/speech
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-25 19:24:41 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-25 19:24:41 +0000
commitc4b717a7763a8509b525ecbcf1d0f03d7eed83b6 (patch)
tree4b5064226e2dbde8a0459dc4cc4989f9c140775a /chrome/browser/speech
parent8548c45dc44afeaeaca0044ec9004aa98a16e754 (diff)
downloadchromium_src-c4b717a7763a8509b525ecbcf1d0f03d7eed83b6.zip
chromium_src-c4b717a7763a8509b525ecbcf1d0f03d7eed83b6.tar.gz
chromium_src-c4b717a7763a8509b525ecbcf1d0f03d7eed83b6.tar.bz2
Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 3).
This is the last part. Follows part 1: https://chromiumcodereview.appspot.com/171813010/ BUG=309909 R=jamescook@chromium.org TBR=brettw@chromium.org, dtseng@chromium.org, erg@chromium.org Review URL: https://codereview.chromium.org/174513003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253223 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/speech')
-rw-r--r--chrome/browser/speech/extension_api/tts_extension_api.cc8
-rw-r--r--chrome/browser/speech/extension_api/tts_extension_api.h9
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();