| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/html_viewer/blink_platform_impl.h" | 5 #include "components/html_viewer/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 | 112 |
| 113 blink::WebString BlinkPlatformImpl::defaultLocale() { | 113 blink::WebString BlinkPlatformImpl::defaultLocale() { |
| 114 return blink::WebString::fromUTF8("en-US"); | 114 return blink::WebString::fromUTF8("en-US"); |
| 115 } | 115 } |
| 116 | 116 |
| 117 blink::WebBlobRegistry* BlinkPlatformImpl::blobRegistry() { | 117 blink::WebBlobRegistry* BlinkPlatformImpl::blobRegistry() { |
| 118 return &blob_registry_; | 118 return &blob_registry_; |
| 119 } | 119 } |
| 120 | 120 |
| 121 double BlinkPlatformImpl::currentTimeSeconds() { | |
| 122 return base::Time::Now().ToDoubleT(); | |
| 123 } | |
| 124 | |
| 125 double BlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() { | |
| 126 return base::TimeTicks::Now().ToInternalValue() / | |
| 127 static_cast<double>(base::Time::kMicrosecondsPerSecond); | |
| 128 } | |
| 129 | |
| 130 void BlinkPlatformImpl::cryptographicallyRandomValues(unsigned char* buffer, | 121 void BlinkPlatformImpl::cryptographicallyRandomValues(unsigned char* buffer, |
| 131 size_t length) { | 122 size_t length) { |
| 132 base::RandBytes(buffer, length); | 123 base::RandBytes(buffer, length); |
| 133 } | 124 } |
| 134 | 125 |
| 135 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { | 126 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { |
| 136 return true; | 127 return true; |
| 137 } | 128 } |
| 138 | 129 |
| 139 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() { | 130 blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 BlinkPlatformImpl::notificationManager() { | 300 BlinkPlatformImpl::notificationManager() { |
| 310 return &web_notification_manager_; | 301 return &web_notification_manager_; |
| 311 } | 302 } |
| 312 | 303 |
| 313 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { | 304 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { |
| 314 DCHECK(!current_thread_slot_.Get()); | 305 DCHECK(!current_thread_slot_.Get()); |
| 315 current_thread_slot_.Set(thread); | 306 current_thread_slot_.Set(thread); |
| 316 } | 307 } |
| 317 | 308 |
| 318 } // namespace html_viewer | 309 } // namespace html_viewer |
| OLD | NEW |