| 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 "content/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 | 1042 |
| 1043 double BlinkPlatformImpl::currentTime() { | 1043 double BlinkPlatformImpl::currentTime() { |
| 1044 return base::Time::Now().ToDoubleT(); | 1044 return base::Time::Now().ToDoubleT(); |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 double BlinkPlatformImpl::monotonicallyIncreasingTime() { | 1047 double BlinkPlatformImpl::monotonicallyIncreasingTime() { |
| 1048 return base::TimeTicks::Now().ToInternalValue() / | 1048 return base::TimeTicks::Now().ToInternalValue() / |
| 1049 static_cast<double>(base::Time::kMicrosecondsPerSecond); | 1049 static_cast<double>(base::Time::kMicrosecondsPerSecond); |
| 1050 } | 1050 } |
| 1051 | 1051 |
| 1052 double BlinkPlatformImpl::systemTraceTime() { |
| 1053 return base::TimeTicks::NowFromSystemTraceTime().ToInternalValue() / |
| 1054 static_cast<double>(base::Time::kMicrosecondsPerSecond); |
| 1055 } |
| 1056 |
| 1052 void BlinkPlatformImpl::cryptographicallyRandomValues( | 1057 void BlinkPlatformImpl::cryptographicallyRandomValues( |
| 1053 unsigned char* buffer, size_t length) { | 1058 unsigned char* buffer, size_t length) { |
| 1054 base::RandBytes(buffer, length); | 1059 base::RandBytes(buffer, length); |
| 1055 } | 1060 } |
| 1056 | 1061 |
| 1057 void BlinkPlatformImpl::setSharedTimerFiredFunction(void (*func)()) { | 1062 void BlinkPlatformImpl::setSharedTimerFiredFunction(void (*func)()) { |
| 1058 shared_timer_func_ = func; | 1063 shared_timer_func_ = func; |
| 1059 } | 1064 } |
| 1060 | 1065 |
| 1061 void BlinkPlatformImpl::setSharedTimerFireInterval( | 1066 void BlinkPlatformImpl::setSharedTimerFireInterval( |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1340 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1336 static_cast<ui::DomCode>(dom_code))); | 1341 static_cast<ui::DomCode>(dom_code))); |
| 1337 } | 1342 } |
| 1338 | 1343 |
| 1339 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1344 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1340 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1345 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1341 code.utf8().data())); | 1346 code.utf8().data())); |
| 1342 } | 1347 } |
| 1343 | 1348 |
| 1344 } // namespace content | 1349 } // namespace content |
| OLD | NEW |