| 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()->PrescientNetworking(); |
| 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 shared_offscreen_context_ = | 922 shared_offscreen_context_ = |
| 918 RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 923 RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 919 } | 924 } |
| 920 if (!shared_offscreen_context_) | 925 if (!shared_offscreen_context_) |
| 921 return NULL; | 926 return NULL; |
| 922 return new webkit::gpu::WebGraphicsContext3DProviderImpl( | 927 return new webkit::gpu::WebGraphicsContext3DProviderImpl( |
| 923 shared_offscreen_context_); | 928 shared_offscreen_context_); |
| 924 } | 929 } |
| 925 | 930 |
| 926 } // namespace content | 931 } // namespace content |
| OLD | NEW |