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

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: #if defined(ENABLE_WEBRTC) in RendererWebKitPlatformSupportImpl::createPeerConnection00Handler to b… 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fcec63d88c804c05e1f50dfd628b0042e9aeaa4b 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,17 @@ 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);
+#if defined(ENABLE_WEBRTC)
+ MediaStreamDependencyFactory* rtc_dependency_factory =
+ render_thread->GetMediaStreamDependencyFactory();
+ return rtc_dependency_factory->CreatePeerConnectionHandlerJsep(client);
+#else
+ return NULL;
+#endif // defined(ENABLE_WEBRTC)
}
//------------------------------------------------------------------------------
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698