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

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

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 | « no previous file | chrome/browser/chromeos/audio/audio_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/audio/audio_handler.h
===================================================================
--- chrome/browser/chromeos/audio/audio_handler.h (revision 120018)
+++ chrome/browser/chromeos/audio/audio_handler.h (working copy)
@@ -7,7 +7,6 @@
#pragma once
#include "base/basictypes.h"
-#include "base/observer_list.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread.h"
@@ -19,29 +18,17 @@
class AudioHandler {
public:
- class VolumeObserver {
- public:
- virtual void OnVolumeChanged() = 0;
- protected:
- VolumeObserver() {}
- virtual ~VolumeObserver() {}
- DISALLOW_COPY_AND_ASSIGN(VolumeObserver);
- };
-
static void Initialize();
static void Shutdown();
// GetInstance returns NULL if not initialized or if already shutdown.
- // The mixer may be uninitialized, so use GetInstanceIfInitialized
- // for volume control until the TODO below is resolved.
static AudioHandler* GetInstance();
- // GetInstanceIfInitialized returns NULL if GetInstance returns NULL or if
- // the mixer has not finished initializing.
+ // Is the mixer initialized?
// TODO(derat): All of the volume-percent methods will produce "interesting"
// results before the mixer is initialized, since the driver's volume range
// isn't known at that point. This could be avoided if AudioMixer objects
// instead took percentages and did their own conversions to decibels.
- static AudioHandler* GetInstanceIfInitialized();
+ bool IsInitialized();
// Gets volume level in our internal 0-100% range, 0 being pure silence.
double GetVolumePercent();
@@ -58,9 +45,6 @@
// Mutes or unmutes all audio.
void SetMuted(bool do_mute);
- void AddVolumeObserver(VolumeObserver* observer);
- void RemoveVolumeObserver(VolumeObserver* observer);
-
private:
// Defines the delete on exit Singleton traits we like. Best to have this
// and constructor/destructor private as recommended for Singletons.
@@ -69,16 +53,12 @@
AudioHandler();
virtual ~AudioHandler();
- bool IsMixerInitialized();
-
// Conversion between our internal scaling (0-100%) and decibels.
double VolumeDbToPercent(double volume_db) const;
double PercentToVolumeDb(double volume_percent) const;
scoped_ptr<AudioMixer> mixer_;
- ObserverList<VolumeObserver> volume_observers_;
-
DISALLOW_COPY_AND_ASSIGN(AudioHandler);
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/audio/audio_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698