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

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

Issue 2578473002: chrome.audio API: treat mute as system wide property (Closed)
Patch Set: . Created 3 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 | « extensions/browser/api/audio/audio_api.cc ('k') | extensions/browser/api/audio/audio_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6ad8d9692e2804e6b93f57e9f37b9359a2b18a3d..e44c3a558e03ccf59bea612287a7d024ed69a071 100644
--- a/extensions/browser/api/audio/audio_service.h
+++ b/extensions/browser/api/audio/audio_service.h
@@ -80,12 +80,24 @@ 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).
+ 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() {}
« no previous file with comments | « extensions/browser/api/audio/audio_api.cc ('k') | extensions/browser/api/audio/audio_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698