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

Unified Diff: chrome/browser/chromeos/audio_mixer_alsa.cc

Issue 8511026: Don't start speech synthesis until after the audio mixer is initialized. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/chromeos/audio_mixer_alsa.cc
===================================================================
--- chrome/browser/chromeos/audio_mixer_alsa.cc (revision 109026)
+++ chrome/browser/chromeos/audio_mixer_alsa.cc (working copy)
@@ -17,9 +17,13 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/extensions/extension_tts_api_chromeos.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/notification_service.h"
+#include "content/public/browser/notification_types.h"
typedef long alsa_long_t; // 'long' is required for ALSA API calls.
@@ -302,6 +306,12 @@
volume_db_ = min(max(volume_db_, min_volume_db_), max_volume_db_);
}
+ // The speech synthesis service shouldn't be initialized until after
+ // we get to this point, so we call this function to tell it that it's
+ // safe to do TTS now. NotificationService would be cleaner,
+ // but it's not available at this point.
+ EnableChromeOsTts();
+
ApplyState();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698