| 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/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 const WebString& hostname) { | 288 const WebString& hostname) { |
| 289 if (hostname.isEmpty()) | 289 if (hostname.isEmpty()) |
| 290 return; | 290 return; |
| 291 | 291 |
| 292 std::string hostname_utf8; | 292 std::string hostname_utf8; |
| 293 UTF16ToUTF8(hostname.data(), hostname.length(), &hostname_utf8); | 293 UTF16ToUTF8(hostname.data(), hostname.length(), &hostname_utf8); |
| 294 GetContentClient()->renderer()->PrefetchHostName( | 294 GetContentClient()->renderer()->PrefetchHostName( |
| 295 hostname_utf8.data(), hostname_utf8.length()); | 295 hostname_utf8.data(), hostname_utf8.length()); |
| 296 } | 296 } |
| 297 | 297 |
| 298 WebKit::WebPrescientNetworking* |
| 299 RendererWebKitPlatformSupportImpl::prescientNetworking() { |
| 300 return GetContentClient()->renderer()->GetPrescientNetworking(); |
| 301 } |
| 302 |
| 298 bool | 303 bool |
| 299 RendererWebKitPlatformSupportImpl::CheckPreparsedJsCachingEnabled() const { | 304 RendererWebKitPlatformSupportImpl::CheckPreparsedJsCachingEnabled() const { |
| 300 static bool checked = false; | 305 static bool checked = false; |
| 301 static bool result = false; | 306 static bool result = false; |
| 302 if (!checked) { | 307 if (!checked) { |
| 303 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 308 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 304 result = command_line.HasSwitch(switches::kEnablePreparsedJsCaching); | 309 result = command_line.HasSwitch(switches::kEnablePreparsedJsCaching); |
| 305 checked = true; | 310 checked = true; |
| 306 } | 311 } |
| 307 return result; | 312 return result; |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 } | 902 } |
| 898 | 903 |
| 899 //------------------------------------------------------------------------------ | 904 //------------------------------------------------------------------------------ |
| 900 | 905 |
| 901 WebKit::WebCompositorSupport* | 906 WebKit::WebCompositorSupport* |
| 902 RendererWebKitPlatformSupportImpl::compositorSupport() { | 907 RendererWebKitPlatformSupportImpl::compositorSupport() { |
| 903 return &compositor_support_; | 908 return &compositor_support_; |
| 904 } | 909 } |
| 905 | 910 |
| 906 } // namespace content | 911 } // namespace content |
| OLD | NEW |