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

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 10703095: New PeerConnection handler in Chrome to support latest PeerConnection draft (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix code review issues found by Wei. Created 8 years, 4 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 | Annotate | Revision Log
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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 using WebKit::WebIDBFactory; 89 using WebKit::WebIDBFactory;
90 using WebKit::WebIDBKey; 90 using WebKit::WebIDBKey;
91 using WebKit::WebIDBKeyPath; 91 using WebKit::WebIDBKeyPath;
92 using WebKit::WebKitPlatformSupport; 92 using WebKit::WebKitPlatformSupport;
93 using WebKit::WebMediaStreamCenter; 93 using WebKit::WebMediaStreamCenter;
94 using WebKit::WebMediaStreamCenterClient; 94 using WebKit::WebMediaStreamCenterClient;
95 using WebKit::WebPeerConnection00Handler; 95 using WebKit::WebPeerConnection00Handler;
96 using WebKit::WebPeerConnection00HandlerClient; 96 using WebKit::WebPeerConnection00HandlerClient;
97 using WebKit::WebPeerConnectionHandler; 97 using WebKit::WebPeerConnectionHandler;
98 using WebKit::WebPeerConnectionHandlerClient; 98 using WebKit::WebPeerConnectionHandlerClient;
99 using WebKit::WebRTCPeerConnectionHandler;
100 using WebKit::WebRTCPeerConnectionHandlerClient;
99 using WebKit::WebSerializedScriptValue; 101 using WebKit::WebSerializedScriptValue;
100 using WebKit::WebStorageNamespace; 102 using WebKit::WebStorageNamespace;
101 using WebKit::WebString; 103 using WebKit::WebString;
102 using WebKit::WebURL; 104 using WebKit::WebURL;
103 using WebKit::WebVector; 105 using WebKit::WebVector;
104 106
105 static bool g_sandbox_enabled = true; 107 static bool g_sandbox_enabled = true;
106 108
107 //------------------------------------------------------------------------------ 109 //------------------------------------------------------------------------------
108 110
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 WebPeerConnection00HandlerClient* client) { 708 WebPeerConnection00HandlerClient* client) {
707 WebFrame* web_frame = WebFrame::frameForCurrentContext(); 709 WebFrame* web_frame = WebFrame::frameForCurrentContext();
708 if (!web_frame) 710 if (!web_frame)
709 return NULL; 711 return NULL;
710 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); 712 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view());
711 if (!render_view) 713 if (!render_view)
712 return NULL; 714 return NULL;
713 return render_view->CreatePeerConnectionHandlerJsep(client); 715 return render_view->CreatePeerConnectionHandlerJsep(client);
714 } 716 }
715 717
718 WebRTCPeerConnectionHandler*
719 RendererWebKitPlatformSupportImpl::createRTCPeerConnectionHandler(
720 WebRTCPeerConnectionHandlerClient* client) {
721 WebFrame* web_frame = WebFrame::frameForCurrentContext();
722 if (web_frame) {
Ronghua Wu (Left Chromium) 2012/08/14 00:59:03 I think the format in createPeerConnection00Handle
perkj_chrome 2012/08/14 09:15:40 please talk to your colleague next to you :-> Ok -
Ronghua Wu (Left Chromium) 2012/08/15 00:57:32 :) This is the format preferred in libjingle and I
723 RenderViewImpl* view = RenderViewImpl::FromWebView(web_frame->view());
724 if (view) {
725 return view->CreateRTCPeerConnectionHandler(client);
726 }
727 }
728 return NULL;
729 }
730
716 //------------------------------------------------------------------------------ 731 //------------------------------------------------------------------------------
717 732
718 WebMediaStreamCenter* 733 WebMediaStreamCenter*
719 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( 734 RendererWebKitPlatformSupportImpl::createMediaStreamCenter(
720 WebMediaStreamCenterClient* client) { 735 WebMediaStreamCenterClient* client) {
721 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 736 RenderThreadImpl* render_thread = RenderThreadImpl::current();
722 DCHECK(render_thread); 737 DCHECK(render_thread);
723 if (!render_thread) 738 if (!render_thread)
724 return NULL; 739 return NULL;
725 return render_thread->CreateMediaStreamCenter(client); 740 return render_thread->CreateMediaStreamCenter(client);
726 } 741 }
727 742
728 // static 743 // static
729 bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting( 744 bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting(
730 bool enable) { 745 bool enable) {
731 bool was_enabled = g_sandbox_enabled; 746 bool was_enabled = g_sandbox_enabled;
732 g_sandbox_enabled = enable; 747 g_sandbox_enabled = enable;
733 return was_enabled; 748 return was_enabled;
734 } 749 }
735 750
736 GpuChannelHostFactory* 751 GpuChannelHostFactory*
737 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { 752 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
738 return RenderThreadImpl::current(); 753 return RenderThreadImpl::current();
739 } 754 }
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