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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 } | 663 } |
664 } | 664 } |
665 | 665 |
666 WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( | 666 WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( |
667 const WebKit::WebURL& url) { | 667 const WebKit::WebURL& url) { |
668 return WebKitPlatformSupportImpl::userAgent(url); | 668 return WebKitPlatformSupportImpl::userAgent(url); |
669 } | 669 } |
670 | 670 |
671 void RendererWebKitPlatformSupportImpl::GetPlugins( | 671 void RendererWebKitPlatformSupportImpl::GetPlugins( |
672 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { | 672 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { |
| 673 #if defined(ENABLE_PLUGINS) |
673 if (!plugin_refresh_allowed_) | 674 if (!plugin_refresh_allowed_) |
674 refresh = false; | 675 refresh = false; |
675 RenderThread::Get()->Send( | 676 RenderThread::Get()->Send( |
676 new ViewHostMsg_GetPlugins(refresh, plugins)); | 677 new ViewHostMsg_GetPlugins(refresh, plugins)); |
| 678 #endif |
677 } | 679 } |
678 | 680 |
679 //------------------------------------------------------------------------------ | 681 //------------------------------------------------------------------------------ |
680 | 682 |
681 WebRTCPeerConnectionHandler* | 683 WebRTCPeerConnectionHandler* |
682 RendererWebKitPlatformSupportImpl::createRTCPeerConnectionHandler( | 684 RendererWebKitPlatformSupportImpl::createRTCPeerConnectionHandler( |
683 WebRTCPeerConnectionHandlerClient* client) { | 685 WebRTCPeerConnectionHandlerClient* client) { |
684 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 686 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
685 DCHECK(render_thread); | 687 DCHECK(render_thread); |
686 if (!render_thread) | 688 if (!render_thread) |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 size_t before_index, | 753 size_t before_index, |
752 const WebKit::WebString& locale) { | 754 const WebKit::WebString& locale) { |
753 // Crash if WebKit calls this function when canHyphenate returns false. | 755 // Crash if WebKit calls this function when canHyphenate returns false. |
754 DCHECK(locale.isEmpty() || locale.equals("en-US")); | 756 DCHECK(locale.isEmpty() || locale.equals("en-US")); |
755 DCHECK(hyphenator_.get()); | 757 DCHECK(hyphenator_.get()); |
756 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), | 758 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), |
757 before_index); | 759 before_index); |
758 } | 760 } |
759 | 761 |
760 } // namespace content | 762 } // namespace content |
OLD | NEW |