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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ 5 #ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_
6 #define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ 6 #define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Sets the active devices to the devices specified by |device_list|. 73 // Sets the active devices to the devices specified by |device_list|.
74 // It can pass in the "complete" active device list of either input 74 // It can pass in the "complete" active device list of either input
75 // devices, or output devices, or both. If only input devices are passed in, 75 // devices, or output devices, or both. If only input devices are passed in,
76 // it will only change the input devices' active status, output devices will 76 // it will only change the input devices' active status, output devices will
77 // NOT be changed; similarly for the case if only output devices are passed. 77 // NOT be changed; similarly for the case if only output devices are passed.
78 // If the devices specified in |new_active_ids| are already active, they will 78 // If the devices specified in |new_active_ids| are already active, they will
79 // remain active. Otherwise, the old active devices will be de-activated 79 // remain active. Otherwise, the old active devices will be de-activated
80 // before we activate the new devices with the same type(input/output). 80 // before we activate the new devices with the same type(input/output).
81 virtual void SetActiveDevices(const DeviceIdList& device_list) = 0; 81 virtual void SetActiveDevices(const DeviceIdList& device_list) = 0;
82 82
83 // Set the muted and volume/gain properties of a device. 83 // Set the sound level properties (volume or gain) of a device.
84 virtual bool SetDeviceProperties(const std::string& device_id, 84 virtual bool SetDeviceSoundLevel(const std::string& device_id,
85 bool muted,
86 int volume, 85 int volume,
87 int gain) = 0; 86 int gain) = 0;
88 87
88 // Sets the mute property of a device.
89 virtual bool SetMuteForDevice(const std::string& device_id, bool value) = 0;
90
91 // Sets mute property for audio input (if |is_input| is true) or output (if
92 // |is_input| is false).
93 virtual bool SetMute(bool is_input, bool value) = 0;
94
95 // Gets mute property for audio input (if |is_input| is true) or output (if
96 // |is_input| is false).
97 // The mute value is returned via |mute| argument.
98 // The method returns whether the value was successfully fetched.
99 virtual bool GetMute(bool is_input, bool* mute) = 0;
100
89 protected: 101 protected:
90 AudioService() {} 102 AudioService() {}
91 103
92 private: 104 private:
93 DISALLOW_COPY_AND_ASSIGN(AudioService); 105 DISALLOW_COPY_AND_ASSIGN(AudioService);
94 }; 106 };
95 107
96 } // namespace extensions 108 } // namespace extensions
97 109
98 #endif // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_ 110 #endif // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_
OLDNEW
« 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