| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 117 } |
| 118 | 118 |
| 119 blink::WebString BlinkPlatformImpl::defaultLocale() { | 119 blink::WebString BlinkPlatformImpl::defaultLocale() { |
| 120 return blink::WebString::fromUTF8("en-US"); | 120 return blink::WebString::fromUTF8("en-US"); |
| 121 } | 121 } |
| 122 | 122 |
| 123 blink::WebBlobRegistry* BlinkPlatformImpl::blobRegistry() { | 123 blink::WebBlobRegistry* BlinkPlatformImpl::blobRegistry() { |
| 124 return &blob_registry_; | 124 return &blob_registry_; |
| 125 } | 125 } |
| 126 | 126 |
| 127 double BlinkPlatformImpl::currentTime() { | 127 double BlinkPlatformImpl::currentTimeSeconds() { |
| 128 return base::Time::Now().ToDoubleT(); | 128 return base::Time::Now().ToDoubleT(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 double BlinkPlatformImpl::monotonicallyIncreasingTime() { | 131 double BlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() { |
| 132 return base::TimeTicks::Now().ToInternalValue() / | 132 return base::TimeTicks::Now().ToInternalValue() / |
| 133 static_cast<double>(base::Time::kMicrosecondsPerSecond); | 133 static_cast<double>(base::Time::kMicrosecondsPerSecond); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void BlinkPlatformImpl::cryptographicallyRandomValues(unsigned char* buffer, | 136 void BlinkPlatformImpl::cryptographicallyRandomValues(unsigned char* buffer, |
| 137 size_t length) { | 137 size_t length) { |
| 138 base::RandBytes(buffer, length); | 138 base::RandBytes(buffer, length); |
| 139 } | 139 } |
| 140 | 140 |
| 141 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { | 141 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 BlinkPlatformImpl::notificationManager() { | 316 BlinkPlatformImpl::notificationManager() { |
| 317 return &web_notification_manager_; | 317 return &web_notification_manager_; |
| 318 } | 318 } |
| 319 | 319 |
| 320 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { | 320 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { |
| 321 DCHECK(!current_thread_slot_.Get()); | 321 DCHECK(!current_thread_slot_.Get()); |
| 322 current_thread_slot_.Set(thread); | 322 current_thread_slot_.Set(thread); |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace html_viewer | 325 } // namespace html_viewer |
| OLD | NEW |