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

Unified Diff: content/browser/renderer_host/media/video_capture_host_unittest.cc

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AudioManager injection into MediaStreamManager, consistent enum naming; per wjia@ comments. Also, … Created 8 years, 3 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: content/browser/renderer_host/media/video_capture_host_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index afd77badb9b2b694d11c3df5326ac7d429fd19ac..136c0e5cfadabbdb85edc4849d08a6f0ec33f992 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -13,11 +13,11 @@
#include "base/stl_util.h"
#include "base/stringprintf.h"
#include "content/browser/browser_thread_impl.h"
-#include "content/browser/renderer_host/media/audio_input_device_manager.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/media/video_capture_host.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
#include "content/common/media/video_capture_messages.h"
+#include "content/public/common/media_stream_request.h"
#include "content/public/test/mock_resource_context.h"
#include "media/audio/audio_manager.h"
#include "media/video/capture/video_capture_types.h"
@@ -146,7 +146,8 @@ class MockVideoCaptureHost : public VideoCaptureHost {
}
virtual media_stream::VideoCaptureManager* GetVideoCaptureManager() OVERRIDE {
- return manager_->video_capture_manager();
+ return manager_->GetVideoCaptureManager(
+ content::MEDIA_DEVICE_VIDEO_CAPTURE);
}
// These handler methods do minimal things and delegate to the mock methods.
@@ -212,14 +213,8 @@ class VideoCaptureHostTest : public testing::Test {
// Create our own MediaStreamManager.
audio_manager_.reset(media::AudioManager::Create());
- scoped_refptr<media_stream::AudioInputDeviceManager>
- audio_input_device_manager(
- new media_stream::AudioInputDeviceManager(audio_manager_.get()));
- scoped_refptr<media_stream::VideoCaptureManager> video_capture_manager(
- new media_stream::VideoCaptureManager());
- media_stream_manager_.reset(new media_stream::MediaStreamManager(
- audio_input_device_manager, video_capture_manager));
-
+ media_stream_manager_.reset(
+ new media_stream::MediaStreamManager(audio_manager_.get()));
#ifndef TEST_REAL_CAPTURE_DEVICE
media_stream_manager_->UseFakeDevice();
#endif
@@ -249,8 +244,8 @@ class VideoCaptureHostTest : public testing::Test {
// We need to continue running message_loop_ to complete all destructions.
message_loop_->RunAllPending();
- // Delete the IO message loop to delete the device thread,
- // AudioInputDeviceManager and VideoCaptureManager.
+ // Delete the IO message loop. This will cause the MediaStreamManager to be
+ // notified so it will stop its device thread and device managers.
message_loop_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698