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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 void RendererWebKitPlatformSupportImpl::GetPlugins( | 692 void RendererWebKitPlatformSupportImpl::GetPlugins( |
693 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { | 693 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { |
694 if (!RenderThreadImpl::current()->plugin_refresh_allowed()) | 694 if (!RenderThreadImpl::current()->plugin_refresh_allowed()) |
695 refresh = false; | 695 refresh = false; |
696 RenderThreadImpl::current()->Send( | 696 RenderThreadImpl::current()->Send( |
697 new ViewHostMsg_GetPlugins(refresh, plugins)); | 697 new ViewHostMsg_GetPlugins(refresh, plugins)); |
698 } | 698 } |
699 | 699 |
700 //------------------------------------------------------------------------------ | 700 //------------------------------------------------------------------------------ |
701 | 701 |
702 WebPeerConnectionHandler* | |
703 RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( | |
704 WebPeerConnectionHandlerClient* client) { | |
705 WebFrame* web_frame = WebFrame::frameForCurrentContext(); | |
706 if (!web_frame) | |
707 return NULL; | |
708 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); | |
709 if (!render_view) | |
710 return NULL; | |
711 return render_view->CreatePeerConnectionHandler(client); | |
712 } | |
713 | |
714 WebPeerConnection00Handler* | 702 WebPeerConnection00Handler* |
715 RendererWebKitPlatformSupportImpl::createPeerConnection00Handler( | 703 RendererWebKitPlatformSupportImpl::createPeerConnection00Handler( |
716 WebPeerConnection00HandlerClient* client) { | 704 WebPeerConnection00HandlerClient* client) { |
717 WebFrame* web_frame = WebFrame::frameForCurrentContext(); | 705 WebFrame* web_frame = WebFrame::frameForCurrentContext(); |
718 if (!web_frame) | 706 if (!web_frame) |
719 return NULL; | 707 return NULL; |
720 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); | 708 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); |
721 if (!render_view) | 709 if (!render_view) |
722 return NULL; | 710 return NULL; |
723 return render_view->CreatePeerConnectionHandlerJsep(client); | 711 return render_view->CreatePeerConnectionHandlerJsep(client); |
(...skipping 16 matching lines...) Expand all Loading... |
740 bool enable) { | 728 bool enable) { |
741 bool was_enabled = g_sandbox_enabled; | 729 bool was_enabled = g_sandbox_enabled; |
742 g_sandbox_enabled = enable; | 730 g_sandbox_enabled = enable; |
743 return was_enabled; | 731 return was_enabled; |
744 } | 732 } |
745 | 733 |
746 GpuChannelHostFactory* | 734 GpuChannelHostFactory* |
747 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { | 735 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { |
748 return RenderThreadImpl::current(); | 736 return RenderThreadImpl::current(); |
749 } | 737 } |
OLD | NEW |