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/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
644 void RendererWebKitPlatformSupportImpl::GetPlugins( | 644 void RendererWebKitPlatformSupportImpl::GetPlugins( |
645 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { | 645 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { |
646 if (!RenderThreadImpl::current()->plugin_refresh_allowed()) | 646 if (!RenderThreadImpl::current()->plugin_refresh_allowed()) |
647 refresh = false; | 647 refresh = false; |
648 RenderThreadImpl::current()->Send( | 648 RenderThreadImpl::current()->Send( |
649 new ViewHostMsg_GetPlugins(refresh, plugins)); | 649 new ViewHostMsg_GetPlugins(refresh, plugins)); |
650 } | 650 } |
651 | 651 |
652 //------------------------------------------------------------------------------ | 652 //------------------------------------------------------------------------------ |
653 | 653 |
654 namespace { | |
655 | |
656 RenderViewImpl* findRenderView() { | |
657 WebFrame* web_frame = WebFrame::frameForCurrentContext(); | |
658 if (!web_frame) | |
659 return NULL; | |
660 return RenderViewImpl::FromWebView(web_frame->view()); | |
661 } | |
662 | |
663 } | |
664 | |
654 WebKit::WebPeerConnectionHandler* | 665 WebKit::WebPeerConnectionHandler* |
655 RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( | 666 RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( |
656 WebKit::WebPeerConnectionHandlerClient* client) { | 667 WebKit::WebPeerConnectionHandlerClient* client) { |
657 WebFrame* web_frame = WebFrame::frameForCurrentContext(); | 668 RenderViewImpl* render_view = findRenderView(); |
658 if (!web_frame) | |
659 return NULL; | |
660 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); | |
661 if (!render_view) | 669 if (!render_view) |
662 return NULL; | 670 return NULL; |
663 return render_view->CreatePeerConnectionHandler(client); | 671 return render_view->CreatePeerConnectionHandler(client); |
664 } | 672 } |
673 | |
674 WebKit::WebMediaStreamCenter* | |
darin (slow to review)
2012/02/13 16:27:01
nit: in this file, please add using directives to
tommyw
2012/02/13 17:30:07
Done.
| |
675 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( | |
676 WebKit::WebMediaStreamCenterClient* client) { | |
677 RenderViewImpl* render_view = findRenderView(); | |
678 if (!render_view) | |
679 return NULL; | |
680 return render_view->CreateMediaStreamCenter(client); | |
681 } | |
OLD | NEW |