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

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 9309078: Adding a skeleton MediaStreamCenter. (Closed)
Patch Set: Fixed review comment Created 8 years, 10 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 7e0f79603dbfe4fa535ee2c399189a0ebf55b4ad..a11952b0694e92fffaea105b7d3c966ff1b85abe 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -672,14 +672,31 @@ void RendererWebKitPlatformSupportImpl::GetPlugins(
//------------------------------------------------------------------------------
-WebKit::WebPeerConnectionHandler*
-RendererWebKitPlatformSupportImpl::createPeerConnectionHandler(
- WebKit::WebPeerConnectionHandlerClient* client) {
+namespace {
+
+RenderViewImpl* findRenderView() {
WebFrame* web_frame = WebFrame::frameForCurrentContext();
if (!web_frame)
return NULL;
- RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view());
+ return RenderViewImpl::FromWebView(web_frame->view());
+}
+
+}
+
+WebKit::WebPeerConnectionHandler*
+RendererWebKitPlatformSupportImpl::createPeerConnectionHandler(
+ WebKit::WebPeerConnectionHandlerClient* client) {
+ RenderViewImpl* render_view = findRenderView();
if (!render_view)
return NULL;
return render_view->CreatePeerConnectionHandler(client);
}
+
+WebKit::WebMediaStreamCenter*
+RendererWebKitPlatformSupportImpl::createMediaStreamCenter(
+ WebKit::WebMediaStreamCenterClient* client) {
+ RenderViewImpl* render_view = findRenderView();
piman 2012/02/08 01:52:24 Is there any way we can avoid this? This is taking
tommyw 2012/02/08 13:14:18 Short answer: No Longer answer: the MediaStreamCe
+ if (!render_view)
+ return NULL;
+ return render_view->CreateMediaStreamCenter(client);
+}
« content/renderer/render_view_impl.h ('K') | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698