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

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

Issue 9310018: Revert 119948 - Support for showing/hiding status area volume controls in desktop devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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/chromeos/audio/audio_handler.h ('k') | chrome/browser/chromeos/status/volume_menu_button.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
===================================================================
--- chrome/browser/chromeos/audio/audio_handler.cc (revision 120018)
+++ chrome/browser/chromeos/audio/audio_handler.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -49,10 +49,8 @@
return g_audio_handler;
}
-// static
-AudioHandler* AudioHandler::GetInstanceIfInitialized() {
- return g_audio_handler && g_audio_handler->IsMixerInitialized() ?
- g_audio_handler : NULL;
+bool AudioHandler::IsInitialized() {
+ return mixer_->IsInitialized();
}
double AudioHandler::GetVolumePercent() {
@@ -62,7 +60,6 @@
void AudioHandler::SetVolumePercent(double volume_percent) {
volume_percent = min(max(volume_percent, 0.0), 100.0);
mixer_->SetVolumeDb(PercentToVolumeDb(volume_percent));
- FOR_EACH_OBSERVER(VolumeObserver, volume_observers_, OnVolumeChanged());
}
void AudioHandler::AdjustVolumeByPercent(double adjust_by_percent) {
@@ -77,17 +74,8 @@
void AudioHandler::SetMuted(bool mute) {
mixer_->SetMuted(mute);
- FOR_EACH_OBSERVER(VolumeObserver, volume_observers_, OnVolumeChanged());
}
-void AudioHandler::AddVolumeObserver(VolumeObserver* observer) {
- volume_observers_.AddObserver(observer);
-}
-
-void AudioHandler::RemoveVolumeObserver(VolumeObserver* observer) {
- volume_observers_.RemoveObserver(observer);
-}
-
AudioHandler::AudioHandler()
: mixer_(new AudioMixerAlsa()) {
mixer_->Init();
@@ -97,10 +85,6 @@
mixer_.reset();
};
-bool AudioHandler::IsMixerInitialized() {
- return mixer_->IsInitialized();
-}
-
// VolumeDbToPercent() and PercentToVolumeDb() conversion functions allow us
// complete control over how the 0 to 100% range is mapped to actual loudness.
//
« no previous file with comments | « chrome/browser/chromeos/audio/audio_handler.h ('k') | chrome/browser/chromeos/status/volume_menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698