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

Unified Diff: chrome/browser/speech/tts_message_filter.cc

Issue 448033002: Eliminate the dependency of Profile from TtsMessageFilter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation error on ChromeOS 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
« no previous file with comments | « chrome/browser/speech/tts_message_filter.h ('k') | chrome/browser/speech/tts_platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/speech/tts_message_filter.cc
diff --git a/chrome/browser/speech/tts_message_filter.cc b/chrome/browser/speech/tts_message_filter.cc
index 791dfec8751c879065781da71ae8b7d542a3ec2f..8d799fe332aa69c133671561e3609e9b3add4bd5 100644
--- a/chrome/browser/speech/tts_message_filter.cc
+++ b/chrome/browser/speech/tts_message_filter.cc
@@ -11,10 +11,11 @@
using content::BrowserThread;
-TtsMessageFilter::TtsMessageFilter(int render_process_id, Profile* profile)
+TtsMessageFilter::TtsMessageFilter(int render_process_id,
+ content::BrowserContext* browser_context)
: BrowserMessageFilter(TtsMsgStart),
render_process_id_(render_process_id),
- profile_(profile) {
+ browser_context_(browser_context) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
TtsController::GetInstance()->AddVoicesChangedDelegate(this);
}
@@ -59,7 +60,7 @@ void TtsMessageFilter::OnInitializeVoiceList() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
TtsController* tts_controller = TtsController::GetInstance();
std::vector<VoiceData> voices;
- tts_controller->GetVoices(profile_, &voices);
+ tts_controller->GetVoices(browser_context_, &voices);
std::vector<TtsVoice> out_voices;
out_voices.resize(voices.size());
@@ -76,7 +77,8 @@ void TtsMessageFilter::OnInitializeVoiceList() {
void TtsMessageFilter::OnSpeak(const TtsUtteranceRequest& request) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- scoped_ptr<Utterance> utterance(new Utterance(profile_));
+
+ scoped_ptr<Utterance> utterance(new Utterance(browser_context_));
utterance->set_src_id(request.id);
utterance->set_text(request.text);
utterance->set_lang(request.lang);
« no previous file with comments | « chrome/browser/speech/tts_message_filter.h ('k') | chrome/browser/speech/tts_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698