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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 void RendererWebKitPlatformSupportImpl::GetPlugins( 665 void RendererWebKitPlatformSupportImpl::GetPlugins(
666 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { 666 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) {
667 if (!RenderThreadImpl::current()->plugin_refresh_allowed()) 667 if (!RenderThreadImpl::current()->plugin_refresh_allowed())
668 refresh = false; 668 refresh = false;
669 RenderThreadImpl::current()->Send( 669 RenderThreadImpl::current()->Send(
670 new ViewHostMsg_GetPlugins(refresh, plugins)); 670 new ViewHostMsg_GetPlugins(refresh, plugins));
671 } 671 }
672 672
673 //------------------------------------------------------------------------------ 673 //------------------------------------------------------------------------------
674 674
675 namespace {
676
677 RenderViewImpl* findRenderView() {
678 WebFrame* web_frame = WebFrame::frameForCurrentContext();
679 if (!web_frame)
680 return NULL;
681 return RenderViewImpl::FromWebView(web_frame->view());
682 }
683
684 }
685
675 WebKit::WebPeerConnectionHandler* 686 WebKit::WebPeerConnectionHandler*
676 RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( 687 RendererWebKitPlatformSupportImpl::createPeerConnectionHandler(
677 WebKit::WebPeerConnectionHandlerClient* client) { 688 WebKit::WebPeerConnectionHandlerClient* client) {
678 WebFrame* web_frame = WebFrame::frameForCurrentContext(); 689 RenderViewImpl* render_view = findRenderView();
679 if (!web_frame)
680 return NULL;
681 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view());
682 if (!render_view) 690 if (!render_view)
683 return NULL; 691 return NULL;
684 return render_view->CreatePeerConnectionHandler(client); 692 return render_view->CreatePeerConnectionHandler(client);
685 } 693 }
694
695 WebKit::WebMediaStreamCenter*
696 RendererWebKitPlatformSupportImpl::createMediaStreamCenter(
697 WebKit::WebMediaStreamCenterClient* client) {
698 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
699 if (!render_view)
700 return NULL;
701 return render_view->CreateMediaStreamCenter(client);
702 }
OLDNEW
« 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