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

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

Issue 2635983006: Final cleanup pass over audio device API (Closed)
Patch Set: rebase 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
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 e44c3a558e03ccf59bea612287a7d024ed69a071..2ca7e62af3b520168f7ae7ccf9e32047cfc41c65 100644
--- a/extensions/browser/api/audio/audio_service.h
+++ b/extensions/browser/api/audio/audio_service.h
@@ -53,9 +53,21 @@ class AudioService {
// Start to query audio device information. Should be called on UI thread.
// Populates |output_info_out| and |input_info_out| with the results.
// Returns true on success.
+ // DEPRECATED: Use |GetDevices| instead.
virtual bool GetInfo(OutputInfo* output_info_out,
InputInfo* input_info_out) = 0;
+ // Retrieves list of audio devices that satisfy |filter|. Poulates
jennyz 2017/02/02 01:10:44 typo: Poulates -> Populates
tbarzic 2017/02/02 01:24:41 Done.
+ // |devices_out| with retrieved devices.
+ // If |filter->is_active| is set, |devices_out| will contain only devices
+ // whose is-active state matches |filter->is_active| value.
+ // If |filter->stream_types| is set, |devices_out| will contain only devices
+ // whose stream type (INPUT for input devices, OUTPUT for output devices) is
+ // contained in |filter->stream_types|.
+ // Returns whether the list of devices was successfully retrieved.
+ virtual bool GetDevices(const api::audio::DeviceFilter& filter,
+ DeviceInfoList* devices_out) = 0;
+
// Sets set of active inputs to devices defined by IDs in |input_devices|,
// and set of active outputs to devices defined by IDs in |output_devices|.
// If either of |input_devices| or |output_devices| is not set, associated

Powered by Google App Engine
This is Rietveld 408576698