Index: content/renderer/renderer_webkitplatformsupport_impl.cc |
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc |
index ce8e3d7019696b4f90342d98021a30f55c83779c..1ebdbf3b1b232621b115015ae99a742493604d20 100644 |
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc |
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc |
@@ -651,14 +651,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* |
darin (slow to review)
2012/02/13 16:27:01
nit: in this file, please add using directives to
tommyw
2012/02/13 17:30:07
Done.
|
+RendererWebKitPlatformSupportImpl::createMediaStreamCenter( |
+ WebKit::WebMediaStreamCenterClient* client) { |
+ RenderViewImpl* render_view = findRenderView(); |
+ if (!render_view) |
+ return NULL; |
+ return render_view->CreateMediaStreamCenter(client); |
+} |