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

Side by Side Diff: chrome/browser/chromeos/audio/audio_mixer.h

Issue 10873085: Implement two new policies to control muting the audio I/O. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_MIXER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_MIXER_H_
6 #define CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_MIXER_H_ 6 #define CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_MIXER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
11 11
12 class AudioMixer { 12 class AudioMixer {
13 public: 13 public:
14 AudioMixer() {} 14 AudioMixer() {}
15 virtual ~AudioMixer() {} 15 virtual ~AudioMixer() {}
16 16
17 // Initializes the connection to the device. This must be called on the UI 17 // Initializes the connection to the device. This must be called on the UI
18 // thread; blocking tasks may take place in the background. Note that the 18 // thread; blocking tasks may take place in the background. Note that the
19 // other methods in this interface can be called before Init(). 19 // other methods in this interface can be called before Init().
20 virtual void Init() = 0; 20 virtual void Init() = 0;
21 21
22 // Returns the most-recently-set volume, in the range [0.0, 100.0]. 22 // Returns the most-recently-set volume, in the range [0.0, 100.0].
23 virtual double GetVolumePercent() = 0; 23 virtual double GetVolumePercent() = 0;
24 24
25 // Sets the volume, possibly asynchronously. 25 // Sets the volume, possibly asynchronously.
26 // |percent| should be in the range [0.0, 100.0]. 26 // |percent| should be in the range [0.0, 100.0].
27 virtual void SetVolumePercent(double percent) = 0; 27 virtual void SetVolumePercent(double percent) = 0;
28 28
29 // Is the device currently muted? 29 // Is the device currently muted? If SetMuteLocked has been called with true
30 // this function will not change the mute state until it is unlocked with
31 // another call to SetMuteLocked(false).
30 virtual bool IsMuted() = 0; 32 virtual bool IsMuted() = 0;
31 33
32 // Mutes or unmutes the device, possibly asynchronously. 34 // Mutes or unmutes the device, possibly asynchronously.
33 virtual void SetMuted(bool mute) = 0; 35 virtual void SetMuted(bool mute) = 0;
34 36
37 // Is the device's mute state currently locked?
38 virtual bool IsMuteLocked() = 0;
39
40 // Locks the mute state of the device to muted. After this is done SetMute
41 // will ignore unmuting requests until SetMuteLocked is called with false.
42 virtual void SetMuteLocked(bool locked) = 0;
43
44 // Is the capture device currently muted?
45 virtual bool IsCaptureMuted() = 0;
Daniel Erat 2012/08/28 20:40:51 It's "mic" in AudioHandler but "capture" here. Ar
pastarmovj 2012/08/29 08:45:05 Not really I will change it to capture everywhere
46
47 // Mutes or unmutes the capture device, possible asynchronously.
48 virtual void SetCaptureMuted(bool mute) = 0;
49
50 // Is the capture device's mute state currently locked?
51 virtual bool IsCaptureMuteLocked() = 0;
52
53 // Locks the capture mute state of the device.
54 virtual void SetCaptureMuteLocked(bool locked) = 0;
55
35 private: 56 private:
36 DISALLOW_COPY_AND_ASSIGN(AudioMixer); 57 DISALLOW_COPY_AND_ASSIGN(AudioMixer);
37 }; 58 };
38 59
39 } // namespace chromeos 60 } // namespace chromeos
40 61
41 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_MIXER_H_ 62 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_MIXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698