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

Unified Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 9309078: Adding a skeleton MediaStreamCenter. (Closed)
Patch Set: Fixed review comments 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
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('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 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);
+}
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698