OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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) | |
723 return NULL; | |
724 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); | |
725 if (!render_view) | |
726 return NULL; | |
727 return render_view->CreateRTCPeerConnectionHandler(client); | |
wjia(left Chromium)
2012/08/12 17:06:52
How about:
if (web_frame) {
RenderViewImpl* rend
perkj_chrome
2012/08/13 07:35:46
Sounds good. In a number of reviews I have had com
| |
728 } | |
729 | |
716 //------------------------------------------------------------------------------ | 730 //------------------------------------------------------------------------------ |
717 | 731 |
718 WebMediaStreamCenter* | 732 WebMediaStreamCenter* |
719 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( | 733 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( |
720 WebMediaStreamCenterClient* client) { | 734 WebMediaStreamCenterClient* client) { |
721 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 735 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
722 DCHECK(render_thread); | 736 DCHECK(render_thread); |
723 if (!render_thread) | 737 if (!render_thread) |
724 return NULL; | 738 return NULL; |
725 return render_thread->CreateMediaStreamCenter(client); | 739 return render_thread->CreateMediaStreamCenter(client); |
726 } | 740 } |
727 | 741 |
728 // static | 742 // static |
729 bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting( | 743 bool RendererWebKitPlatformSupportImpl::SetSandboxEnabledForTesting( |
730 bool enable) { | 744 bool enable) { |
731 bool was_enabled = g_sandbox_enabled; | 745 bool was_enabled = g_sandbox_enabled; |
732 g_sandbox_enabled = enable; | 746 g_sandbox_enabled = enable; |
733 return was_enabled; | 747 return was_enabled; |
734 } | 748 } |
735 | 749 |
736 GpuChannelHostFactory* | 750 GpuChannelHostFactory* |
737 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { | 751 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { |
738 return RenderThreadImpl::current(); | 752 return RenderThreadImpl::current(); |
739 } | 753 } |
OLD | NEW |