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

Unified Diff: media/audio/audio_manager.h

Issue 10704154: Small refactor to media architecture in order to allow end-to-end tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/audio_manager.h
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index 704d48f8b2f0c7e21c4e1f111a129596cfd7332c..eac7a39532bbbdfbf8a80bc510875f1f5cb341c0 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -35,6 +35,10 @@ class MEDIA_EXPORT AudioManager {
// NOTE: There should only be one instance.
static AudioManager* Create();
+ // For testing purposes only: sets the testing AudioManager that will be
+ // returned by subsequent invocations of the Create method.
+ static void set_audio_manager_for_tests(AudioManager* audio_manager);
tommi (sloooow) - chröme 2012/07/11 09:59:08 Can you explain why you need this? I would like to
+
// Returns true if the OS reports existence of audio devices. This does not
// guarantee that the existing devices support all formats and sample rates.
virtual bool HasAudioOutputDevices() = 0;
@@ -124,6 +128,8 @@ class MEDIA_EXPORT AudioManager {
virtual void Init() = 0;
private:
+ static AudioManager* audio_manager_for_tests_;
+
DISALLOW_COPY_AND_ASSIGN(AudioManager);
};

Powered by Google App Engine
This is Rietveld 408576698