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

Unified Diff: media/audio/audio_input_controller.h

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Set svn eol properties for a couple of files Created 9 years 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 | « media/audio/android/audio_manager_android.cc ('k') | media/audio/audio_input_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_controller.h
===================================================================
--- media/audio/audio_input_controller.h (revision 114012)
+++ media/audio/audio_input_controller.h (working copy)
@@ -5,6 +5,7 @@
#ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
#define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_
+#include <string>
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
@@ -73,8 +74,10 @@
// create the AudioInputController. Factory is intended for testing.
class Factory {
public:
- virtual AudioInputController* Create(EventHandler* event_handler,
- AudioParameters params) = 0;
+ virtual AudioInputController* Create(
+ AudioManager* audio_manager,
+ EventHandler* event_handler,
+ AudioParameters params) = 0;
protected:
virtual ~Factory() {}
};
@@ -86,11 +89,13 @@
// device will be created on the new thread and when that is done event
// handler will receive a OnCreated() call.
static scoped_refptr<AudioInputController> Create(
+ AudioManager* audio_manager,
EventHandler* event_handler,
const AudioParameters& params);
// Factory method for creating a low latency audio stream.
static scoped_refptr<AudioInputController> CreateLowLatency(
+ AudioManager* audio_manager,
EventHandler* event_handler,
const AudioParameters& params,
const std::string& device_id,
@@ -133,7 +138,8 @@
kError
};
- AudioInputController(EventHandler* handler, SyncWriter* sync_writer);
+ AudioInputController(AudioManager* audio_manager, EventHandler* handler,
+ SyncWriter* sync_writer);
// The following methods are executed on the audio controller thread.
void DoCreate(const AudioParameters& params, const std::string& device_id);
@@ -143,6 +149,7 @@
void DoReportNoDataError();
void DoResetNoDataTimer();
+ scoped_refptr<AudioManager> audio_manager_;
EventHandler* handler_;
AudioInputStream* stream_;
« no previous file with comments | « media/audio/android/audio_manager_android.cc ('k') | media/audio/audio_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698