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

Unified Diff: content/test/webrtc_audio_device_test.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 | « content/renderer/media/webrtc_audio_device_unittest.cc ('k') | content/test/webrtc_audio_device_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/webrtc_audio_device_test.h
===================================================================
--- content/test/webrtc_audio_device_test.h (revision 114012)
+++ content/test/webrtc_audio_device_test.h (working copy)
@@ -12,7 +12,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "base/synchronization/waitable_event.h"
#include "content/browser/renderer_host/media/mock_media_observer.h"
#include "content/renderer/mock_content_renderer_client.h"
#include "ipc/ipc_channel.h"
@@ -20,6 +19,7 @@
#include "third_party/webrtc/common_types.h"
class AudioInputRendererHost;
+class AudioManager;
class AudioRendererHost;
class RenderThreadImpl;
class WebRTCMockRenderProcess;
@@ -118,19 +118,6 @@
: public ::testing::Test,
public IPC::Channel::Listener {
public:
- class SetupTask : public base::RefCountedThreadSafe<SetupTask> {
- public:
- explicit SetupTask(WebRTCAudioDeviceTest* test) : test_(test) {
- DCHECK(test); // Catch this early since we dereference much later.
- }
- void InitializeIOThread(const char* thread_name) {
- test_->InitializeIOThread(thread_name);
- }
- void UninitializeIOThread() { test_->UninitializeIOThread(); }
- protected:
- WebRTCAudioDeviceTest* test_;
- };
-
WebRTCAudioDeviceTest();
virtual ~WebRTCAudioDeviceTest();
@@ -145,8 +132,7 @@
protected:
void InitializeIOThread(const char* thread_name);
void UninitializeIOThread();
- void CreateChannel(const char* name,
- content::ResourceContext* resource_context);
+ void CreateChannel(const char* name);
void DestroyChannel();
void OnGetHardwareSampleRate(double* sample_rate);
@@ -157,6 +143,8 @@
// Posts a final task to the IO message loop and waits for completion.
void WaitForIOThreadCompletion();
+ void WaitForAudioManagerCompletion();
+ void WaitForMessageLoopCompletion(MessageLoop* loop);
// Convenience getter for gmock.
MockMediaObserver& media_observer() const {
@@ -170,9 +158,9 @@
content::MockContentRendererClient mock_content_renderer_client_;
RenderThreadImpl* render_thread_; // Owned by mock_process_.
scoped_ptr<WebRTCMockRenderProcess> mock_process_;
- base::WaitableEvent event_;
scoped_ptr<MockMediaObserver> media_observer_;
scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_;
+ scoped_refptr<AudioManager> audio_manager_;
scoped_ptr<content::ResourceContext> resource_context_;
scoped_refptr<net::URLRequestContext> test_request_context_;
scoped_ptr<IPC::Channel> channel_;
« no previous file with comments | « content/renderer/media/webrtc_audio_device_unittest.cc ('k') | content/test/webrtc_audio_device_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698