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

Unified Diff: extensions/browser/api/audio/audio_service.h

Issue 2578473002: chrome.audio API: treat mute as system wide property (Closed)
Patch Set: . Created 4 years 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
Index: extensions/browser/api/audio/audio_service.h
diff --git a/extensions/browser/api/audio/audio_service.h b/extensions/browser/api/audio/audio_service.h
index e733f7afd399dc7240e4cb8d373193667205b25a..cfd25a689f3efa0e7d17a994f3c152a96250ae9f 100644
--- a/extensions/browser/api/audio/audio_service.h
+++ b/extensions/browser/api/audio/audio_service.h
@@ -65,12 +65,26 @@ class AudioService {
// before we activate the new devices with the same type(input/output).
virtual void SetActiveDevices(const DeviceIdList& device_list) = 0;
- // Set the muted and volume/gain properties of a device.
- virtual bool SetDeviceProperties(const std::string& device_id,
- bool muted,
+ // Set the sound level properties (volume or gain) of a device.
+ virtual bool SetDeviceSoundLevel(const std::string& device_id,
int volume,
int gain) = 0;
+ // Sets the mute property of a device.
+ virtual bool SetMuteForDevice(const std::string& device_id, bool value) = 0;
+
+ // Sets mute property for audio input (if |is_input| is true) or output (if
+ // |is_input| is false).
+ // Note that the value set here is never persisted on the device - it will be
+ // reset after user session ends.
+ virtual bool SetMute(bool is_input, bool value) = 0;
+
+ // Gets mute property for audio input (if |is_input| is true) or output (if
+ // |is_input| is false).
+ // The mute value is returned via |mute| argument.
+ // The method returns whether the value was successfully fetched.
+ virtual bool GetMute(bool is_input, bool* mute) = 0;
+
protected:
AudioService() {}

Powered by Google App Engine
This is Rietveld 408576698