OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_HANDLER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_HANDLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 | 12 |
13 template <typename T> struct DefaultSingletonTraits; | 13 template <typename T> struct DefaultSingletonTraits; |
14 | 14 |
15 class PrefService; | 15 class PrefService; |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 class AudioMixer; | 19 class AudioMixer; |
20 | 20 |
21 class AudioHandler { | 21 class AudioHandler { |
22 public: | 22 public: |
23 class VolumeObserver { | 23 class VolumeObserver { |
24 public: | 24 public: |
25 virtual void OnVolumeChanged() = 0; | 25 virtual void OnVolumeChanged() = 0; |
| 26 virtual void OnMuteToggled() = 0; |
26 protected: | 27 protected: |
27 VolumeObserver() {} | 28 VolumeObserver() {} |
28 virtual ~VolumeObserver() {} | 29 virtual ~VolumeObserver() {} |
29 DISALLOW_COPY_AND_ASSIGN(VolumeObserver); | 30 DISALLOW_COPY_AND_ASSIGN(VolumeObserver); |
30 }; | 31 }; |
31 | 32 |
32 static void Initialize(); | 33 static void Initialize(); |
33 static void Shutdown(); | 34 static void Shutdown(); |
34 | 35 |
35 // Same as Initialize but using the specified audio mixer. It takes | 36 // Same as Initialize but using the specified audio mixer. It takes |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 ObserverList<VolumeObserver> volume_observers_; | 75 ObserverList<VolumeObserver> volume_observers_; |
75 | 76 |
76 PrefService* prefs_; // not owned | 77 PrefService* prefs_; // not owned |
77 | 78 |
78 DISALLOW_COPY_AND_ASSIGN(AudioHandler); | 79 DISALLOW_COPY_AND_ASSIGN(AudioHandler); |
79 }; | 80 }; |
80 | 81 |
81 } // namespace chromeos | 82 } // namespace chromeos |
82 | 83 |
83 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_HANDLER_H_ | 84 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_HANDLER_H_ |
OLD | NEW |