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

Unified Diff: chrome/browser/speech/tts_controller.h

Issue 448033002: Eliminate the dependency of Profile from TtsMessageFilter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace Profile by BrowserContext Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/speech/tts_controller.h
diff --git a/chrome/browser/speech/tts_controller.h b/chrome/browser/speech/tts_controller.h
index 441b05f7a511d84761c36b8221743f71ed0396f3..85122d7b256498c529a23f00d19dd9e80b07eb32 100644
--- a/chrome/browser/speech/tts_controller.h
+++ b/chrome/browser/speech/tts_controller.h
@@ -17,12 +17,15 @@
class Utterance;
class TtsPlatformImpl;
-class Profile;
namespace base {
class Value;
}
+namespace content {
+class BrowserContext;
+}
+
// Events sent back from the TTS engine indicating the progress.
enum TtsEventType {
TTS_EVENT_START,
@@ -83,7 +86,7 @@ class TtsEngineDelegate {
virtual ~TtsEngineDelegate() {}
// Return a list of all available voices registered.
- virtual void GetVoices(Profile* profile,
+ virtual void GetVoices(content::BrowserContext* browser_context,
std::vector<VoiceData>* out_voices) = 0;
// Speak the given utterance by sending an event to the given TTS engine.
@@ -100,7 +103,8 @@ class TtsEngineDelegate {
virtual void Resume(Utterance* utterance) = 0;
// Load the built-in component extension for ChromeOS.
- virtual bool LoadBuiltInTtsExtension(Profile* profile) = 0;
+ virtual bool LoadBuiltInTtsExtension(
+ content::BrowserContext* browser_context) = 0;
dmazzoni 2014/08/12 06:21:08 nit: indentation
};
// Class that wants to receive events on utterances.
@@ -127,7 +131,7 @@ class Utterance {
// Construct an utterance given a profile and a completion task to call
// when the utterance is done speaking. Before speaking this utterance,
// its other parameters like text, rate, pitch, etc. should all be set.
- explicit Utterance(Profile* profile);
+ explicit Utterance(content::BrowserContext* browser_context);
~Utterance();
// Sends an event to the delegate. If the event type is TTS_EVENT_END
@@ -211,13 +215,13 @@ class Utterance {
}
// Getters and setters for internal state.
- Profile* profile() const { return profile_; }
+ content::BrowserContext* browser_context() const { return browser_context_; }
int id() const { return id_; }
bool finished() const { return finished_; }
private:
// The profile that initiated this utterance.
dmazzoni 2014/08/12 06:21:08 Update the comment.
- Profile* profile_;
+ content::BrowserContext* browser_context_;
// The extension ID of the extension providing TTS for this utterance, or
// empty if native TTS is being used.
@@ -307,7 +311,7 @@ class TtsController {
// Return a list of all available voices, including the native voice,
// if supported, and all voices registered by extensions.
- virtual void GetVoices(Profile* profile,
+ virtual void GetVoices(content::BrowserContext* browser_context,
std::vector<VoiceData>* out_voices) = 0;
// Called by the extension system or platform implementation when the

Powered by Google App Engine
This is Rietveld 408576698