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

Unified Diff: content/renderer/renderer_webkitplatformsupport_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: Adding missing files content/renderer/media/webrtc_uma_histograms.h 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/renderer_webkitplatformsupport_impl.cc
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 5f05a8f134f8df5f2828adfa049667a7d917d8ff..c96bf32959581af55e1492c1cdf758e4a7892b79 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -27,6 +27,7 @@
#include "content/renderer/gamepad_shared_memory_reader.h"
#include "content/renderer/hyphenator/hyphenator.h"
#include "content/renderer/media/audio_hardware.h"
+#include "content/renderer/media/media_stream_dependency_factory.h"
#include "content/renderer/media/renderer_webaudiodevice_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
@@ -676,13 +677,13 @@ void RendererWebKitPlatformSupportImpl::GetPlugins(
WebPeerConnection00Handler*
RendererWebKitPlatformSupportImpl::createPeerConnection00Handler(
WebPeerConnection00HandlerClient* client) {
- WebFrame* web_frame = WebFrame::frameForCurrentContext();
- if (!web_frame)
- return NULL;
- RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view());
- if (!render_view)
+ RenderThreadImpl* render_thread = RenderThreadImpl::current();
+ DCHECK(render_thread);
+ if (!render_thread)
return NULL;
- return render_view->CreatePeerConnectionHandlerJsep(client);
+ MediaStreamDependencyFactory* rtc_dependency_factory =
+ render_thread->GetMediaStreamDependencyFactory();
+ return rtc_dependency_factory->CreatePeerConnectionHandlerJsep(client);
}
//------------------------------------------------------------------------------
« content/renderer/media/webrtc_uma_histograms.h ('K') | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698