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

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

Issue 2605983002: Simplify logic behind chrome.audio.setActiveDevices (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 e733f7afd399dc7240e4cb8d373193667205b25a..6ad8d9692e2804e6b93f57e9f37b9359a2b18a3d 100644
--- a/extensions/browser/api/audio/audio_service.h
+++ b/extensions/browser/api/audio/audio_service.h
@@ -5,6 +5,7 @@
#ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_
#define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_SERVICE_H_
+#include <memory>
#include <string>
#include <vector>
@@ -55,6 +56,20 @@ class AudioService {
virtual bool GetInfo(OutputInfo* output_info_out,
InputInfo* input_info_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
+ // set of active devices will remain unchanged.
+ // If either list is empty, all active devices of associated type will be
+ // deactivated.
+ // Returns whether the operation succeeded - on failure there will be no
+ // changes to active devices.
+ // Note that device ID lists should contain only existing device ID of
+ // appropriate type in order for the method to succeed.
+ virtual bool SetActiveDeviceLists(
+ const std::unique_ptr<DeviceIdList>& input_devices,
+ const std::unique_ptr<DeviceIdList>& output_devives) = 0;
+
// Sets the active devices to the devices specified by |device_list|.
// It can pass in the "complete" active device list of either input
// devices, or output devices, or both. If only input devices are passed in,
« 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