Index: content/renderer/renderer_webkitplatformsupport_impl.cc |
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc |
index 063e5cffeb28cf0581222506cac22294c53f0939..d9ddf31c5e85be4f4721855de29d9f1a211689b5 100644 |
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc |
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc |
@@ -86,6 +86,10 @@ using WebKit::WebIDBFactory; |
using WebKit::WebIDBKey; |
using WebKit::WebIDBKeyPath; |
using WebKit::WebKitPlatformSupport; |
+using WebKit::WebMediaStreamCenter; |
+using WebKit::WebMediaStreamCenterClient; |
+using WebKit::WebPeerConnectionHandler; |
+using WebKit::WebPeerConnectionHandlerClient; |
using WebKit::WebSerializedScriptValue; |
using WebKit::WebStorageArea; |
using WebKit::WebStorageEventDispatcher; |
@@ -669,14 +673,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()); |
+} |
+ |
+} |
+ |
+WebPeerConnectionHandler* |
+RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( |
+ WebPeerConnectionHandlerClient* client) { |
+ RenderViewImpl* render_view = findRenderView(); |
if (!render_view) |
return NULL; |
return render_view->CreatePeerConnectionHandler(client); |
} |
+ |
+WebMediaStreamCenter* |
+RendererWebKitPlatformSupportImpl::createMediaStreamCenter( |
+ WebMediaStreamCenterClient* client) { |
+ RenderViewImpl* render_view = findRenderView(); |
darin (slow to review)
2012/02/13 17:44:30
yeah, what piman said. if you need the interface
|
+ if (!render_view) |
+ return NULL; |
+ return render_view->CreateMediaStreamCenter(client); |
+} |