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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 10919122: Move creation of PeerConnection from the RenderView to the RenderThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to latest codec base. 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/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index acb85328b53c87805c2ef8744a2309647131b083..1872e2cecfee4b185fad6f02e7e19c8f09dcd441 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -63,6 +63,7 @@
#include "content/renderer/media/audio_message_filter.h"
#include "content/renderer/media/audio_renderer_mixer_manager.h"
#include "content/renderer/media/media_stream_center.h"
+#include "content/renderer/media/media_stream_dependency_factory.h"
#include "content/renderer/media/video_capture_impl_manager.h"
#include "content/renderer/media/video_capture_message_filter.h"
#include "content/renderer/p2p/socket_dispatcher.h"
@@ -1094,11 +1095,24 @@ WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter(
WebKit::WebMediaStreamCenterClient* client) {
#if defined(ENABLE_WEBRTC)
if (!media_stream_center_)
- media_stream_center_ = new content::MediaStreamCenter(client);
+ media_stream_center_ = new content::MediaStreamCenter(
+ client, GetMediaStreamDependencyFactory());
#endif
return media_stream_center_;
}
+MediaStreamDependencyFactory*
+RenderThreadImpl::GetMediaStreamDependencyFactory() {
+#if defined(ENABLE_WEBRTC)
+ if (!media_stream_factory_.get()) {
+ media_stream_factory_.reset(new MediaStreamDependencyFactory(
+ vc_manager_, p2p_socket_dispatcher_));
+ }
+#endif
+ return media_stream_factory_.get();
+}
+
+
GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
if (!gpu_channel_.get())
return NULL;

Powered by Google App Engine
This is Rietveld 408576698