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

Unified Diff: media/audio/mock_audio_manager.h

Issue 2761273003: Switching MediaStreamsManager from using AudioManager interface to AudioSystem one. (Closed)
Patch Set: passing device descriptions by value Created 3 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
Index: media/audio/mock_audio_manager.h
diff --git a/media/audio/mock_audio_manager.h b/media/audio/mock_audio_manager.h
index a75e940c34a53ca0bc85f3cbbff9e71e69501f42..69e0d1496ed022a37cd159da08c1bd7c09d73662 100644
--- a/media/audio/mock_audio_manager.h
+++ b/media/audio/mock_audio_manager.h
@@ -5,6 +5,7 @@
#ifndef MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_
#define MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_
+#include "base/callback.h"
#include "base/macros.h"
#include "base/sequenced_task_runner_helpers.h"
#include "media/audio/audio_manager.h"
@@ -23,6 +24,8 @@ class MockAudioManager : public AudioManager {
};
using UniquePtr = std::unique_ptr<MockAudioManager, Deleter>;
+ using GetDeviceDescriptionsCallback =
+ base::RepeatingCallback<void(AudioDeviceDescriptions*)>;
explicit MockAudioManager(
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
@@ -83,6 +86,10 @@ class MockAudioManager : public AudioManager {
void SetDefaultOutputStreamParameters(const AudioParameters& params);
void SetHasInputDevices(bool has_input_devices);
void SetHasOutputDevices(bool has_output_devices);
+ void SetInputDeviceDescriptionsCallback(
+ GetDeviceDescriptionsCallback callback);
+ void SetOutputDeviceDescriptionsCallback(
+ GetDeviceDescriptionsCallback callback);
protected:
~MockAudioManager() override;
@@ -95,6 +102,8 @@ class MockAudioManager : public AudioManager {
AudioParameters default_output_params_;
bool has_input_devices_ = true;
bool has_output_devices_ = true;
+ GetDeviceDescriptionsCallback get_input_device_descriptions_cb_;
+ GetDeviceDescriptionsCallback get_output_device_descriptions_cb_;
DISALLOW_COPY_AND_ASSIGN(MockAudioManager);
};

Powered by Google App Engine
This is Rietveld 408576698