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

Unified Diff: content/test/webrtc_audio_device_test.cc

Issue 8588030: Refactor the Get*Hardware* routines a bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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: content/test/webrtc_audio_device_test.cc
===================================================================
--- content/test/webrtc_audio_device_test.cc (revision 110480)
+++ content/test/webrtc_audio_device_test.cc (working copy)
@@ -19,6 +19,7 @@
#include "content/common/view_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_paths.h"
+#include "content/renderer/media/audio_device.h"
#include "content/renderer/media/webrtc_audio_device_impl.h"
#include "content/renderer/render_process.h"
#include "content/renderer/render_thread_impl.h"
@@ -130,12 +131,20 @@
base::Bind(&SetupTask::UninitializeIOThread, new SetupTask(this)));
WaitForIOThreadCompletion();
mock_process_.reset();
+ SetAudioUtilCallback(NULL);
}
bool WebRTCAudioDeviceTest::Send(IPC::Message* message) {
return channel_->Send(message);
}
+void WebRTCAudioDeviceTest::SetAudioUtilCallback(AudioUtilInterface* callback) {
+ // Invalidate any potentially cached values since the new callback should
+ // be used for those queries.
+ AudioHardware::ResetCache();
+ audio_util_callback_ = callback;
+}
+
void WebRTCAudioDeviceTest::InitializeIOThread(const char* thread_name) {
// We initialize COM (STA) on our IO thread as is done in Chrome.
// See BrowserProcessSubThread::Init.
« content/renderer/media/audio_device.h ('K') | « content/test/webrtc_audio_device_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698