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

Unified Diff: chrome/browser/chromeos/audio/audio_handler.cc

Issue 9768007: ChromeOS mixer: Talk to new ChromeOS audio server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « no previous file | chrome/browser/chromeos/audio/audio_mixer_cras.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/audio/audio_handler.cc
diff --git a/chrome/browser/chromeos/audio/audio_handler.cc b/chrome/browser/chromeos/audio/audio_handler.cc
index ca7a22a4d13f173df332cfda789817f307f81893..fc4316294856cd3cb0be3743980e9e9aedff8dda 100644
--- a/chrome/browser/chromeos/audio/audio_handler.cc
+++ b/chrome/browser/chromeos/audio/audio_handler.cc
@@ -10,7 +10,11 @@
#include "base/logging.h"
#include "base/memory/singleton.h"
#include "chrome/browser/browser_process.h"
+#if defined(USE_CRAS)
+#include "chrome/browser/chromeos/audio/audio_mixer_cras.h"
+#else
#include "chrome/browser/chromeos/audio/audio_mixer_alsa.h"
+#endif
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
@@ -110,7 +114,11 @@ void AudioHandler::RemoveVolumeObserver(VolumeObserver* observer) {
}
AudioHandler::AudioHandler()
+#if defined(USE_CRAS)
+ : mixer_(new AudioMixerCras()),
+#else
: mixer_(new AudioMixerAlsa()),
+#endif
prefs_(g_browser_process->local_state()) {
mixer_->SetVolumePercent(prefs_->GetDouble(prefs::kAudioVolumePercent));
mixer_->SetMuted(prefs_->GetInteger(prefs::kAudioMute) == kPrefMuteOn);
« no previous file with comments | « no previous file | chrome/browser/chromeos/audio/audio_mixer_cras.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698