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

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 comments found Ronghua. 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
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
36 #include "media/audio/audio_output_device.h" 36 #include "media/audio/audio_output_device.h"
37 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis try.h" 37 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis try.h"
38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
40 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads. h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGamepads. h"
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amCenter.h" 44 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amCenter.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amCenterClient.h" 45 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amCenterClient.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h"
47 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h"
48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h"
49 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize dScriptValue.h" 47 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize dScriptValue.h"
50 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 48 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
51 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 49 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
52 #include "webkit/glue/simple_webmimeregistry_impl.h" 50 #include "webkit/glue/simple_webmimeregistry_impl.h"
53 #include "webkit/glue/webclipboard_impl.h" 51 #include "webkit/glue/webclipboard_impl.h"
54 #include "webkit/glue/webfileutilities_impl.h" 52 #include "webkit/glue/webfileutilities_impl.h"
55 #include "webkit/glue/webkit_glue.h" 53 #include "webkit/glue/webkit_glue.h"
56 54
57 #if defined(OS_WIN) 55 #if defined(OS_WIN)
(...skipping 29 matching lines...) Expand all
87 using WebKit::WebFrame; 85 using WebKit::WebFrame;
88 using WebKit::WebGamepads; 86 using WebKit::WebGamepads;
89 using WebKit::WebIDBFactory; 87 using WebKit::WebIDBFactory;
90 using WebKit::WebIDBKey; 88 using WebKit::WebIDBKey;
91 using WebKit::WebIDBKeyPath; 89 using WebKit::WebIDBKeyPath;
92 using WebKit::WebKitPlatformSupport; 90 using WebKit::WebKitPlatformSupport;
93 using WebKit::WebMediaStreamCenter; 91 using WebKit::WebMediaStreamCenter;
94 using WebKit::WebMediaStreamCenterClient; 92 using WebKit::WebMediaStreamCenterClient;
95 using WebKit::WebPeerConnection00Handler; 93 using WebKit::WebPeerConnection00Handler;
96 using WebKit::WebPeerConnection00HandlerClient; 94 using WebKit::WebPeerConnection00HandlerClient;
97 using WebKit::WebPeerConnectionHandler; 95 using WebKit::WebRTCPeerConnectionHandler;
98 using WebKit::WebPeerConnectionHandlerClient; 96 using WebKit::WebRTCPeerConnectionHandlerClient;
99 using WebKit::WebSerializedScriptValue; 97 using WebKit::WebSerializedScriptValue;
100 using WebKit::WebStorageNamespace; 98 using WebKit::WebStorageNamespace;
101 using WebKit::WebString; 99 using WebKit::WebString;
102 using WebKit::WebURL; 100 using WebKit::WebURL;
103 using WebKit::WebVector; 101 using WebKit::WebVector;
104 102
105 static bool g_sandbox_enabled = true; 103 static bool g_sandbox_enabled = true;
106 104
107 //------------------------------------------------------------------------------ 105 //------------------------------------------------------------------------------
108 106
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 WebPeerConnection00HandlerClient* client) { 704 WebPeerConnection00HandlerClient* client) {
707 WebFrame* web_frame = WebFrame::frameForCurrentContext(); 705 WebFrame* web_frame = WebFrame::frameForCurrentContext();
708 if (!web_frame) 706 if (!web_frame)
709 return NULL; 707 return NULL;
710 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); 708 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view());
711 if (!render_view) 709 if (!render_view)
712 return NULL; 710 return NULL;
713 return render_view->CreatePeerConnectionHandlerJsep(client); 711 return render_view->CreatePeerConnectionHandlerJsep(client);
714 } 712 }
715 713
714 WebRTCPeerConnectionHandler*
715 RendererWebKitPlatformSupportImpl::createRTCPeerConnectionHandler(
716 WebRTCPeerConnectionHandlerClient* client) {
717 WebFrame* web_frame = WebFrame::frameForCurrentContext();
piman 2012/08/15 16:51:50 frameForCurrentContext is not what you want. This
Tommy Widenflycht 2012/08/22 10:35:21 The current thinking is that policy decisions shou
718 if (!web_frame)
719 return NULL;
720 RenderViewImpl* view = RenderViewImpl::FromWebView(web_frame->view());
721 if (!view)
722 return NULL;
723 return view->CreateRTCPeerConnectionHandler(client);
724 }
725
716 //------------------------------------------------------------------------------ 726 //------------------------------------------------------------------------------
717 727
718 WebMediaStreamCenter* 728 WebMediaStreamCenter*
719 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( 729 RendererWebKitPlatformSupportImpl::createMediaStreamCenter(
720 WebMediaStreamCenterClient* client) { 730 WebMediaStreamCenterClient* client) {
721 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 731 RenderThreadImpl* render_thread = RenderThreadImpl::current();
722 DCHECK(render_thread); 732 DCHECK(render_thread);
723 if (!render_thread) 733 if (!render_thread)
724 return NULL; 734 return NULL;
725 return render_thread->CreateMediaStreamCenter(client); 735 return render_thread->CreateMediaStreamCenter(client);
726 } 736 }
727 737
728 // static 738 // static
729 bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting( 739 bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting(
730 bool enable) { 740 bool enable) {
731 bool was_enabled = g_sandbox_enabled; 741 bool was_enabled = g_sandbox_enabled;
732 g_sandbox_enabled = enable; 742 g_sandbox_enabled = enable;
733 return was_enabled; 743 return was_enabled;
734 } 744 }
735 745
736 GpuChannelHostFactory* 746 GpuChannelHostFactory*
737 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { 747 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
738 return RenderThreadImpl::current(); 748 return RenderThreadImpl::current();
739 } 749 }
OLDNEW
« 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