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 1833053004: [Extensions] Convert APIs to use movable types [10] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 7aec3c6484ef9939e8544f482da570c5087896d0..e733f7afd399dc7240e4cb8d373193667205b25a 100644
--- a/extensions/browser/api/audio/audio_service.h
+++ b/extensions/browser/api/audio/audio_service.h
@@ -10,15 +10,14 @@
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/linked_ptr.h"
#include "extensions/common/api/audio.h"
namespace extensions {
-using OutputInfo = std::vector<linked_ptr<api::audio::OutputDeviceInfo>>;
-using InputInfo = std::vector<linked_ptr<api::audio::InputDeviceInfo>>;
+using OutputInfo = std::vector<api::audio::OutputDeviceInfo>;
+using InputInfo = std::vector<api::audio::InputDeviceInfo>;
using DeviceIdList = std::vector<std::string>;
-using DeviceInfoList = std::vector<linked_ptr<api::audio::AudioDeviceInfo>>;
+using DeviceInfoList = std::vector<api::audio::AudioDeviceInfo>;
class AudioService {
public:
@@ -41,10 +40,6 @@ class AudioService {
virtual ~Observer() {}
};
- // Callback type for completing to get audio device information.
- typedef base::Callback<void(const OutputInfo&, const InputInfo&, bool)>
- GetInfoCallback;
-
// Creates a platform-specific AudioService instance.
static AudioService* CreateInstance();
@@ -55,8 +50,10 @@ class AudioService {
virtual void RemoveObserver(Observer* observer) = 0;
// Start to query audio device information. Should be called on UI thread.
- // The |callback| will be invoked once the query is completed.
- virtual void StartGetInfo(const GetInfoCallback& callback) = 0;
+ // Populates |output_info_out| and |input_info_out| with the results.
+ // Returns true on success.
+ virtual bool GetInfo(OutputInfo* output_info_out,
+ InputInfo* input_info_out) = 0;
// Sets the active devices to the devices specified by |device_list|.
// It can pass in the "complete" active device list of either input
« 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