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

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: Add MediaStreamDispatcher IPC glue (and unittests) for new GenerateStreamForDevice() API. 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..6483dfaa1a3b275ca71ade4a6064a2f370d879df 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -13,13 +13,12 @@
#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"
#include "net/url_request/url_request_context.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -146,7 +145,8 @@ class MockVideoCaptureHost : public VideoCaptureHost {
}
virtual media_stream::VideoCaptureManager* GetVideoCaptureManager() OVERRIDE {
- return manager_->video_capture_manager();
+ return manager_->GetVideoCaptureManager(
+ content::MEDIA_VIDEO_DEVICE_CAPTURE);
}
// These handler methods do minimal things and delegate to the mock methods.
@@ -211,15 +211,7 @@ class VideoCaptureHostTest : public testing::Test {
message_loop_.get()));
// 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());
#ifndef TEST_REAL_CAPTURE_DEVICE
media_stream_manager_->UseFakeDevice();
#endif
@@ -249,8 +241,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();
}
@@ -352,7 +344,6 @@ class VideoCaptureHostTest : public testing::Test {
private:
scoped_ptr<MessageLoop> message_loop_;
scoped_ptr<BrowserThreadImpl> io_thread_;
- scoped_ptr<media::AudioManager> audio_manager_;
scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_;
DISALLOW_COPY_AND_ASSIGN(VideoCaptureHostTest);

Powered by Google App Engine
This is Rietveld 408576698